Board index » cppbuilder » Want to Make a form unmovable
Want to Make a form unmovable
2003-12-19 01:36:52 AM
I have a need to make a form that cannot have its position changed.
I have tried using a MessageMap for the WM_WINDOWPOSChanging message and was
successful using SWP_NOMOVE flag.
The problem I am experiencing is that I have MinWidth and MinHeight
constraints set for the form.
The constraints are honored if I don't process the WINDOWPOSChanging
message, but are not if I do handle it.
I have had limited success in constraining the size with the SWM_NOSIZE flag
in the same message map procedure, but the operation is not as smooth as I
would like. I have tried using OnCanResize event but this doesn't get fired
off when using the message map.
I also tried to include a WM_SIZE message map procedure, but then any other
resizing controls don't receive their message.