|
I thought I'd have one last try to see if I can get some help on this, sorry to all who are sick of seeing me post this, think its the 3rd time
I'm using VS.Net with MFC and I'm using the CFtpConnection class. There is a member function, Command, which will allow you to create new commands to send to the ftp server and get responses back. I'm really needing to use this but I'm having a problem getting a response back from the server The problem is the 2nd parameter. My code just now is
CInternetFile* responseFile = ftp1->Command(pasvCommand,ftp1->CmdRespRead,FTP_TRANSFER_TYPE_ASCII);
ftp1 is a valid connected cftpconnection object and pasvCommand is just the string PASV for sending to the server. The 2nd parameter is the one that specifies if you want a response or not and is defined in the afxinet.h header as an enum with CmdRespRead the one for getting a response back. Setting the 2nd parameter in the call as CmdRespRead will throw a compiler error that its unrecognised, by using ftp1->CmdRespRead it will compile but doesn't take a response back from the server.
Does anyone know what I should put in here because I'm about to delete this project and start work on a winsock version if I can't get it fixed, not good as I know nowt about winsocks
Thanks all who read & can help
|
|
|
|
|
I don't no anything about this but did you check the return value. If responseFile == 0 you can call GetLastError to get some more information why the call failed. Can you get a response back from the server by sending a different command?
If every fool wore a crown, we would all be king - Lard
|
|
|
|
|
Nope, I tried that a couple of days ago but no luck. I've tried it on a couple of different servers and using different commands but didn't help
Thanks for replying though
|
|
|
|
|
We are trying - unsuccessfully - to import classes form a DLL (build by others developpers)
They provided us the corresponding *.lib.
Can anybody tell me how we can ensure that the DLL do export this classes?
Thanks.
CMK
|
|
|
|
|
Use dependency walker - the class names will be mangled but you should be able to work them out. They should also have given you a header file. And last of all they should have at least given you a sample app to demonstrate usage of those classes.
bibamus, edamus, cras moriemur [eat, drink, for tomorrow we die]
|
|
|
|
|
OK. Thanks. we already resolved the problem.
Indead, the .h and .lib wasn't OK. We open the .lib with notepad and noticed the names of classes wasn't the same:
CMyClass versus CMy_Class for instance.
Resolving the problem: shooting them!!!
Thanks.
|
|
|
|
|
I'm still not clear exactly about what an owner drawn control is. How is it different from a regular control? I didnt find anything describing the basic concept of what it means to be owner drawn. Any links would be appreciated.
Thanks,
ns
|
|
|
|
|
Ordinary windows controls (text box, list box, list view, button, tree view, combo box, etc.) are not owner drawn. You just have to create it. When a dialog is repainted (it gets WM_PAINT message) Windows repaints controls. For exaxmple if you have a button, and the dailog was repainted, Windows draw it using GDI functions (DrawLine, DrawText, DrawRectangle, etc.)
If you want the button to look different, you can crete an owner drawn (not by Windows but by an owner!) button. You have to draw it by yourself, using GDI functions.
I will quote a part of MSDN article about Tab controls (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/CommCtls/Tab/Tab.asp):
Owner-Drawn Tabs
If a tab control has the TCS_OWNERDRAWFIXED style, the parent window must paint tabs by processing the WM_DRAWITEM message. The tab control sends this message whenever a tab needs to be painted. The lParam parameter specifies the address of a DRAWITEMSTRUCT structure, which contains the index of the tab, its bounding rectangle, and the device context (DC) in which to draw.
By default, the itemData member of DRAWITEMSTRUCT contains the value of the lParam member of the TCITEM structure. However, if you change the amount of application-defined data per tab, itemData contains the address of the data instead. You can change the amount of application-defined data per tab by using the TCM_SETITEMEXTRA message.
To specify the size of items in a tab control, the parent window must process the WM_MEASUREITEM message. Because all tabs in an owner-drawn tab control are the same size, this message is sent only once. There is no tab control style for owner-drawn tabs of varying size. You can also set the width and height of tabs by using the TCM_SETITEMSIZE message.
Ñ There is only one MP Ð
|
|
|
|
|
see http://www.codeproject.com/combobox/listboxex.asp
|
|
|
|
|
i have to hwndle (HWND) one of parent window and second one is it's child window.
i want to get the child window mid point and rectangle with respect to desktop window and with respect to its parent window as well.
any body can tell how to get it ?
i will be very thank full to u.
r00d0034@yahoo.com
|
|
|
|
|
1st - get the handle of the child window. You can use function GetWindow():
HWND msinWindow = (...)
HWND childWindow;
childWindow = GetWindow(wndHandle, GW_CHILD);
2nd - Get the child window's rectangle (with respect to its parent window ) using GetWindowRect(), like this:
RECT childRectangle;
GetWindowRect(childWindow, &childRectangle);
The childRectangle will 'receives the screen coordinates of the upper-left and lower-right corners of the window' [MSDN].
3rd - use ClientToScreen() function to get the window position with respect to desktop window.
Ñ There is only one MP Ð
|
|
|
|
|
I wrote:
HWND msinWindow = (...)HWND childWindow;childWindow = GetWindow(wndHandle, GW_CHILD);
Sorry, I meant (in 1st):
HWND mainWindow = (...)
HWND childWindow;
childWindow = GetWindow(mainWindow, GW_CHILD);
Ñ There is only one MP Ð
|
|
|
|
|
See in CP C# forum, where you have also posted,
And I swallow a small raisin.
|
|
|
|
|
Hi,
I want to change the wait cursor to an own created animated cursor. How can I do it?
|
|
|
|
|
Add a new cursor resource to your app. See MSDN for SetCursor and LoadImage.
STL is a religeon. Enquiries to Reverend Christian Graus
|
|
|
|
|
error C2065: 'LONG_PTR' : undeclared identifier
I 'm using DirectShow.
Where 'LONG_PTR' is defined.
|
|
|
|
|
It is defined in basetsd.h from Microsoft Platform SDK. You need to install SDK and ensure that SDK include directory is listed before Visul C include directory. You can also define it yourself:
typedef long LONG_PTR, *PLONG_PTR;
|
|
|
|
|
I am building my ActiveX control, when I make one of its properties to disable the drawing of the control (SetRedraw(FALSE)), the properties window is shown when clicking over the control at runtime. How can I solve this problem?
|
|
|
|
|
hi
am trying to take a screen shot of a context menu
tried the alt-print screen combination, but of course the menu closes when i hit the alt key
does anyone have any suggestions?
regards
bryce
|
|
|
|
|
well bugger me, alt-pritnscreen does the top most window and printscreen copies the whole screen
(usign windows 2000)
you learn summat new every day
bryce
|
|
|
|
|
It's worked that way since Win 95
and maybe before that, but I only started using Win with 95.
--Mike--
Just released - RightClick-Encrypt v1.4 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Michael Dunn wrote:
and maybe before that, but I only started using Win with 95.
Yup, worked that way in 3.1 also. I had so much fun, taking a screenshot of the desktop w/ Progman running & making the wallpaper so it looked like Progman was still running even when it was minimized though of course you could see the icon for Progman then so it wasn't all that good of a joke...
... and then i'd reboot into OS/2 & do useful stuff ...
---
Shog9
Actually I use to find learning in bars when drinking really useful.
It sort of makes a language liquid. - Colin Davies, Thinking in English?
|
|
|
|
|
Use print screen alone, and then paintbrush for example. Alt will hide menu.
|
|
|
|
|
hi, i'm new in game dev. i cant make the connection between:
(1) 3D modeling in 3D Studio Max
and
(2) DirectX 3D
any pointer? i can model a spaceship using 3D Studio MAX. But how can i load it into my application...?
thanx!
norm
|
|
|
|
|
The DirectX SDK used to come with a tool called conv3ds.exe that converts .3ds files into .x files for loading in Direct3d. It doesn't seem to exist in the DX8.1SDK, but you can find it on google
--
Help me! I'm turning into a grapefruit!
|
|
|
|