View Single Post
Old Jan 26th, 2008, 5:45 PM   #6
Ancient Dragon
PFO God In Training
 
Ancient Dragon's Avatar
 
Join Date: Jun 2005
Location: near St Louis, MO. (USA)
Posts: 532
Rep Power: 4 Ancient Dragon is on a distinguished road
Re: Timers and hooks -

Quote:
:suprised: Harsh...
Oh so you don't think so ??? But don't feel too bad, I've written some crappy code too

line 2: why are you using numbers like that in the switch statement instead of the pre-defined macros from windows.h? It might work for now, but there is no guarentee those values won't change in the future.

line 9: why are you deleting the same menu multiple times? The first parameter is supposed to be HWND, don't know what WindowList is, but its value never changes inside that loop. Its possible that is whats producing the problem -

line 19: remove the & from in front of WinProc. Functions are always passed by reference so the & symbol is not needed.

line 20: what is the value of WndList.size() at that point? Answer: 0 because it was emptied on line 15. Consequently lines 23 and 24 will never get executed.
Ancient Dragon is offline   Reply With Quote