|
Hello,
I use the following funktion to write log info into a write protected CEdit window for debuging purposes:
void CMyprogDlg::log(LPCTSTR lpszText)
{
long iBegin, iEnd;
CString time;
CString msg;
time = m_CTime_time.Format("%d.%m %H:%M:%S");
msg.Format("[%s] %s", time, lpszText);
iBegin = m_CEdit_log.LineIndex(-1);
iEnd = iBegin + m_CEdit_log.LineLength(iBegin);
m_CEdit_log.SetSel(iBegin, iEnd);
m_CEdit_log.ReplaceSel(msg);
}
for example :
log("blablabla\r\n");
It works well and i'm using it in alot of programs instead of stdout.
The problems is that when i'm trying to put a lot text lines in the window, after a few hundred lines, the function doesn't work as supposed anymore. Instead of creating new lines, the new text replaces the last line.
I'll be very greatfull for any help!
Best Regards,
im79
|
|
|
|
|
Edit controls do have an upper limit (64KB comes to kind). Try this instead.
"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
|
|
|
|
|
You can use RichEdit control to over come this drawback of CEdit control.
|
|
|
|
|
|
Is it possible to disable a network connection and if so how?
|
|
|
|
|
|
Hmm but I need it in a program not a script.
|
|
|
|
|
The WMI classes can be used in code, script, or otherwise.
"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
|
|
|
|
|
Sorry, Yes I have seen it now he hehehe.
Thanks for the help.
|
|
|
|
|
It seems your problem solved.
|
|
|
|
|
In Debug mode it's plotting graph but in release mode does not,
wt might be the reason??
Thanks..
|
|
|
|
|
Do you check that the variables that are being used by you are being initialized properly. A variable may have a different value in the release and in the debug build, causing the differing behavior. And if you go back and see where the value of that variable is set, you will most probably find out that it isn't: You simply forgot to initialize that variable. The reason why the debug build seemed to work is that the debug version of the runtime library initializes dynamic memory and stack variables to known values (in order to track down memory allocation and overwrite errors), while the release version of the runtime library doesn't.
This could very well be just one of the many possible reasons....
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
abhijit bhopale wrote: wt might be the reason??
Not reading this article.
"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
|
|
|
|
|
Hi everybody,
in which way is it possible to send messages to a process on another computer
over network and internet?
Is it possible to get the STD_OUTPUT_HANDLE of these process on another maschine? I don't think so
I think the easiest way to send the output from a console-application over network is to send each
caracter or caracter-array and the opposide maschine works like a Client and displays those caracters on the screen, or?
Big thanks for suggestions
|
|
|
|
|
baerten wrote: in which way is it possible to send messages to a process on another computer
over network and internet?
In most cases, all of them[^].
|
|
|
|
|
my actual problem is that my computer monitor is 15 inches when i develop any application with 1024 * 768 resolution and again resize the pixels to 800 * 600 the dialog box goes out of screen how can i solve this problem
malik
|
|
|
|
|
|
You can make the dialog resizable and with scrollbars (it's a dialog style), but then you have also to handle scrolling by repositioning the controls according to the thumbs positions.
Anyway, if you have large "dialogs" you've probably created a wrong metaphor in the user interface.
Good dialogs shouldn't be wider than about 600 x 400 (otherwise they must be prepared to handle scrolling and zooming).
So consider the idea to break your dialog in multiple "pages" using tabbed dialog pages.
It will probably end in a better usability than a scrollable dialog.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
I wrote an article which also handles this problem: http://www.codeproject.com/useritems/Multimonitor.asp
Look for the message-handler for WM_DISPLAYCHANGE.
Greetings from Germany
|
|
|
|
|
can any body reply me
malik
|
|
|
|
|
there is certainly technique to delete a non system file, which i used some years ago. i can recall and reply you soon.
but temporarily, i can suggest you to simply create the file and close the file such that the data will be lost.
will it be sufficient for you?
|
|
|
|
|
rajneshmalik wrote: how can i delete file after reading from any directory
Using MFC,have a look at CFile::Remove()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Does SHFileOperation helpful?
|
|
|
|
|
rajneshmalik wrote: can any body reply me
yes i can... hello
|
|
|
|
|
Its for start to reply
|
|
|
|