|
No, it will not show up. Because your app still used different memory locations. (see my other post).
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
No - the problem is that some of your variable may contain *random* bits. Sometimes these bit patters will not cause immediate damage - this may be the case when you run under debugger.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
hmm purify falls over
|
|
|
|
|
If Purify crashes when run from VC IDE, use standalone version.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
still fell over
|
|
|
|
|
You mean that you can't run Purify on your machine, right? Which VC/Windows/Purify versions are you using?
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
vc 6
purify version 2000.02.10 build 2126
bryce
|
|
|
|
|
Are you using Windows XP? Then maybe upgrade to 2002.05 will help.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
|
It seems you have to contact Rational tech support.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
As Tomasz Sowinski said, it might be 'uninitialized data'. Reason: if VStudio is running your application will most probably be loaded into another adress space and occupy other areas of memory which might contain garbage.
Just look out for things like allocated string memory which isnt cleaned before strcat'ing or other usages of string memory.
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
Andreas Saurwein wrote:
Just look out for things like allocated string memory which isnt cleaned before strcat'ing or other usages of string memory.
Hey, we live in XXI century! Nobody's using strcat anymore
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
XXI? what the hell is that? Never heard of
And dont tell me that I should not use my cat anymore.
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
Andreas Saurwein wrote:
And dont tell me that I should not use my cat anymore.
Use your cat, but don't exploit it
BTW: the email you're using for CP response notifications bounces.
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
Tomasz Sowinski wrote:
BTW: the email you're using for CP response notifications bounces.
I noticed that. But it does so only for mails coming from codeproject. Any other source works fine. I get the notice that the received header contains a known spam source (codeproject.com ? ). Seriously, I think that its comming from the psi.ca mailserver.
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
Hi,
i've made a menu with a few items. The called handlers are in "MainFrm.cpp" as On... implemented. So far so good...
BUT when the focus is on an control in a sdi view of the main program i can't
get the event. My Program does nothing when i click on the menuitem.
How can my control get informed, when a menuitem event is fired ?
Marco
|
|
|
|
|
Are you awating the event in the CMainFrame::On... while the control has focus, or in the control itself (C?Control::On...)?
Is'nt the message trapped in the CMainFrame::On..., while You are awaiting it in the control?
The menu generates WM_COMMAND message which is send to the application message main message handling loop. The handler for the message is then searched in the main window, if not found in it, the handler is searched in the child window with focus and so on.
Sonork 100.15206;PavelK
|
|
|
|
|
Hi,
the message handler code is in CMainFrame, but it is not called if the focus is at the control. The menuitem code CMainFrame::On... should work at the whole application, independently which control the focus has.
Marco
|
|
|
|
|
You are right. Can't figure where the problem can be .
Is the control a standard one?
Sonork 100.15206;PavelK
|
|
|
|
|
Hmm,
yes these are all standard controls.
Marco
|
|
|
|
|
The project I'm working on is quite big now, but I don't think it's messed up too much
What's happen? Some weeks ago this situation started: everytime I add a CEdit or any other item to a CDialog based class, I have to "Rebuild All" the project because the compiler tells me that it can't find "IDC_XXX" identifier.
Can anyone help me?
Thanks in advance.
|
|
|
|
|
The compiler doesn't know that the resource.h file has been updated. I used to have this problem when I included resource.h via the stdafx.h header file.
Michael
Time flies like an arrow. Fruit flies like a banana
|
|
|
|
|
Just add the resource.h file only to the .cpp files where you actually need any ID defined in this file. Never ever put the resource.h into your stdafx.h, as convenient as it may seem.
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
Thanks!
There was an heaeder in "stdafx.h" that included an header that included an header tht included "resource.h"
|
|
|
|
|
I am writting a Win32-DLL, in resources a define a string-table to store all my messages i will use with AfxMessage().
When I use the DLL in a test application, it uses the string-table of the program not of the DLL-resouces, displaying not desired messages.
What can I do ?
Thanks a lot !
|
|
|
|