本文整理汇总了C++中CButton::SendMessage方法的典型用法代码示例。如果您正苦于以下问题:C++ CButton::SendMessage方法的具体用法?C++ CButton::SendMessage怎么用?C++ CButton::SendMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CButton
的用法示例。
在下文中一共展示了CButton::SendMessage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnDialogClickRadioButton
LRESULT CXTPTaskDialogFrame::OnDialogClickRadioButton(WPARAM wParam, LPARAM /*lParam*/)
{
CButton* pWnd = DYNAMIC_DOWNCAST(CButton, GetDlgItem((UINT)wParam));
if (!pWnd)
return FALSE;
if ((pWnd->SendMessage(WM_GETDLGCODE) & DLGC_RADIOBUTTON) == 0)
return FALSE;
HWND hWndCtrl = ::GetWindow(m_hWnd, GW_CHILD);
while (hWndCtrl)
{
if (::SendMessage(hWndCtrl, WM_GETDLGCODE, 0, 0L) & DLGC_RADIOBUTTON)
{
::SendMessage(hWndCtrl, BM_SETCHECK, hWndCtrl == pWnd->GetSafeHwnd(), 0L);
}
hWndCtrl = ::GetWindow(hWndCtrl, GW_HWNDNEXT);
}
m_nSelRadioButtonID = (UINT)wParam;
SendNotify(TDN_RADIO_BUTTON_CLICKED, (WPARAM)m_nSelRadioButtonID);
return TRUE;
}
示例2: OnDialogSetButtonElevationState
LRESULT CXTPTaskDialogFrame::OnDialogSetButtonElevationState(WPARAM wParam, LPARAM lParam)
{
CButton* pWnd = DYNAMIC_DOWNCAST(CButton, GetDlgItem((UINT)wParam));
if (!pWnd)
return FALSE;
pWnd->SendMessage(BCM_SETSHIELD, 0, lParam);
return TRUE;
}
示例3: OnDialogEnableRadioButton
LRESULT CXTPTaskDialogFrame::OnDialogEnableRadioButton(WPARAM wParam, LPARAM lParam)
{
CButton* pWnd = DYNAMIC_DOWNCAST(CButton, GetDlgItem((UINT)wParam));
if (!pWnd)
return FALSE;
if ((pWnd->SendMessage(WM_GETDLGCODE) & DLGC_RADIOBUTTON) == 0)
return FALSE;
pWnd->EnableWindow(lParam != 0);
return TRUE;
}
示例4: NewGUI_SetShield
void NewGUI_SetShield(CButton& rButton, BOOL bSetShield)
{
rButton.SendMessage(BCM_SETSHIELD, 0, bSetShield);
}