解决方案 »

  1.   

    NM_CLICK
    Notifies a control's parent window that the user has clicked the left mouse button within the control. NM_CLICK is sent in the form of a WM_NOTIFY message. NM_CLICK 
        lpnmh = (LPNMHDR) lParam; Parameters
    lpnmh 
    Address of an NMHDR structure that contains additional information about this notification message. 
    Return Values
    The return value is ignored by the control. Requirements 
      Windows NT/2000: Requires Windows NT 3.51 or later 
      Windows 95/98/Me: Requires Windows 95 or later 
      Header: Declared in winuser.h. 
      

  2.   

      
      Platform SDK: Windows User Interface 
    BM_CLICK
    An application sends a BM_CLICK message to simulate the user clicking a button. This message causes the button to receive the WM_LBUTTONDOWN and WM_LBUTTONUP messages, and the button's parent window to receive a BN_CLICKED notification message.To send this message, call the SendMessage function with the following parameters. SendMessage(
      (HWND) hWnd,         // handle to destination window 
      BM_CLICK,            // message to send
      (WPARAM) wParam,     // not used; must be zero
      (LPARAM) lParam      // not used; must be zero
    );
    Parameters
    This message has no parameters. Return Values
    This message does not return a value.Res
    If the button is in a dialog box and the dialog box is not active, the BM_CLICK message might fail. To ensure success in this situation, call the SetActiveWindow function to activate the dialog box before sending the BM_CLICK message to the button.Requirements 
      Windows NT/2000/XP: Included in Windows NT 3.5 and later.
      Windows 95/98/Me: Included in Windows 95 and later.
      Header: Declared in Winuser.h; include Windows.h.