parths wrote: I had tried GetMessage, but then it doesn't return till it gets a message (any message) (right?), and that's a problem too because then I can't continue processing until I get a message. So I'll have to keep sending dummy messages to the app. Not necessarily. Modify the message loop so it uses PeekMessage() instead of GetMessage() and do the processing after the PeekMessage() handling:
Do While True
If PeekMessage(msg, 0, 0, 0, PM_REMOVE) = True Then
If msg.message = MY_MESSAGE Then
ExitProcess 0
Else
TranslateMessage msg
DispatchMessage msg
End If
End If
' Do your processing here
Loop
Ryan Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"