What would the best way to be to lock the dialog and or move it back to its original location after it has been relocated with the mouse? Thanks
What would the best way to be to lock the dialog and or move it back to its original location after it has been relocated with the mouse? Thanks
When a user is actually moving a window, the OS sends your processing loop WM_MOVING messages and when the move is complete, a WM_MOVE message. You can process these yourself to do whatever you like.
You can use MoveWindow() to move a window around.
Users tend to move windows because they want to. Windows is designed like that. By changing the behaviour of your windows, your app will not feel like a proper Windows app. People don't like that. You should be really sure you need to do this before trying.
Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.
I do some thing like this,
When the Dlg is created I get the screen coods in a RECT (CRect ect)
Then I stop the user being able to start to move it. By changing the move msg as it passes in the callback.
Code:case WM_MOVING: ((RECT*) lParam)->left= rScreenRect.left; ((RECT*) lParam)->right= rScreenRect.right; ((RECT*) lParam)->top= rScreenRect.top; ((RECT*) lParam)->bottom= rScreenRect.bottom; break;
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
I appreciate the feedback.
Let me see what I can do with it. Thanks