Click here to Skip to main content
16,004,969 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ClientToScreen() ??? Pin
lucy16-Apr-02 17:27
lucy16-Apr-02 17:27 
AnswerRe: ClientToScreen() ??? Pin
Shog916-Apr-02 10:11
sitebuilderShog916-Apr-02 10:11 
GeneralRe: ClientToScreen() ??? Pin
Tim Smith16-Apr-02 10:14
Tim Smith16-Apr-02 10:14 
GeneralRe: ClientToScreen() ??? Pin
lucy16-Apr-02 15:29
lucy16-Apr-02 15:29 
AnswerRe: ClientToScreen() ??? Pin
Kemal OZLU16-Apr-02 10:13
Kemal OZLU16-Apr-02 10:13 
Generalbasic window question Pin
User 988516-Apr-02 8:57
User 988516-Apr-02 8:57 
GeneralRe: basic window question Pin
lucy16-Apr-02 8:58
lucy16-Apr-02 8:58 
GeneralRe: basic window question Pin
Paul M Watt16-Apr-02 9:25
mentorPaul M Watt16-Apr-02 9:25 
The easiest way to prevent a window from being sized is to remove the WS_THICKFRAME style from the frame window and replace it with a WS_BORDER style.

The easiest way to prevent a window from being moved is to handle the WM_NCHITTEST message, and convert all HT_CAPTION styles that are returned by DefWindowProc to HT_BORDER. Windows only allows the window to be moved when the cursor is selected over a caption region. The inverse of this, if you make all HT_CLIENT results return a HT_CAPTION instead, the user can move the window whenever they click inside any portion of the window, not jsut the caption.

For finer control in what you do, you can override the WM_ENTERSIZEMOVE message, and filter off any processing for sizing or moving before it even starts. That way a user cannot start dragging the window, you nip it in the bud.

If you were to override the WM_SIZE message, the window would be resized, then it would snap back into place after you handled the message.

Good luck




Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!

GeneralRe: basic window question Pin
lucy16-Apr-02 9:37
lucy16-Apr-02 9:37 
GeneralRe: basic window question Pin
Nish Nishant16-Apr-02 12:30
sitebuilderNish Nishant16-Apr-02 12:30 
GeneralRe: basic window question Pin
Mazdak16-Apr-02 10:08
Mazdak16-Apr-02 10:08 
GeneralRe: basic window question Pin
lucy16-Apr-02 15:22
lucy16-Apr-02 15:22 
Generalradio buttons, edit boxes, etc Pin
Rajveer16-Apr-02 8:46
Rajveer16-Apr-02 8:46 
GeneralRe: radio buttons, edit boxes, etc Pin
lucy16-Apr-02 8:54
lucy16-Apr-02 8:54 
Generalincluding .lib and .dll files Pin
megadith16-Apr-02 8:37
megadith16-Apr-02 8:37 
GeneralRe: including .lib and .dll files Pin
Mazdak16-Apr-02 8:41
Mazdak16-Apr-02 8:41 
QuestionProblem with List Control Box in a Pop-up dailog box? Pin
Aoife16-Apr-02 7:05
Aoife16-Apr-02 7:05 
AnswerRe: Problem with List Control Box in a Pop-up dailog box? Pin
Ravi Bhavnani16-Apr-02 7:35
professionalRavi Bhavnani16-Apr-02 7:35 
GeneralRe: Problem with List Control Box in a Pop-up dailog box? Pin
Aoife16-Apr-02 8:14
Aoife16-Apr-02 8:14 
GeneralRe: Problem with List Control Box in a Pop-up dailog box? Pin
Aoife16-Apr-02 9:31
Aoife16-Apr-02 9:31 
GeneralRe: Problem with List Control Box in a Pop-up dailog box? Pin
Ravi Bhavnani16-Apr-02 10:14
professionalRavi Bhavnani16-Apr-02 10:14 
Generalconverting _variant_t to string Pin
16-Apr-02 7:00
suss16-Apr-02 7:00 
GeneralRe: converting _variant_t to string Pin
NapiSpooler16-Apr-02 8:35
NapiSpooler16-Apr-02 8:35 
GeneralRe: converting _variant_t to string Pin
Tim Smith16-Apr-02 10:13
Tim Smith16-Apr-02 10:13 
GeneralMigration java -> c++ Pin
Zizilamoroso16-Apr-02 6:08
Zizilamoroso16-Apr-02 6:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.