|
the variables are only updated when you call UpdataData.
-c
A conclusion is simply the place where someone got tired of thinking.
|
|
|
|
|
How Locate the error when meet the leak as follow?
/////////////////
Detected memory leaks!
Dumping objects ->
{46} client block at 0x009C2590, subtype 0, 100 bytes long.
a CWnd object at $009C2590, 100 bytes long
Object dump complete.
The thread 0x244 has exited with code 0 (0x0).
//////////////////////
thanks in advance!!
|
|
|
|
|
how do u get those wonderful information?
includeh10
|
|
|
|
|
it's in the VC debugger's output window
A conclusion is simply the place where someone got tired of thinking.
|
|
|
|
|
|
1. find out where you allocated a CWnd.
2. determine where you can it.
3. delete it.
-c
A conclusion is simply the place where someone got tired of thinking.
|
|
|
|
|
If there is a method to tell which CWnd is not delete?
thanks!
|
|
|
|
|
Look at default c++ files generated by Visual C++, they usually/always have a few preprocessor lines at the beginning that enable additional debugging info, as well as leak information; if it's defined, the leak is identified, with the code line where the allocation was made.
Max.
|
|
|
|
|
Since you've already got that intel, I think you may have seen Detecting and Isolating Memory Leaks Using Microsoft Visual C++[^].
Further in that article, there's a section called Comparing Memory States. If you suspect code that's leaking, wrap it with a call to checkpoint the memory before, and after, then compare. The article gives an example.
|
|
|
|
|
Has anyone gotten the last paramter to LoadImage LR_TRANSPARENT to work? I myself have not...(image loads but with the white background that clashes with the window). Can anyone help me on this?
|
|
|
|
|
if your talking about LR_LOADTRANSPARENT here is perhaps the answer.
First of all LR_LOADTRANSPARENT does not load transparent image. it replace the first color by COLOR_WINDOW. COLOR_WINDOW is the backgroud color of edit,combobox... by defaut it's white. To change this color by another, you need to replace this color in your window theme.
The second problem is that LR_LOADTRANSPARENT works only with 8bpp images.
The easyest way to use real transparent images is to use CommonControls ImageList.
If you only want to replace one backgroud color by another CommonControls CreateMappedBitmap is perhaps a best solution.
Dimitri Rochette
|
|
|
|
|
i explain:
click a .cpp file, if VC was installed, then VC pops up and displays the .cpp. if borland was installed ...
so, .cpp file is related VC or Borland.
if i develop a nodepad, how do i make .cpp etc related to my application? i guess it is something in register but ...?
thx
includeh10
|
|
|
|
|
Dunno if it is the correct key, but you might try HKEY_CLASSES_ROOT\cppfile\shell\&Open with MSDev
modified 12-Sep-18 21:01pm.
|
|
|
|
|
thx, that is right i think.
i.e. in .java i found "JCreator.java", but why jcreate.java, not jcreate.exe?
there should be more. i.e. i click my.txt (if it is related to MyApp.exe), how system passes the file name "my.txt" to MyApp.exe, from command line?
includeh10
|
|
|
|
|
First you'll need to come up with a "document name".
Something like MyFunkyAppDocType or whatever. Then
create a key under HKEY_CLASSES_ROOT by that name.
Under that key create keys Shell\open\command.
Set the default value to the command line to open
the document type. e.g. "C:\Program Files\MyFunkyApp %1"
Next, under HKEY_CLASSES_ROOT you'll see all the extensions
with associations. Just place the extension you want
associated there as a new key, and set the default value
to your document name.
But don't step on other associations without ok from the user.
i.e. check that your document name is unique. check that
the association is free or the user is willing to allow you
to overwrite it.
|
|
|
|
|
there is not WS_SYSMENU in my dialog,and the dialog app have no system icon and system menu.
how can i set the system icon or system menu?
and SetIcon() can not work.
please help me.
|
|
|
|
|
If you made this dialog in the resource editor then you have a choice of system menu which you can add.
|
|
|
|
|
|
Hi, everyone!
I have read some books about VC network programming, but in
them there are only basic samples (just to show the usage of API).
I want to know where can I get some sample codes of some more practical
samples? I want to learn socket programming.
Where can I get the codes and related explanations?
Cheers,
George
|
|
|
|
|
Try this link...there are many sample winsock apps out there, I was searching for them a few weeks ago and found hundreds of them...here is a good starting point though: http://tangentsoft.net/wskfaq/ Go to Yahoo and search winsock you will see what I am talking about.
|
|
|
|
|
Thanks, georgiek50 pal!
It is a very nice site!
Cheers,
George
|
|
|
|
|
What Windows network programming books did you read? I recommend Network Programming for Microsoft Windows, Second Edition by Anthony Jones and Jim Ohmund.
CodeProject has a network programming section with very good examples.
http://www.codeproject.com/internet/
Kuphryn
|
|
|
|
|
Thanks, Kuphryn pal!
Your recommendation is very nice!
Cheers,
George
|
|
|
|
|
When I debug my program, it says something like thread so-and-so has exited with code ######. There aren't any memory leaks but I don't know what the exit code means. Is there a list somewhere of what the codes are or does it really not tell you anything?
There's always one more bug.
|
|
|
|
|
Hi
Is there anyway to get accelerators working on a pure dialog application..
I've seen some notes about hooking into the message process but no examples of it..
I'm not using MFC.
Cheers
Chris
|
|
|
|