How to see current windows message queue

O

Onur \Xtro\ ER

My form gets a resize message after completing a button click event and I
cant find the source of this resize message.

My button event makes same calls to directx device and resizing or
maximizing the form. Yes these calls can be source of the unknown resize
event but I see my resize event raised at the moment doing these calls in
the button event.

After finishing all calls and resizings in the button event, I get a resize
event, but from where ????

I look to call stack at this resize event, and I cant see and code of mine
raises this event. So I think a line of code in the button event creates a
resize message in the message queue for processing it in the App.DoEvents
call. not in the button event. And this message waits the current button
click message ending.

I will give a code example :

method MyForm.ButtonClick // this is the event method of my button
[
// in this event, we make lots of calls

backup form's size (*)

reset directx device

restore form's size (*)

....
// I think one line of code in this event, adds a resize event to
message queue to process later
]

method MyForm.Resize // resize event
[
// this event raised at the moment of running (*) lines
some code...
]

after completing the button event and before returning to normal program
loop, I get an extra resize event :( :(

so, I need to see all stored messages in message queue when I process my
button event. for example, I will print the current message queue status to
console line by line in the button event. I really need to see which line of
code adds the f..king extra resize event to the queue.

pls help me, how can I get the current windows message queue status to print
to console
 
G

Guest

Visual studio has a tool called "spy++" this may help you find your mistery
resize event source.

But I think it would be when you are doing your resize.
(restore form size).
One way to check this particular problem would be to remove the restore form
size from the code temporaraly and see if you get the extra resize event.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top