本文整理汇总了C++中CChildFrame类的典型用法代码示例。如果您正苦于以下问题:C++ CChildFrame类的具体用法?C++ CChildFrame怎么用?C++ CChildFrame使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CChildFrame类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DYNAMIC_DOWNCAST
BOOL CGotoDlg::OnInitDialog()
{
CMDIFrameWnd* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWnd, AfxGetMainWnd());
CChildFrame *pFrame = DYNAMIC_DOWNCAST( CChildFrame, pMainFrame->MDIGetActive() );
CWSDialog::OnInitDialog();
CWSUIExtras::SetWSDialogWindowText(CWnd::GetSafeHwnd(), Workshare::Products::WS_PROD_COMPARE);
m_btnGoto.SubclassDlgItem( IDGOTO, this );
m_btnClose.SubclassDlgItem( IDCLOSE, this );
if (pFrame && pFrame->GetCompositeView())
{
CRect rcView;
pFrame->GetCompositeView()->GetWindowRect(rcView);
SetWindowPos(&wndTop, rcView.left+10, rcView.top+10, 0, 0, SWP_NOSIZE);
}
// Setup the help link.
m_StaticHyperLinkHelp.SubclassDlgItem(IDC_HELPLINK, this);
m_StaticHyperLinkHelp.m_iHelpID = GetHelpID();
SetDefID(IDGOTO);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
示例2: LookupParser
BOOL CBonfireDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;
m_xTextBuffer.InitNew();
((CMainFrame*)AfxGetMainWnd())->m_wndProjectBar.LoadFile(this);
// MAYBE PUT IN SETPATHNAME() LATER
// set the syntax highlighting parser
this->m_fnParse = LookupParser( NULL );
// draw icon
POSITION pos = GetFirstViewPosition();
CChildFrame* pChild = (CChildFrame*)GetNextView(pos)->GetParentFrame();
pChild->UpdateIcon("");
UpdateTabs( NULL );
// initialize the document title
UpdateDocumentTitle( NULL );
SwitchToFirstView();
return TRUE;
}
示例3: while
void CMainFrame::OnSelChangedTree(NMHDR* pNMHDR, LRESULT* pResult)
{
NMTREEVIEW* pTreeView = (NMTREEVIEW*)pNMHDR;
HTREEITEM hSelected = pTreeView->itemNew.hItem;
int nDeep = 0;
HTREEITEM hTempItem = m_wndMasterlistDialogBar.m_treeMasters.GetParentItem(hSelected);
while (hTempItem)
{
nDeep++;
hTempItem = m_wndMasterlistDialogBar.m_treeMasters.GetParentItem(hTempItem);
}
DWORD_PTR pPoint = m_wndMasterlistDialogBar.m_treeMasters.GetItemData(hSelected);
CRecordeOperatorDoc* pDoc = NULL;
CChildFrame* pChild = NULL;
pChild = (CChildFrame*)GetActiveFrame();
if (!pChild)
return;
pDoc = (CRecordeOperatorDoc*)pChild->GetActiveDocument();
if (!pDoc)
return;
IERecPlayer* pRecord = pDoc->GetRecord();
if (pRecord)
{
g_RecordUITools.FillListCtrl(pRecord, nDeep,pPoint,m_wndMasterlistDialogBar.m_listCtrl);
}
}
示例4:
void CMainFrame::UpdateActiveDoc
(
void
)
{
CChildFrame *pActiveChild =(CChildFrame *)this->MDIGetActive();
if(pActiveChild)
{
CFusionDoc *pDoc =(CFusionDoc*)pActiveChild->GetActiveDocument();
// update groups tab
if(pDoc)
{
if(m_wndTabControls)
{
if(m_wndTabControls->GrpTab)
{
m_wndTabControls->GrpTab->UpdateTabDisplay(pDoc);
}
}
LoadComboBox() ;
}
}
// update models list box
this->UpdateModelsDialog ();
}
示例5: if
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;
}
else if (nID >= WM_PROCESSMENU && nID < (WM_PROCESSMENU + WM_MAXITEMS))
{
((CCmdUI*)pExtra)->Enable(TRUE);
return TRUE;
}
else 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_ReClass2015TYPE, theApp.m_hMDIMenu, theApp.m_hMDIAccel);
CNodeClass* pClass = theApp.Classes[idx];
pClass->pChildWindow = pChild;
pChild->SetTitle(pClass->Name);
pChild->SetWindowText(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;
g_ProcessID = ProcMenuItems[idx].ProcessId;
g_hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, g_ProcessID);
UpdateMemoryMap();
return TRUE;
}
if (nID >= WM_DELETECLASSMENU && nID < (WM_DELETECLASSMENU + WM_MAXITEMS) )
{
UINT idx = nID - WM_DELETECLASSMENU;
if (theApp.Classes[idx]->pChildWindow)
theApp.Classes[idx]->pChildWindow->SendMessage(WM_CLOSE, 0, 0);
theApp.DeleteClass(theApp.Classes[idx]);
return TRUE;
}
}
return CMDIFrameWndEx::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
}
示例6: while
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();
}
示例7: OnFileNew
void CMainFrame::OnFileNew(UINT uNotifyCode, int nID, CWindow wndCtl)
{
CChildFrame* pChild = new CChildFrame;
pChild->CreateEx(m_hWndClient);
// TODO: add code to initialize document
}
示例8: _T
LRESULT CTuotuoCategoryCtrl::OnGetToolTipInfo(LPNMHDR pnmh)
{
LPNMSTTDISPINFO pnmdsp = (LPNMSTTDISPINFO)pnmh;
pnmdsp->dwFlags = STTDSPF_TEXT;
if (pnmdsp->pdwIndex >= 1 && pnmdsp->pdwIndex <= 5)
pnmdsp->szText = _T("");
else if (pnmdsp->pdwIndex)
{
HWND hChildFrame = (HWND)pnmdsp->pdwIndex;
if (::IsWindow(hChildFrame))
{
CChildFrame *pChild = (CChildFrame*)::GetWindowLongPtr(hChildFrame, GWLP_USERDATA);
if (pChild)
{
if (pChild->GetItem()->m_pCategory->m_pWebData == START_PAGE_WEBSITE_DATA)
pnmdsp->szText = _T("我的首页");
else if (pChild->GetItem()->m_pCategory->m_pWebData)
pnmdsp->szText = pChild->GetItem()->GetText();
else
pnmdsp->szText = _T("");
}
else
pnmdsp->szText = _T("");
}
else
pnmdsp->szText = _T("");
}
else
pnmdsp->szText = _T("");
return 0;
}
示例9: ApplyNodesChange
void CMainFrame::ApplyNodesChange(LGeometryData::NodesConstIterator it,
double x, double y, LGeometryData::EBoundaryType bnd,
bool delete_all_containing )
{
CGeometry2dView* pView = NULL;
CGeometry2dDoc* pDoc = NULL;
POSITION pos;
CChildFrame* pChild = static_cast<CChildFrame*>(MDIGetActive());
if ( pChild )
{
pDoc = static_cast<CGeometry2dDoc*>(pChild->GetActiveDocument());
if ( pDoc )
{
pos = pDoc->GetFirstViewPosition();
if ( pos )
{
pView = static_cast<CGeometry2dView*>(pDoc->GetNextView(pos));
if ( pView )
{
pDoc->PrepareUndo();
pDoc->GetData().SetCoordinates(it,x,y);
pDoc->GetData().SetBoundary(it,bnd);
if ( delete_all_containing )
pDoc->GetData().RemoveAllContainingNode(it);
pView->PrepareBuffer();
pView->RedrawWindow();
return;
}
}
}
}
UnsetNodeForProperties();
}
示例10: OnHelp
BOOL CMainFrame::PreTranslateMessage( MSG* pMsg )
{
if( pMsg->message == 0x4d ) //0x4d = button F1
{
AnalyticsHelper::SendDeltaViewStatistics(_T("DeltaView Event: F1 key pressed raising help button click"));
OnHelp();
return TRUE;
}
if( pMsg->message == WM_KEYUP )
{
switch (pMsg->wParam)
{
case VK_F3:
CChildFrame *pFrame = DYNAMIC_DOWNCAST( CChildFrame, MDIGetActive() );
if (pFrame && pFrame->GetSummaryWnd()->IsVisible() )
{
pFrame->GetSummaryWnd()->NavigateSearch(1); // 1 for forward -> allowed -1 for back (not implelented)
return TRUE;
}
break;
}
}
return CMDIFrameWndEx::PreTranslateMessage( pMsg );
}
示例11: DYNAMIC_DOWNCAST
void CFileView::AdjustLayout()
{
if (GetSafeHwnd() == NULL)
{
return;
}
CMainFrame * pFrame = DYNAMIC_DOWNCAST(CMainFrame, AfxGetMainWnd());
if(pFrame)
{
CChildFrame * pChildFrame = DYNAMIC_DOWNCAST(CChildFrame, pFrame->MDIGetActive());
if(pChildFrame)
{
CImgRegionDoc * pDoc = DYNAMIC_DOWNCAST(CImgRegionDoc, pChildFrame->GetActiveDocument());
if(pDoc && pDoc->m_TreeCtrl.m_hWnd)
{
CRect rectClient;
GetClientRect(rectClient);
pDoc->m_TreeCtrl.SetWindowPos(
&wndTop, rectClient.left, rectClient.top, rectClient.Width(), rectClient.Height(), 0);
pDoc->m_TreeCtrl.Invalidate();
}
}
}
}
示例12: ChangeProperties
void CMainFrame::ChangeProperties(short scale, CGeometry2dView::ENodeDrawingMode mode,
LGeometryData::EBoundaryCondition cond)
{
CGeometry2dView* pView = NULL;
CGeometry2dDoc* pDoc = NULL;
POSITION pos;
CChildFrame* pChild = static_cast<CChildFrame*>(MDIGetActive());
if ( pChild )
{
pDoc = static_cast<CGeometry2dDoc*>(pChild->GetActiveDocument());
if ( pDoc )
{
pos = pDoc->GetFirstViewPosition();
if ( pos )
{
pView = static_cast<CGeometry2dView*>(pDoc->GetNextView(pos));
if ( pView )
{
m_wndInBarProperties.SetScale(scale);
m_wndInBarProperties.SetNodeDrawingMode(mode);
m_wndInBarProperties.SetBoundaryConditions(cond);
pView->GeometryProperties(scale,mode,cond);
}
}
}
}
}
示例13: getStandardHeight
static int getStandardHeight(CippsDemoDoc* pDoc)
{
CippsDemoView* pView = pDoc->GetDemoView();
if (pView == NULL) return 0;
CChildFrame* pFrame = pDoc->GetDemoFrame();
return pView->GetInitialHeight() + pFrame->GetBorderHeight();
}
示例14: OnBnClickedButtonPlay
void CMainFrame::OnBnClickedButtonPlay()
{
CRecordeOperatorDoc* pDoc = NULL;
CChildFrame* pChild = NULL;
pChild = (CChildFrame*)GetActiveFrame();
if (!pChild)
return;
pDoc = (CRecordeOperatorDoc*)pChild->GetActiveDocument();
if (!pDoc)
return;
IERecPlayer* pRecord = pDoc->GetRecord();
if (pRecord)
{
if (pRecord->RePlay() == S_OK)
{
m_wndProgressDialogBar.m_buttonPlay.SetWindowText("Pause");
}
else if (pRecord->PauseRePlay() == S_OK)
{
m_wndProgressDialogBar.m_buttonPlay.SetWindowText("Play");
}
}
else
MessageBox("»¹Î´°ó¶¨Â¼Ïñ¶ÔÏó£¡","ѽ",MB_OK);
}
示例15: GetDocument
//////////////////////////////TWAIN Specific////////////////////////////////////////
void CFPAnalysisView::OnFileScan()
{
CFPAnalysisDoc* pDoc = GetDocument();
CScanDlg dlg;
if (dlg.DoModal() == IDOK)
{
currentimage.SetFilename(dlg.m_szImageName);
currentimage.LoadBMP();
Invalidate(FALSE);
pDoc->SetTitle(dlg.m_szImageName);
}
//set the size of view to image-size...
CChildFrame* pParent =(CChildFrame*)GetParentFrame();
CRect rcParent;
rcParent.left = 0;
rcParent.top =0;
rcParent.right = (int)currentimage.GetWidth();
rcParent.bottom = (int)currentimage.GetHeight();
pParent->MoveWindow(&rcParent);
SetFPScrollInfo();
// Refresh the entire view...
Invalidate(TRUE);
}