Exiting with Code 18???

Started by
4 comments, last by reaptide 22 years, 2 months ago
Hello everyone, I have a little problem with the windows code of my OpenGL app. I am using a slightly modified version of Nehe''s OpenGL Lesson #1, and whenever I press the ALT key the program emmediatly exits with code 18 (0x12). Normally it exits with code 0 whenevr I press ESC, as it should. I was just wondering if anyone knew what code 18 means. My search of MSDN has proved futile.
Advertisement
Don''t have time to verify, but this certainly means that there''s a call to either PostQuitMessage(18) or that your code is simply returning 18 at the end of the program (or wherever the error occurs). Anyway, just search for the number 18. I''m almost sure that''s not defined by MS but that it''s an error code programmed into your application by someone.

Later,
ZE.

//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

[if you have a link proposal, email me.]

[twitter]warrenm[/twitter]

I don't think that is what is going on. What I basically have is an empty Win32 framework. All it does is display a window.

What I am more conerned about is the fact my program closes when I press the ALT key. I don't have any code in there to close on an ALT key press.

Something fishy is going on here, concidering the fact that I have use this same base code dozens of times with out a single problem, and taking a look back at earlier programs shows that it is almost identical to them.

Thanks for the help though, I appritiate it.

Edited by - Reaptide on February 14, 2002 9:08:08 AM
quote:Original post by reaptide
I am using a slightly modified version of Nehe''s OpenGL Lesson #1


what part of it did u modify? maybe thats causing the problem, look at the original code and look for any inconsistantcies that may be responsible for the error



,Matt

-= kill one your a murderer, kill thousands your a conquerer =-
-= kill one you're a murderer, kill thousands you're a conquerer =-
Does the program quit out with either of the ALT keys or does it have to be a specific one?

Without more info i''d say that youve probably got a keycode wrong somewhere (you do quit when you press Escape or something don''t you?). Try searching for the ALT key''s ascii codes, you''ll probably find that one of them is 18.

zipless

/* Ignorance is bliss, then you go and spoil it by learning stuff */
/* Ignorance is bliss, then you go and spoil it by learning stuff */
Hmm, this has become even wierder.
Not having made any changes to the code since the problem popped up, and not having recompiled at all, the problem seems to have gone away.

Guess it was just a strange freak occurance or windows misbehaving.

As for the changes I made to Nehe''s Code. All I basically did was force the OpenGL window to Fullscreen mode all the time by removing the part that asks if you want to use fullscreen mode or not. As well I removed all keyboard handling. The program doesn''t have any keyboard related code in it.. No KEYUP or KEYDOWN messages or GetAsyncKeyState stuff. I was going to be implementing Direct Input later.

This topic is closed to new replies.

Advertisement