Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

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
0
nclgaurav
Asked:
nclgaurav
  • 3
1 Solution
 
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:
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, DanRollins

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

kiranvj
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now