HOWTO: Use SendMessage() As Opposed to SendDlgItemMessage()ID: Q12273
|
The following information describes under what circumstances it
is appropriate to use either the SendMessage() or SendDlgItemMessage()
function.
Both SendMessage() and SendDlgItemMessage() can be used to add strings
to a list box. SendMessage() is used to send a message to a specific
window using the handle to the list box. SendDlgItemMessage() is used
to send a message to the child window of a given window using the list
box resource ID. SendDlgItemMessage() is most often used in dialog box
functions that have a handle to the dialog box and not to the child
window control.
The SendDlgItemMessage() call
SendDlgItemMessage (hwnd, id, msg, wParam, lParam)
hwnd2 = GetDlgItem (hwnd, id);
SendMessage (hwnd2, msg, wParam, lParam);
Keywords : kbNTOS kbGrpUser kbWinOS kbWndw kbWndwMsg
Version :
Platform :
Issue type : kbhowto
Last Reviewed: March 4, 1999