本文整理汇总了C++中CButton::GetButtonStyle方法的典型用法代码示例。如果您正苦于以下问题:C++ CButton::GetButtonStyle方法的具体用法?C++ CButton::GetButtonStyle怎么用?C++ CButton::GetButtonStyle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CButton
的用法示例。
在下文中一共展示了CButton::GetButtonStyle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateLastSearch
void CEditReplaceDlg::
OnEditSkip ()
{
if (!UpdateData ())
return;
m_ctlFindText.SaveState(_T("Files\\ReplaceInFile"));
m_ctlReplText.SaveState(_T("Files\\ReplaceWithInFile"));
UpdateLastSearch ();
CButton *pSkip = (CButton*) GetDlgItem (IDC_EDIT_SKIP);
CButton *pRepl = (CButton*) GetDlgItem (IDC_EDIT_REPLACE);
if (!m_bFound)
{
m_ptFoundAt = m_ptCurrentPos;
m_bFound = DoHighlightText ( TRUE );
if (m_bFound)
{
pSkip->SetButtonStyle (pSkip->GetButtonStyle () & ~BS_DEFPUSHBUTTON);
pRepl->SetButtonStyle (pRepl->GetButtonStyle () | BS_DEFPUSHBUTTON);
// pRepl->SetFocus ();
}
else
{
pRepl->SetButtonStyle (pRepl->GetButtonStyle () & ~BS_DEFPUSHBUTTON);
pSkip->SetButtonStyle (pSkip->GetButtonStyle () | BS_DEFPUSHBUTTON);
// pSkip->SetFocus ();
}
return;
}
if (!m_pBuddy->m_nLastFindWhatLen)
if (m_ptFoundAt.y + 1 < m_pBuddy->GetLineCount ())
{
m_ptFoundAt.x = 0;
m_ptFoundAt.y++;
}
else
{
m_bFound = FALSE;
return;
}
else
m_ptFoundAt.x += 1;
m_bFound = DoHighlightText ( TRUE );
if (m_bFound)
{
pSkip->SetButtonStyle (pSkip->GetButtonStyle () & ~BS_DEFPUSHBUTTON);
pRepl->SetButtonStyle (pRepl->GetButtonStyle () | BS_DEFPUSHBUTTON);
// pRepl->SetFocus ();
}
else
{
pRepl->SetButtonStyle (pRepl->GetButtonStyle () & ~BS_DEFPUSHBUTTON);
pSkip->SetButtonStyle (pSkip->GetButtonStyle () | BS_DEFPUSHBUTTON);
// pSkip->SetFocus ();
}
}
示例2: PreTranslateMessage
BOOL CEditReplaceDlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_RETURN)
{
CButton *pSkip = (CButton*) GetDlgItem (IDC_EDIT_SKIP);
if (pSkip->GetButtonStyle () & BS_DEFPUSHBUTTON)
{
OnEditSkip ();
}
else
{
OnEditReplace ();
}
return TRUE;
}
return CDialog::PreTranslateMessage(pMsg);
}