|
nope. doesnt find it. tested on multiple systems (so its not my machine that is f.. up).
even compiled on various machines.
int x=1, y=5;
x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
|
True. Anyway tests show that in our case at least it works under NT4 SP6+. But not more with any following version.
Time to update Win32 SDK documentation on resources? Looks like.
int x=1, y=5; x^=y^=x^=y;
<a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
|
I am using MSFlexGridControl(MSVisual C++) in a dialog based application. I want to make some cells in MSFlexGridControl editable on my wish. Can anybody tell me how can I do it?
Ravi
|
|
|
|
|
hello
my problem is this: i build a release build and it compiles nicely
i then run my release build from within devstudio and outside of devstudio
without any changes to the code or the linkage etc settings
however, the one which is run inside of devstudio behaves correctly
and the one runoutside of devstudio doesnt behave itself properly (parsing data problems)
my question is...what the heck might be going on? its not a debug issue as i'm not running debug mode in either of them
does anyone have any thoughts?
regards
Bryce
|
|
|
|
|
Looks like uninitialized data. Can you check your program under BoundsChecker or Purify?
Tomasz Sowinski -- http://www.shooltz.com
Free your mind and your ass will follow.
|
|
|
|
|
if it were that then surely the problem would surface wheni run the release build in the debuggerer ? as i've told it not to generate debug info etc
Bryce
|
|
|
|
|
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
|
|
|
|