本文整理汇总了C++中CChildFrame::SetWindowTextA方法的典型用法代码示例。如果您正苦于以下问题:C++ CChildFrame::SetWindowTextA方法的具体用法?C++ CChildFrame::SetWindowTextA怎么用?C++ CChildFrame::SetWindowTextA使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CChildFrame
的用法示例。
在下文中一共展示了CChildFrame::SetWindowTextA方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnOK
void CDialogClasses::OnOK()
{
unsigned numselected = m_ClassView.GetSelectedCount();
POSITION pos = m_ClassView.GetFirstSelectedItemPosition();
while (pos)
{
int nItem = m_ClassView.GetNextSelectedItem(pos);
// FUUUUCK pushign this out last second shutup
CString szBuffer = m_ClassView.GetItemText(nItem, 0);
printf("nitem %d\n", nItem);
nItem = FindClassByName(szBuffer.GetBuffer());
//printf( "szBuffer %s new %d\n", szBuffer.GetBuffer( ), nItem );
CMainFrame* pFrame = static_cast<CMainFrame*>(AfxGetApp( )->m_pMainWnd);
CChildFrame* pChild = (CChildFrame*)pFrame->CreateNewChild(RUNTIME_CLASS(CChildFrame), IDR_ReClass2015TYPE, theApp.m_hMDIMenu, theApp.m_hMDIAccel);
pChild->m_wndView.m_pClass = theApp.Classes[nItem];
// This will get overwritten for each class that is opened
pChild->SetTitle(theApp.Classes[nItem]->Name);
pChild->SetWindowTextA(theApp.Classes[nItem]->Name);
pFrame->UpdateFrameTitleForDocument(theApp.Classes[nItem]->Name);
}
CDialogEx::OnOK();
}
示例2: OnCmdMsg
BOOL CMainFrame::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
if (nCode == CN_UPDATE_COMMAND_UI)
{
if (nID >= WM_CLASSMENU && nID < (WM_CLASSMENU+WM_MAXITEMS)){ ((CCmdUI*)pExtra)->Enable(TRUE); return TRUE;}
if (nID >= WM_PROCESSMENU && nID < (WM_PROCESSMENU+WM_MAXITEMS)){ ((CCmdUI*)pExtra)->Enable(TRUE); return TRUE;}
if (nID >= WM_DELETECLASSMENU && nID < (WM_DELETECLASSMENU+WM_MAXITEMS)){ ((CCmdUI*)pExtra)->Enable(TRUE); return TRUE;}
}
if (nCode == CN_COMMAND)
{
if (nID >= WM_CLASSMENU && nID < (WM_CLASSMENU+WM_MAXITEMS) )
{
UINT idx = nID - WM_CLASSMENU;
CChildFrame* pChild = (CChildFrame*)this->CreateNewChild(RUNTIME_CLASS(CChildFrame), IDR_ReClass2011TYPE, theApp.m_hMDIMenu, theApp.m_hMDIAccel);
CNodeClass* pClass = theApp.Classes[idx];
pChild->SetTitle(pClass->Name);
pChild->SetWindowTextA(pClass->Name);
UpdateFrameTitleForDocument(pClass->Name);
pChild->m_wndView.m_pClass = pClass;
return TRUE;
}
if (nID >= WM_PROCESSMENU && nID < (WM_PROCESSMENU+WM_MAXITEMS) )
{
UINT idx = nID - WM_PROCESSMENU;
ProcessID = ProcMenuItems[idx].ProcessId;
hProcess = OpenProcess(PROCESS_ALL_ACCESS,false,ProcessID);
UpdateMemoryMap();
return TRUE;
}
if (nID >= WM_DELETECLASSMENU && nID < (WM_DELETECLASSMENU+WM_MAXITEMS) )
{
UINT idx = nID - WM_DELETECLASSMENU;
theApp.DeleteClass(theApp.Classes[idx]);
return TRUE;
}
}
return CMDIFrameWndEx::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}