关于消息发送
什么时候用PostMessage什么时候用SendMessage
switch (wMsg)
{
case WM_INITDIALOG:
// Post a message to get the first 4 pre-defined keys, and set
// Full Branches to be the print default.
PostMessage (hDlg, WM_GETFIRSTKEY, 0, 0);
CheckDlgButton (hDlg, IDR_FULL, TRUE);
return (0);
case WM_GETFIRSTKEY:
// Initialize by putting the first 4 predefined keys of the
// registry in the list box.
SendMessage (GetDlgItem(hDlg, IDL_LISTBOX),
LB_ADDSTRING, 0, (LONG)"HKEY_LOCAL_MACHINE");
......
像这样的程序为什么要分的特别清楚呢?