请教

解决方案 »

  1.   


    void OnSysCommand( UINT nID, LPARAM lParam );
      

  2.   


    一般用 nID,nID : SC_CLOSE -- CLOSE WINDOW
          SC_MAXIMIZE -- Maximize the CWnd object
          SC_MINIMIZE -- Minimize the CWnd object请查 MSDN 中相应的部分。
      

  3.   

    ************************************************************
    nIDSpecifies the type of system command requested. This parameter can be any one of the following values: SC_CLOSE   Close the CWnd object.
    SC_HOTKEY   Activate the CWnd object associated with the application-specified hot key. The low-order word of lParam identifies the HWND of the window to activate. 
    SC_HSCROLL   Scroll horizontally.
    SC_KEYMENU   Retrieve a menu through a keystroke.
    SC_MAXIMIZE (or SC_ZOOM)   Maximize the CWnd object.
    SC_MINIMIZE (or SC_ICON)   Minimize the CWnd object.
    SC_MOUSEMENU   Retrieve a menu through a mouse click.
    SC_MOVE   Move the CWnd object.
    SC_NEXTWINDOW   Move to the next window.
    SC_PREVWINDOW   Move to the previous window.
    SC_RESTORE   Restore window to normal position and size.
    SC_SCREENSAVE   Executes the screen-saver application specified in the [boot] section of the SYSTEM.INI file.
    SC_SIZE   Size the CWnd object.
    SC_TASKLIST   Execute or activate the Windows Task Manager application.
    SC_VSCROLL   Scroll vertically.****************************************************************************** 
    lParamIf a Control-menu command is chosen with the mouse, lParam contains the cursor coordinates. The low-order word contains the x coordinate, and the high-order word contains the y coordinate. Otherwise this parameter is not used. SC_HOTKEY   Activate the window associated with the application-specified hot key. The low-order word of lParam identifies the window to activate.
    SC_SCREENSAVE   Execute the screen-save application specified in the Desktop section of Control Panel.
      

  4.   

    up
    就是在
    void CTestRDDlg::OnSysCommand(UINT nID, LPARAM lParam)
    {
    if (nID == SC_MAXIMIZE )
    {
               
    }
    if (nID == SC_MINIMIZE )
    {
               
    }
    if (nID == SC_RESTORE  )
    {
               
    }

    }