PostMessage() doesn't work while dragging a dialog
-
here is the thing i am using PostMessage() to post several messages to a dialog box from several location this works just fine but when i am holding the dialog - e.g. dragging it - the dialog doesn't feel that a message is being sent i am using PreTranslateMessage() method to filter message so what is wrong with posting message to a dialog that is being hold - dragged - or if there is anything wrong, what is the solution for that thanks alot u guys
-
here is the thing i am using PostMessage() to post several messages to a dialog box from several location this works just fine but when i am holding the dialog - e.g. dragging it - the dialog doesn't feel that a message is being sent i am using PreTranslateMessage() method to filter message so what is wrong with posting message to a dialog that is being hold - dragged - or if there is anything wrong, what is the solution for that thanks alot u guys
The system has probably entered a modal loop, eating all messages except mouse-related ones until the drag operation is complete. You may need to handle the drag yourself - WM_NCLBUTTONDOWN, WM_NCLBUTTONUP, MoveWindow(), etc. That way you can enter your own message loop and check for posted incoming custom messages. Mark
"Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")
-
here is the thing i am using PostMessage() to post several messages to a dialog box from several location this works just fine but when i am holding the dialog - e.g. dragging it - the dialog doesn't feel that a message is being sent i am using PreTranslateMessage() method to filter message so what is wrong with posting message to a dialog that is being hold - dragged - or if there is anything wrong, what is the solution for that thanks alot u guys