PDA

View Full Version : Windows Message procedure



keziah23li98
02-15-2003, 04:09 AM
Hi,

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?

Thank's

keziah

shinpaughp
02-15-2003, 12:12 PM
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.

keziah23li98
02-16-2003, 11:37 PM
Thank's for your answer shinpaughp.

kez