Windows Message when get maximize ot restore

Posted on 2004-08-02
Last Modified: 2013-11-20
What the message will window send when it get maximize or restore on nonclient area of the Window.If we do it on client window that time it will send WM_GETMINMAXINFO.But I am not getting the message when it maximize or restore on non client window.CAn any one help me.
Question by:nclgaurav
  • 3
LVL 16

Expert Comment

ID: 11691454

paste this code in your OnSysCommand function

if ((nID & 0xFFF0) == SC_MAXIMIZE)

if ((nID & 0xFFF0) == SC_RESTORE)

if ((nID & 0xFFF0) == SC_MINIMIZE)

hope this helps


Author Comment

ID: 11691960
Actually this is a Win32 Application.Here I am hooking the mouse and keyboard.So wat I have to .
LVL 16

Accepted Solution

kiranvj earned 50 total points
ID: 11692371
try this

in function  WindowProc(.......    , write

if(message == WM_SYSCOMMAND && wParam == SC_MINIMIZE)

if(message == WM_SYSCOMMAND && wParam == SC_MAXIMIZE)
if(message == WM_SYSCOMMAND && wParam == SC_RESTORE)

where message is the message identifier.

LVL 16

Expert Comment

ID: 12017032
hi, DanRollins

i think i deserve some points.... ;-)


Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Different colored text in ComboBox without Subclassing 8 65
How to know only "File created" with EventLog 3 35
dog bark java program 15 109
matchUp  challenge 6 69
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question