这篇教程C++ GetMDIParent函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetMDIParent函数的典型用法代码示例。如果您正苦于以下问题:C++ GetMDIParent函数的具体用法?C++ GetMDIParent怎么用?C++ GetMDIParent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetMDIParent函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: GetMDIParentvoid wxMDIChildFrame::InternalSetMenuBar(){ wxMDIParentFrame * const parent = GetMDIParent(); MDIInsertWindowMenu(parent->GetClientWindow(), m_hMenu, GetMDIWindowMenu(parent));}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:7,
示例2: GetMDIParentvoid wxMDIChildFrame::Maximize(bool maximize){ wxMDIParentFrame * const parent = GetMDIParent(); if ( parent && parent->GetClientWindow() ) { if ( !IsShown() ) { // Turn off redrawing in the MDI client window because otherwise // maximizing it would also show it and we don't want this for // hidden windows. ::SendMessage(GetWinHwnd(parent->GetClientWindow()), WM_SETREDRAW, FALSE, 0L); } ::SendMessage(GetWinHwnd(parent->GetClientWindow()), maximize ? WM_MDIMAXIMIZE : WM_MDIRESTORE, (WPARAM)GetHwnd(), 0); if ( !IsShown() ) { // Hide back the child window shown by maximizing it. ::ShowWindow(GetHwnd(), SW_HIDE); // Turn redrawing in the MDI client back on. ::SendMessage(GetWinHwnd(parent->GetClientWindow()), WM_SETREDRAW, TRUE, 0L); } }}
开发者ID:781155640,项目名称:wxWidgets,代码行数:29,
示例3: WXUNUSEDbool wxMDIChildFrame::HandleMDIActivate(long WXUNUSED(activate), WXHWND hwndAct, WXHWND hwndDeact){ wxMDIParentFrame * const parent = GetMDIParent(); WXHMENU hMenuToSet = 0; bool activated; if ( m_hWnd == hwndAct ) { activated = true; parent->SetActiveChild(this); WXHMENU hMenuChild = m_hMenu; if ( hMenuChild ) hMenuToSet = hMenuChild; } else if ( m_hWnd == hwndDeact ) { wxASSERT_MSG( parent->GetActiveChild() == this, wxT("can't deactivate MDI child which wasn't active!") ); activated = false; parent->SetActiveChild(NULL); WXHMENU hMenuParent = parent->m_hMenu; // activate the the parent menu only when there is no other child // that has been activated if ( hMenuParent && !hwndAct ) hMenuToSet = hMenuParent; } else { // we have nothing to do with it return false; } if ( hMenuToSet ) { MDISetMenu(parent->GetClientWindow(), (HMENU)hMenuToSet, GetMDIWindowMenu(parent)); } wxActivateEvent event(wxEVT_ACTIVATE, activated, m_windowId); event.SetEventObject( this ); ResetWindowStyle(NULL); return HandleWindowEvent(event);}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:53,
示例4: GetWindowRectvoid wxMDIChildFrame::DoGetPosition(int *x, int *y) const{ RECT rect; GetWindowRect(GetHwnd(), &rect); POINT point; point.x = rect.left; point.y = rect.top; // Since we now have the absolute screen coords, // if there's a parent we must subtract its top left corner wxMDIParentFrame * const mdiParent = GetMDIParent(); ::ScreenToClient(GetHwndOf(mdiParent->GetClientWindow()), &point); if (x) *x = point.x; if (y) *y = point.y;}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:18,
示例5: GetHwnd// Set the client size (i.e. leave the calculation of borders etc.// to wxWidgets)void wxMDIChildFrame::DoSetClientSize(int width, int height){ HWND hWnd = GetHwnd(); RECT rect; ::GetClientRect(hWnd, &rect); RECT rect2; GetWindowRect(hWnd, &rect2); // Find the difference between the entire window (title bar and all) // and the client area; add this to the new client size to move the // window int actual_width = rect2.right - rect2.left - rect.right + width; int actual_height = rect2.bottom - rect2.top - rect.bottom + height;#if wxUSE_STATUSBAR if (GetStatusBar() && GetStatusBar()->IsShown()) { int sx, sy; GetStatusBar()->GetSize(&sx, &sy); actual_height += sy; }#endif // wxUSE_STATUSBAR POINT point; point.x = rect2.left; point.y = rect2.top; // If there's an MDI parent, must subtract the parent's top left corner // since MoveWindow moves relative to the parent wxMDIParentFrame * const mdiParent = GetMDIParent(); ::ScreenToClient(GetHwndOf(mdiParent->GetClientWindow()), &point); MoveWindow(hWnd, point.x, point.y, actual_width, actual_height, (BOOL)true); wxSize size(width, height); wxSizeEvent event(size, m_windowId); event.SetEventObject( this ); HandleWindowEvent(event);}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:43,
示例6: MSWDoTranslateMessagebool wxMDIChildFrame::MSWTranslateMessage(WXMSG* msg){ // we must pass the parent frame to ::TranslateAccelerator(), otherwise it // doesn't do its job correctly for MDI child menus return MSWDoTranslateMessage(GetMDIParent(), msg);}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:6,
注:本文中的GetMDIParent函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetMSTimeDiffToNow函数代码示例 C++ GetLogicalDrives函数代码示例 |