|
Hi,
Thanks for the response.
The error occurrs on the AddFilter line, the PVxx.h you can delete, I am not using it in the filter.
I was just fooling around with things trying to get it to work.
|
|
|
|
|
hello everyone,
i am trying to save some files and folders onto a FTP server. i can successfully create the tree structure of the files and folders onto an FTP running Windows. but the operation fails when i try to save the same tree structure onto an FTP server running Linux on it.
may be the CFtpConnection:: CreateDirectory() function works only on the FTP servers running windows Operation System on it, is it??? i am not sure. can anyone please help me.
Thanks..
vijay.
|
|
|
|
|
vijay7173 wrote: FTP server running Linux on it
There's your problem right there
Seriously, though, are you getting an error returned from CreateDirectory()?
Are you specifying a correct/appropriate path?
|
|
|
|
|
Mark Salsbery wrote: are you getting an error returned from CreateDirectory()?
yes sir.the CreateDirectory() returns 0. more over it returns with an error code of 12003 and i am not able to make out what exactly the error is about.
Mark Salsbery wrote: Are you specifying a correct/appropriate path?
yes, i am giving the correct path. the problem is that, i am sometimes successful in saving the tree to the FTP server with Linux running on it. but the Hierarchy is not preserved. i.e, the entire tree is saved at a same level. eg: a file with path, say, /root/folder1/folder2 the directory folder2 is created and saved under root folder, where as it should be saved in folder1 (which is in turn saved under root ). i have checked the path and i am sure that i am giving the right path. i even made sure to see that the path is not modified in between.
can i know what i should do to make my tree save to be saved onto the FTP server with Linux on it??? I am using the member functions of CFtpConnection class. should i use any alternatives(if there are any)??
vijay.
|
|
|
|
|
vijay7173 wrote: more over it returns with an error code of 12003 and i am not able to make out what exactly the error is about.
INFO: WinInet Error Codes (12001 through 12156)[^]
12003 ERROR_INTERNET_EXTENDED_ERROR
An extended error was returned from the server. This is
typically a string or buffer containing a verbose error
message. Call InternetGetLastResponseInfo to retrieve the
error text.
What is the current directory (use CFtpConnection::GetCurrentDirectory()) before you try to create
a directory?
|
|
|
|
|
Mark Salsbery wrote: What is the current directory (use CFtpConnection::GetCurrentDirectory()) before you try to create
a directory?
well sir, the server connected me to the Root Directory (i.e, '/'). and every time i use CFtpConnection::SetCurrentDirectory() to set the directory when i am supposed change it.
vijay.
|
|
|
|
|
Hmmm I don't know.
Can you post the code you use?
Have you tried InternetGetLastResponseInfo() to see if there's a meaningful error message?
|
|
|
|
|
I have a char array like the prevois one, ( char data[64] = "101...........)
but now i need to convert all of that char array into a normal mfc CString, without the char ender ofcourse.
How is this easily done?
ive played with strcpy, but couldnt get it to work,
thanks!!!!
/Johannes
|
|
|
|
|
Johpoke wrote: without the char ender ofcourse
If it's a non-Unicode build you can use
CString str = data;
For a unicode build you can use
TCHAR data[64] = "101...........";
CString str = data;
For a unicode build where the string must stay a char type you can use
char data[64] = "101...........";
CStringA str = data;
For a unicode build where the data must stay a char type but the CString is UNICODE you can use
char data[64] = "101...........";
CString str = CA2T(data);
|
|
|
|
|
Thanks, its fixed,
and yet another problem, with my char array, i now need to set it, but it doesnt seem to work, ie.
char data[64];
data = "011111....";
[im feeding it the right amount of char
any ideas?
thanks
/Johannes
|
|
|
|
|
Johpoke wrote: im feeding it the right amount of char
Are you saying there's 64 characters in your initialization string? If so then that's bad
You need to have room for the NULL terminator. If you need 64 chars then define your data
variable to a length of 65.
|
|
|
|
|
yea i know about the end part the /0 or if its a \0 but i use 63 of them, 64 with that, but i just need to be able to set all of it like
data = "10100010.....
its probably something simple im forgetting as usual-..
thanks
/Johannes
|
|
|
|
|
Johpoke wrote: its probably something simple im forgetting as usual-..
Instead of
char data[64];
data = "011111....";
try
char data[64] = "011111....";
or
char data[64];
strcpy(data, "011111....");
|
|
|
|
|
Johpoke wrote: char data[64];
data = "011111....";
You might like to modify it to ,
char data[64] = {0};
data = "011111....";
|
|
|
|
|
Hi All ,
i am woking in a SDI based MFC(VC++) application, i want to know that how can i make my application to adjust main frame window as the screen resolution changes from 1024X768 to 800X600 or any other?
Currently, as soon as my screen resolution changes to 800X600 my main frame window gets out of the screen and is no more visible entirely.
Please provide me with any solution.
thanx all
Aamir
Aamir Zia
|
|
|
|
|
You could resize your main frame window in response to a WM_DISPLAYCHANGE message.
Mark
|
|
|
|
|
Consider also messages WM_SETTINGCHANGE and WM_WININICHANGE.
|
|
|
|
|
Greetings,
I have some text that I want to print to a CView. However, instead of just having it print to the end of the view (horizontally), I need it to print within a certain area (i.e. a box/rectangle/area of the CView 300 pixels wide by 500 pixels high). How do I print out the text so that it wraps properly and perhaps even justify it within a rectangular part of the CView?
Thanks,
BP
|
|
|
|
|
It sounds like you need to call ‘DrawText’ or ‘DrawTextEx’ as it was designed for that purpose.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Thanks, I will go check it out.
|
|
|
|
|
I agree with Mr John R. Shaw It seems DrawTextEx is helpfuls
|
|
|
|
|
Thanks, I will go check it out.
|
|
|
|
|
Hello,
The check boxes provided in the resource editor are pretty, but I would like to create check boxes without using the resource editor (dynamically). How do I do this? Any help is appreciated.
|
|
|
|
|
Need to use CButton class with BS_CHECKBOX style .
e.g.
m_Button.Create(_T("Check Box"), WS_CHILD |WS_VISIBLE|BS_CHECKBOX,
CRect(10,10,100,30), pParentWnd, 1);
|
|
|
|
|
Hello,
I put the following code into CPrintOptionsDlg::OnInitDialog()
CButton m_Button;
// Create check box.
m_Button.Create(_T("Check Box"), WS_CHILD |WS_VISIBLE|BS_CHECKBOX,
CRect(0,0,10,30), this, 1);
However, I didn't see the check box. Any ideas? My CPrintOptionsDlg class is derived from CDialog.
|
|
|
|