13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Windows can appropriately detect the user's interaction with thecontrol. If a list box or combo box is created with theLBS_ OWNERDRA WV ARIABLE orCBS_OWNERDRAWVARIABLE style, this message is sent to theowner for each item in the control, since each item can differ inheight. Otherwise, this message is sent once for the entire ownerdrawcontrol.Whenever an owner-draw control needs to be redrawn, Windowssends the WM_DRA WITEM message to the owner of the control.The IParam parameter of this message contains a pointer to aDRAWITEMSTRUCT data structure that contains informationabout the drawing required for the control. Similarly, if an item isdeleted from a list box or combo box, Windows sends theWM_DELETEITEM message containing a pointer to aDELETEITEMSTRUCT data structure that describes the deleteditem.Messages for dialogbox controlsDialog boxkeyboardinterfaceMany controls recognize predefined messages that, when sent tothe control, cause it to carry out some action. A dialog functioncan send a message to a control by supplying the control identifierand using the SendDlgltemMessage function, which is identicalto the Send Message function except that it uses a controlidentifier instead of a window handle to identify the control thatis to receive the message.Windows provides a special keyboard interface for modal dialogboxes and modeless dialog boxes that use the IsDialogMessagefunction to filter messages. This keyboard interface carries outspecial processing for several keys and generates messages thatcorrespond to certain buttons in the dialog box or changes theinput focus from one control to another. Table 1.8 lists the keysused in this interface and the respective action:66Software development kit

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!