News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

WndProc Messages at Startup

Started by dedndave, May 07, 2011, 12:22:56 PM

Previous topic - Next topic

dedndave

i was playing around - somemore   :P
i wanted to make sure that certain parts of my code are not executed until the init stages have completed
for example, i don't want to handle WM_SIZE messages until the variables are in place to do so

i modified my WndProc to record messages in a buffer up to the point that the message loop executes
once the message loop starts, it stops recording and dumps the result to the display

the result is interesting...



hWin is the main client
hTxt is a child window (there are 6 child windows, in all)
i inserted buffer entries at the beginning and end of the WM_CREATE code for the main window (all 0's)
the last message listed is the first message dispatched by the message loop
of course, the results would vary a little from OS to OS   :wink
i am using XP MCE2005 SP3

the attachment is the above PNG image renamed to ZIP

Slugsnack

Most of those are expected. WM_NULL though.. haha

dedndave

i added all WM_NULL messages to the buffer to verify where i was at   :P

the first one, with handle = 0, is inserted into the buffer at the beginning of my WM_CREATE code
the second one, with handle = 0, is inserted into the buffer at the end of my WM_CREATE code
the third one, with handle = hWin, is inserted by using SendMessage, just before the message loop starts
the last message in the list (WM_GETICON) is the first message dispatched by the message loop
after that, buffer "recording" stops, and the results are displayed

when i made that test program, i was using the same WndProc for both hWin and hTxt
since then, i have split them up - it makes for cleaner code

azdps

dedndave i'm curious as to what program you use to compress your attachments. on several of the attachments you attach to posts im unable to decompress and get "no archives found" error. i use winrar usually but to make sure i also used winzip and 7zip in an attempt to decompress your zip files with no luck.

Gunner

The zip in the above post is not a zip file but a png image renamed to zip... it is a board cheat to attach and display images...

dave wrote this as his last line:
Quotethe attachment is the above PNG image renamed to ZIP
~Rob (Gunner)
- IE Zone Editor
- Gunners File Type Editor
http://www.gunnerinc.com

dedndave

that's right - if it does not unzip, open it with a binary editor like HxD
you can see the file markers for PNG, GIF, JPG, BMP files
then, just rename it   :P

http://mh-nexus.de/en/hxd/