Avoid a Dlg Box from being drag? How?
Why do you want this behavior? Anything that deviates from what is expected will piss off users, so an immobile dialog box is probably not something you should stive for without a real good reason.
CM
CM
Windows send a WM_MOVE message when they are moved. Just move the window to the deisred position whenever it gets moved.
I would suggest a slight alteration to smack0007's idea. Instead of moving back just return that you handled the move and dont' do anything. Making sure not to pass on the move message of course.
You'll also want to do something similar for the sizeing messages.
Cheers
Chris
You'll also want to do something similar for the sizeing messages.
Cheers
Chris
You want the WM_MOVING message. You can set the coordinates of the drag box in that message, so just set it to the current location of the dialog and they should just see an undraggable outline (if they have the 'show contents while dragging' turned of, otherwise the window just won't move I think).
You could do all those things with WM_MOVE, or create a Dialog box without a title bar... just as a POPUPWINDOW.
I like the no title bar idea better than my original idea. That way you couldn't drag it period.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement