本文整理汇总了C++中CWndButton::SetWndRect方法的典型用法代码示例。如果您正苦于以下问题:C++ CWndButton::SetWndRect方法的具体用法?C++ CWndButton::SetWndRect怎么用?C++ CWndButton::SetWndRect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CWndButton
的用法示例。
在下文中一共展示了CWndButton::SetWndRect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _SetGuideText
void CWndGuideTextMgr::_SetGuideText(GUIDE_STRUCT guide)
#endif
{
CWndText* pWndText;
CWndButton* pWndButton;
pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
pWndText->SetWndRect( m_Rect[0] );
pWndButton= (CWndButton*)GetDlgItem( WIDC_BACK );
pWndButton->SetWndRect( m_Rect[1] );
pWndButton= (CWndButton*)GetDlgItem( WIDC_NEXT );
pWndButton->SetWndRect( m_Rect[2] );
SetWndRect( m_Rect[3] );
#if __VER >= 12 // __MOD_TUTORIAL
if(bIsNext) pWndButton->SetVisible(TRUE);
else pWndButton->SetVisible(FALSE);
#endif
m_bVisible = TRUE;
m_strHelpKey = guide.m_str;
pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
#if __VER >= 12 // __MOD_TUTORIAL
pWndText->SetString("");
pWndText->m_string.AddParsingString(LPCTSTR(guide.m_str));
pWndText->ResetString();
#else
pWndText->SetString( (guide.m_nkey == CWndGuideSystem::KEY) ? prj.GetHelp( m_strHelpKey ) : guide.m_str );
#endif
CRect rect = pWndText->GetWndRect();
pWndText->m_string.Align( m_pFont );
int nLine = pWndText->m_string.GetLineCount();
if( nLine < 10 )
{
if( nLine < 8 )
nLine = 8;
CRect clientrect = GetWndRect();
int ngap = rect.Height() - (nLine * 22);
clientrect.top += ngap;
SetWndRect(clientrect);
rect.bottom -= ngap;
pWndText->SetWndRect( rect );
CRect ptRect;
#ifndef __MOD_TOTURIAL
pWndButton= (CWndButton*)GetDlgItem( WIDC_BACK );
ptRect = pWndButton->GetWndRect();
ptRect.OffsetRect( 0, -ngap );
pWndButton->SetWndRect(ptRect);
#endif
pWndButton= (CWndButton*)GetDlgItem( WIDC_NEXT );
ptRect = pWndButton->GetWndRect();
ptRect.OffsetRect( 0, -ngap );
pWndButton->SetWndRect(ptRect);
pWndText->m_wndScrollBar.m_bVisible = FALSE;
}
else
{
/*
pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
pWndText->SetWndRect( m_Rect[0] );
pWndButton= (CWndButton*)GetDlgItem( WIDC_BACK );
pWndButton->SetWndRect( m_Rect[1] );
pWndButton= (CWndButton*)GetDlgItem( WIDC_NEXT );
pWndButton->SetWndRect( m_Rect[2] );
SetWndRect( m_Rect[3] );
*/
pWndText->m_wndScrollBar.m_bVisible = TRUE;
pWndText->SetWndRect( rect );
}
CWndGuideSystem* pWndGuide = (CWndGuideSystem*)GetWndBase( APP_GUIDE );
CRect rectGuide = pWndGuide->GetWindowRect( TRUE );
CPoint ptGuide = rectGuide.TopLeft();
CPoint ptMove;
pWndGuide->m_bVisible = TRUE;
CRect windowrect = GetWindowRect( TRUE );
if( ptGuide.x > windowrect.Width() )
ptMove = ptGuide - CPoint( windowrect.Width(), 0 );
else
ptMove = ptGuide + CPoint( rectGuide.Width(), 0 );
ptMove.y = rectGuide.bottom;
ptMove.y -= windowrect.Height();
if( ptMove.y < 0 )
ptMove.y = rectGuide.top;
Move( ptMove );
//.........这里部分代码省略.........