本文整理汇总了C++中CChildFrame::GetWindowText方法的典型用法代码示例。如果您正苦于以下问题:C++ CChildFrame::GetWindowText方法的具体用法?C++ CChildFrame::GetWindowText怎么用?C++ CChildFrame::GetWindowText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CChildFrame
的用法示例。
在下文中一共展示了CChildFrame::GetWindowText方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnUpdate
void CCompositeView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
{
CChildFrame* pFrame = DYNAMIC_DOWNCAST( CChildFrame, GetParentFrame() );
if( !pFrame || !pFrame->IsWindowVisible() )
return;
if( !GetDVController() )
return;
// update the comparison doc detail sand frame
CString csTitleBarText;
CString csComparisonDoc = GetDVController()->GetComparisonDocController().GetComparisonDocumentTitle();
if (pFrame && !csComparisonDoc.IsEmpty())
{
// do not keep setting the title text to the same stuff as it forces the tabctrl to relayout and repaint
CString existingText;
pFrame->GetWindowText(existingText);
if (existingText != csComparisonDoc)
{
pFrame->GetDocument()->SetTitle(csComparisonDoc);
if (csComparisonDoc.GetLength()>40)
{
csComparisonDoc = csComparisonDoc.Left(32);
csComparisonDoc.TrimRight(L" ");
csComparisonDoc += L"...";
}
pFrame->SetWindowText(csComparisonDoc);
}
}
else
{
// do not keep setting the title text to the same stuff as it forces the tabctrl to relayout and repaint
CString existingText;
pFrame->GetWindowText(existingText);
if (existingText!= GetApplicationTitle())
pFrame->SetWindowText(GetApplicationTitle());
}
try
{
if (GetDocObject())
GetDocObject()->Repaint();
}
catch (...)
{
_ASSERTE(!_T("Catch ... How did we get here?"));
}
UpdateWindow();
}