|
how to upload a text file on server using "PutFile" function of CFtpConnection class, i am using following syntax but it is not working-
CFtpConnection *m_pFtpConnection;
CInternetSession oSession;
m_pFtpConnection = oSession.GetFtpConnection("ftp site name",
"username","password",INTERNET_INVALID_PORT_NUMBER);
BOOL bText = m_pFtpConnection->PutFile("test.txt",
strServerLocation,FTP_TRANSFER_TYPE_BINARY,1);
can anybody plz tell how to do it?
Thanks & Regards,
Anay Kulkarni
|
|
|
|
|
use GetLastError() API to find out the exact reason for the failure.
Do your Duty and Don't expect the Result
|
|
|
|
|
What was return value of PutFile?
|
|
|
|
|
try a passive connection.
m_pFtpConnection = oSession.GetFtpConnection("ftp site name","username","password",INTERNET_INVALID_PORT_NUMBER, TRUE);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
HELLO,
We have tried creating singleton class. the code is as follows
class singleton
{
private:
static singleton * single;
singleton()
{
}
public:
static singleton* getinstance();
};
singleton* singleton :: getinstance()
{
if(NULL==single)
single = new singleton();
return single;
}
main()
{
singleton *obj_singelton;
obj_singleton = singleton::getinstance();
}
for this we are getting the following linker error
undefined symbol singleton::single.
|
|
|
|
|
Shraddha Gautam wrote: for this we are getting the following linker error
undefined symbol singleton::single
You have to initialize the static member outside the class declaration as,
singleton* singleton::single = NULL;
And if your application is multithreaded then you have to use some locking mechanism or if you sure that this singleton instance will be needed from the application start time then modify the initilization as,
singleton* singleton::single = new singleton;
Do your Duty and Don't expect the Result
|
|
|
|
|
Thanks.
We tried using that but it is creating two objects. Our application is not a multithreading.plz let know what has to be done.
|
|
|
|
|
I need your help.
I am developping one application in VC++6.0 using MFC. The
Main Frame Window is divided into 2 using CreateStatic
function of CSplitterWnd Class , upon one of which a
Runtime Class namely CErrMsgView (Base Class CScrollView)
is being attched. The other one, ( is again sub-divided
into 2 with CreateStatic. Again it is being attached with
2 Run Time classes namely CMainView and CStatView (Base
Class CFormView) respectively.
The CErrMsgView Class is meant to capture all the Messages
being transferred to and fro. I would like to add an
option under the View Menu Heading "Show/Hide ErrMsg
View". The Clck on which alternately Show or hide the
ErrMsgView. Would You Please Help Me Out.
Atleast give some Hints. Whether SetCheck will do the
required function/ But How? How can I Use Set Check on a
Splitter Window Class Member? Neither ShowWindow() or
GetStyle '&' - ing with WS_VISIBLE and assigning with '0'
is not possible here as with Cwnd Class?
Please do show me the way of implementation.
Thank You and Best Regards.
Soumen Biswas
|
|
|
|
|
A resizing docking control bar would be more direct and to the point and possibly easier to maintain as your project grows than splitter windows. At least if you desire the ability to change where it's docked and hiding/showing and even detaching it and floating it.
Resizeable docking control bar[^]
|
|
|
|
|
Indeed it's a nice tool in VC++. Thanks to bob16972 for providing me the link info. I've utilised the suggestions in getting a dockable bar in my application. But I could not able to implement the to and fro Error Message passing both from Transmit and Receive ends.
I am developping one application in VC++ ver-6.0 using MFC. The Main Frame Window is divided into 2 using CreateStatic function of CSplitterWnd Class , upon one of which a Runtime Class namely CErrMsgView (Base Class CScrollView) is being attched. The other one, ( is again sub-divided into 2 with CreateStatic. Again it is being attached with 2 Run Time classes namely CMainView and CStatView (Base Class CFormView) respectively.
The CErrMsgView Class is meant to capture all the Messages being transferred to and fro. I would like to add an option under the View Menu Heading "Show/Hide ErrMsg View". The Clck on which alternately Show or hide the ErrMsgView. Would You Please Help Me Out.
.
Initially in my application, I have used a Run Time Class ClogView derived from CScrollView and mapped to one SplitterWindow in CMainFrame control all the messaging in my application.
Can You Please tell me how to map the MyBar docked control bar to use as a error message viewer.
Thank You and Best Regards.
Soumen Biswas
Soumen Biswas.
|
|
|
|
|
I have a iPod player.
It use MPEG-4 standard video files.I know the files should be code using ACC audio,xvid video standard.
I want to read the files's infomation.
Somebody would like to tell me how to do such work or give me a guide?
Thanks.
GOOD LUCK
|
|
|
|
|
Did you try with MCI functions Im not sure they workwith Mpeg-4 or no.
|
|
|
|
|
No,I have no idea of such task.
How should I read the infomation from the Mpeg-4 files? I only want to read the track info.
Thank you very much.
Best wishes.
|
|
|
|
|
kcynic wrote: It use MPEG-4 standard video files.
If you know the format of such, just read them like you would any other file.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
But,I do not know the format.
There is no information about that in my hands.
Thank you very much.
|
|
|
|
|
kcynic wrote: But,I do not know the format.
There is no information about that in my hands.
Try here and here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I have created a custom control which, upon a mouse click, should display a dialog showing some info about what was clicked.
I need this dialog to have a semi-modal style. IE I want the user to be able to click the custom control and have the dialog update it's display, but not allow the user to click outside of the control unless the dialog is first closed.
How could I achieve this?
Waldermort
|
|
|
|
|
If you are creating the window modeless using Create and disabling all the controls except the special controls, I think it is possible... Or could you please explain a little more?
- NS -
|
|
|
|
|
Disabling controls of the parent window from within a child window is a little too complicated. I had an idea though, since my control displays a dialog on a mouse click, this means it must have the keyboard focus. I could display a modeless dialog and destroy it whenever a WM_KILLFOCUS is processed.
Waldermort
|
|
|
|
|
That's nice. But what if the user clicks in another application and again come to yours?
- NS -
|
|
|
|
|
Then they would have to click in my custom control again.
I could do a comparison of the new window against the main application and it's children, but the first method is easiest to implement at this stage. We will see how it pans out.
Waldermort
|
|
|
|
|
Well today I finaly get around to adding the code for the dialog and was hit with something quite unexpected.
Setting the parent member of CreateDialogParam() to my custom control, gives me exactly what I wanted. The main window is effectivly unclickable, while the control, dialog and all other applications remain unaffected.
Finally, MS got something right.
Waldermort
|
|
|
|
|
i am doing a programm such that, i have created a text file through CFile and i am writing some text in it through "Write" function of CFile, i want to add a new line character after every line but getting some different result when i check the text file after writting the data. My code and result i am getting is as follows,
CFile oFile;
if(!oFile.Open("test.txt",CFile::modeCreate | CFile::modeNoTruncate | CFile::modeWrite))
{
AfxMessageBox("Sorry! text file can't be created");
}
else
{
for(int i=0;i<3;i++)
{
oFile.Write("code project",sizeof("code project"));
oFile.Write("\n",1);
}
}
Results=
code project || code project || code project ||
can anybody help me plz, how to do it?
Thanks & Regards,
Anay Kulkarni
|
|
|
|
|
|
Well, that will print exactly this in the file: "\n".
|
|
|
|