News:

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

General Windows question: using WM_CREATE

Started by NoCforMe, October 09, 2011, 08:00:56 PM

Previous topic - Next topic

dedndave

no - i wrote a program that grabbed them and stuffed the WndProc parameters into a buffer
once the message loop started, i stopped filling the buffer and dumped the list

i have a better way to do this, now
i wrote a program that creates another window
so, you can take the message info from the first window and send it to the second

you see, it is easy to get stuck in an infinite loop if a window displays something everytime it gets a message   :bg
the act of displaying something generates more messages

NoCforMe

Got it. Just out of curiosity, how many messages can you expect an average window to get if you wanted to capture them: dozens? hundreds? thousands? (I'm talking about an inactive window, or at least one not being moved, resized, or with lots of processing going on.

Quoteyou see, it is easy to get stuck in an infinite loop if a window displays something everytime it gets a message   BigGrin
the act of displaying something generates more messages

Right, that would be a recursive infinite loop, which is even worse!

dedndave

it depends on the window, of course

but, i was surprised by how many messages a window receives when you just move the mouse over it - lol
a typical window can be expected to receive a thousand messages rather quickly if it is showing on the desktop
most of these may well be ignored by the WndProc, though

jj2007

Quote from: dedndave on October 10, 2011, 06:44:13 PM
the act of displaying something generates more messages

Not if you send them to the console.

dedndave

what function do you use to send them ?
doesn't it also generate a message   :P

well - you can filter messages out, too
you may not want to see all the messages a window receives because the ones you want to look at get scrolled off pretty quickly

dedndave

oh - btw,
there are programs out there that do this
one is called WinSnoop or something like that
google around and see what you can find

later on, i may throw one together you can play with
i probably deleted the one i am talking about when i was done playing with it
but, i have the program that creates another window (my current ongoing project), and the include file with all the message text
it doesn't take much effort to put the two together

dedndave

here is a little program for you to play with
it is not finished, yet - but is mostly functional   :P

edit the WmFilter.inc file to filter out specific messages
then re-assemble, noting that it is set up for the masm32 folder to be in the root
you can probably edit the include paths in dTest.inc to modify it
you will also need to modify the paths in the batch files
i can see right away that you may want to add WM_SETCURSOR to the filter list - lol