获取对话框控件句柄
HWND hWndBtn; hWndBtn = GetDlgItem(hwndDlg, IDC_BTN_CONFIGDATACHANNEL); EnableWindow(hWndBtn, FALSE);
|
判断HWND是否有效
if (FALSE == IsWindow(*g_pParent->m_phwndConfigDlg)) { OutputDebugString("HA360AMS: config dialog handle invalide"); } else { ::PostMessage(*g_pParent->m_phwndConfigDlg, MSG_GET_ALL_DEVINFO_DONE, 0, 0); }
|