本文整理汇总了C++中CLayout::GetName方法的典型用法代码示例。如果您正苦于以下问题:C++ CLayout::GetName方法的具体用法?C++ CLayout::GetName怎么用?C++ CLayout::GetName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CLayout
的用法示例。
在下文中一共展示了CLayout::GetName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetName
void CLayout::SetName(CString name_)
{
if (name_ == "")
return;
// check it's not in use by other layouts
CLayout* layout;
POSITION position = application->layouts.GetHeadPosition();
for (int i = 0; i < application->layouts.GetCount(); i++)
{
layout = application->layouts.GetNext(position);
if (layout->GetName() == name_)
return;
}
m_Name = name_;
m_WndName = name_;
HWND ClientWindow;
ClientWindow = ::GetWindow(g_MainFrame->m_hWndMDIClient, GW_CHILD);
// Now find any layouts within this application
while (ClientWindow != NULL)
{
CChildFrame* pWnd = (CChildFrame*)CWnd::FromHandle(ClientWindow);
if(pWnd->layout == this)
{
// Rename
CString Title;
Title.Format("%s : %s", pWnd->application->file_information.name, m_Name);
pWnd->SetWindowText(Title);
}
ClientWindow = :: GetWindow(ClientWindow, GW_HWNDNEXT);
}
// update project bar
g_MainFrame->project_bar.tree.SetItemText(tree, name_);
// Update windows displaying this potentially
g_MainFrame->tabs.RedrawWindow();
}