windows_programming_notes.nbk: Home | Index | Next Page: WM_CLOSE | Previous Page: WM_CHILDACTIVATE


 WM_CLEAR

An application sends a WM_CLEAR message to an edit control or combo box to delete (clear) the current selection, if any, from the edit control.

To send this message, call the SendMessage function with the following parameters.

    SendMessage( 
      (HWND) hWnd,              // handle to destination window 
      WM_CLEAR,                 // 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.

Remarks

The deletion performed by the WM_CLEAR message can be undone by sending the edit control an EM_UNDO message.

To delete the current selection and place the deleted content on the clipboard, use the WM_CUT message.

When sent to a combo box, the WM_CLEAR message is handled by its edit control. This message has no effect when sent to a combo box with the CBS_DROPDOWNLIST style.

Requirements


windows_programming_notes.nbk: Home | Index | Next Page: WM_CLOSE | Previous Page: WM_CHILDACTIVATE


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time