Windows Message when get maximize ot restore

Hello
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.
Regards
nclgauravAsked:
Who is Participating?
 
Kiran Paul VJConnect With a Mentor Computer EngineerCommented:
try this

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


if(message == WM_SYSCOMMAND && wParam == SC_MINIMIZE)
            MessageBox("Minimised");

if(message == WM_SYSCOMMAND && wParam == SC_MAXIMIZE)
            MessageBox("Maximised");
      
if(message == WM_SYSCOMMAND && wParam == SC_RESTORE)
            MessageBox("Restore");

where message is the message identifier.

kiranvj
0
 
Kiran Paul VJComputer EngineerCommented:
hi...

paste this code in your OnSysCommand function

if ((nID & 0xFFF0) == SC_MAXIMIZE)
            AfxMessageBox("Maximised")

if ((nID & 0xFFF0) == SC_RESTORE)
            AfxMessageBox("Restored")      

if ((nID & 0xFFF0) == SC_MINIMIZE)
            AfxMessageBox("Minimised");


hope this helps

kiranvj
0
 
nclgauravAuthor Commented:
Actually this is a Win32 Application.Here I am hooking the mouse and keyboard.So wat I have to .
0
 
Kiran Paul VJComputer EngineerCommented:
hi, DanRollins

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

kiranvj
0
All Courses

From novice to tech pro — start learning today.