Hi all,
I am sure I am missing something really obvious here BUT..
I want to open file using CreateFile.
If it does not exist I want to create it and write to it...
If it already exists, I want to append to it.
To this end, I used...
I have written a simple MFC application.
Up until now I have been hard coding a lot of information in the code.
I know need to set up a configuration file that will hold values for everything from listbox contents to values for single variables.
A bit like an ini file I believe.
Can anyone tell...
Thanks for reply - cause was a number of variables not initialised . The debugger was initialising them by default and spoiling me !!!
Lesson learned !
I am using Microsoft Visual Studio 6.0 to build a “simple” C++ application.
Basically, in the dialog box, the user should :
·select an item from a list box
·click on a button
·some processing is done by the application
·the dialog is updated and some text should appear in an edit box that forms...
Hi,
I am using Microsoft Visual C++ and I want to declare a variable and initialise it to zero the first time a function is called.
To this end I created a condition to check if it the first time through.
I tried to do the following:
if(first)
{
int j=0;
}
I then go on to use j BUT the...
I am trying to open a Com port using the following Code:
CComPort aCD;
aCD.m_hComm=CreateFile(aCD.m_cgzPort,GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL);
Unfortunately, something is going wrong and it is failing to open.
I am using GetLastError to find out what is going wrong and...
Excellent guys ...thanks a million !
You don't know how many hours I have spent on such a little problem !!
"\r\n" works....
"\n\r" gives the funny characters.
Thanks for response but unfortunately this doesn't work either.
\n gives one funny character at the end of the text.
\n\r gives two funny characters and still no new line !!
It seems a bit quirky !!
Sorry - didn't see this thread and have raised another one on the same issue.
I have tried all the obvious things (\n\r etc)
I assume the funny character you are getting is the same ....a bit like a | but in bold ??
Hi,
I want to display several lines of text in a multiline
edit box. Eachline is displayed when an element of a
list box is double clicked.
The text is being put into the associated variable in a switch
about in the following way
......m_output = "ok - print this out \n";
The text is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.