View Full Version : Windows Message procedure
02-15-2003, 03:09 AM
I'm beginning programmation under windows and i don't really understand the windows message procedure. I wrote a programm where there is several windows. Can I have several message procedure? If so, how i use the main Loop?
02-15-2003, 11:12 AM
Yes, each type of window can and probably should have its own message procedure. If they are the same type, they should use the same. Messages are first routed to the window owning the message so to speak. If it doesn't handle it, it goes up to the next level for handling, and so on until it goes up to the system and it will usually ignore it and removes it. The main loop does not need to be changed, usually, though you could use PeekMessage instead of GetMessage, but it depends on your needs. And, you can add code in the while loop for processing to be done outside of the windows messaging loop.
02-16-2003, 10:37 PM
Thank's for your answer shinpaughp.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.