• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetClientWindow函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetClientWindow函数的典型用法代码示例。如果您正苦于以下问题:C++ GetClientWindow函数的具体用法?C++ GetClientWindow怎么用?C++ GetClientWindow使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetClientWindow函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: GetClientSize

void wxMDIParentFrame::UpdateClientSize()
{
    if ( GetClientWindow() )
    {
        int width, height;
        GetClientSize(&width, &height);

        GetClientWindow()->SetSize(0, 0, width, height);
    }
}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:10,代码来源:mdi.cpp


示例2: GetClientSize

void wxMDIParentFrame::OnSize(wxSizeEvent&)
{
    if ( GetClientWindow() )
    {
        int width, height;
        GetClientSize(&width, &height);

        GetClientWindow()->SetSize(0, 0, width, height);
    }
}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:10,代码来源:mdi.cpp


示例3: GetClientWindow

WXLRESULT wxMDIParentFrame::MSWDefWindowProc(WXUINT message,
                                        WXWPARAM wParam,
                                        WXLPARAM lParam)
{
    WXHWND clientWnd;
    if ( GetClientWindow() )
        clientWnd = GetClientWindow()->GetHWND();
    else
        clientWnd = 0;

    return DefFrameProc(GetHwnd(), (HWND)clientWnd, message, wParam, lParam);
}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:12,代码来源:mdi.cpp


示例4: WXUNUSED

void wxMDIParentFrame::OnSize(wxSizeEvent& WXUNUSED(event))
{
#if wxUSE_CONSTRAINTS
    if (GetAutoLayout())
        Layout();
#endif
    int x = 0;
    int y = 0;
    int width, height;
    GetClientSize(&width, &height);

    if ( GetClientWindow() )
        GetClientWindow()->SetSize(x, y, width, height);
}
开发者ID:BackupTheBerlios,项目名称:wxbeos-svn,代码行数:14,代码来源:mdi.cpp


示例5: GetClientSize

void wxMDIParentFrame::UpdateClientSize()
{
    int width, height;
    GetClientSize(&width, &height);

    if ( wxSizer* sizer = GetSizer() )
    {
        sizer->SetDimension(0, 0, width, height);
    }
    else
    {
        if ( GetClientWindow() )
            GetClientWindow()->SetSize(0, 0, width, height);
    }
}
开发者ID:781155640,项目名称:wxWidgets,代码行数:15,代码来源:mdi.cpp


示例6: MSWTranslateMessage

bool wxMDIParentFrame::MSWTranslateMessage(WXMSG* msg)
{
    MSG *pMsg = (MSG *)msg;

    // first let the current child get it
    if ( m_currentChild && m_currentChild->GetHWND() &&
         m_currentChild->MSWTranslateMessage(msg) )
    {
        return true;
    }

    // then try out accel table (will also check the menu accels)
    if ( wxFrame::MSWTranslateMessage(msg) )
    {
        return true;
    }

    // finally, check for MDI specific built in accel keys
    if ( pMsg->message == WM_KEYDOWN || pMsg->message == WM_SYSKEYDOWN )
    {
        if ( ::TranslateMDISysAccel(GetWinHwnd(GetClientWindow()), pMsg))
            return true;
    }

    return false;
}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:26,代码来源:mdi.cpp


示例7: GetActiveChild

bool wxMDIParentFrame::MSWTranslateMessage(WXMSG* msg)
{
    MSG *pMsg = (MSG *)msg;

    // first let the current child get it
    wxMDIChildFrame * const child = GetActiveChild();
    if ( child && child->MSWTranslateMessage(msg) )
    {
        return true;
    }

    // then try out accelerator table (will also check the accelerators for the
    // normal menu items)
    if ( wxFrame::MSWTranslateMessage(msg) )
    {
        return true;
    }

#if wxUSE_MENUS && wxUSE_ACCEL
    // but it doesn't check for the (custom) accelerators of the window menu
    // items as it's not part of the menu bar as it's handled by Windows itself
    // so we need to do this explicitly
    if ( m_accelWindowMenu && m_accelWindowMenu->Translate(this, msg) )
        return true;
#endif // wxUSE_MENUS && wxUSE_ACCEL

    // finally, check for MDI specific built-in accelerators
    if ( pMsg->message == WM_KEYDOWN || pMsg->message == WM_SYSKEYDOWN )
    {
        if ( ::TranslateMDISysAccel(GetWinHwnd(GetClientWindow()), pMsg))
            return true;
    }

    return false;
}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:35,代码来源:mdi.cpp


示例8: GetClientSize

void MyFrame::OnSize(wxSizeEvent& event)
{
    int w, h;
    GetClientSize(&w, &h);

    GetClientWindow()->SetSize(0, 0, w, h);
    event.Skip();
}
开发者ID:ExperimentationBox,项目名称:Edenite,代码行数:8,代码来源:svgtest.cpp


示例9:

wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const
{
    HWND hWnd = (HWND)::SendMessage(GetWinHwnd(GetClientWindow()),
                                    WM_MDIGETACTIVE, 0, 0L);
    if ( !hWnd )
        return NULL;

    return static_cast<wxMDIChildFrame *>(wxFindWinFromHandle(hWnd));
}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:9,代码来源:mdi.cpp


示例10: return

// Returns the active MDI child window
wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const
{
    HWND hWnd = (HWND)::SendMessage(GetWinHwnd(GetClientWindow()),
                                    WM_MDIGETACTIVE, 0, 0L);
    if ( hWnd == 0 )
        return NULL;
    else
        return (wxMDIChildFrame *)wxFindWinFromHandle((WXHWND) hWnd);
}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:10,代码来源:mdi.cpp


示例11: wxASSERT_MSG

void wxMDIParentFrame::Tile(wxOrientation orient)
{
    wxASSERT_MSG( orient == wxHORIZONTAL || orient == wxVERTICAL,
                  _T("invalid orientation value") );

    ::SendMessage(GetWinHwnd(GetClientWindow()), WM_MDITILE,
                  orient == wxHORIZONTAL ? MDITILE_HORIZONTAL
                                         : MDITILE_VERTICAL, 0);
}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:9,代码来源:mdi.cpp


示例12: GetClientWindow

//
/// Locates and returns the child window that is the target of the command and the
/// command enabling messages. If the current application does not have focus or if
/// the focus is within a toolbar in the application, GetCommandTarget returns the
/// most recently active child window. If an alternative form of command processing
/// is desired, a user's main window class can override this function.
//
TWindow::THandle
TMDIFrame::GetCommandTarget()
{
  TFrameWindow* mdiChild = GetClientWindow()->GetActiveMDIChild();

  TRACEX(OwlCmd, 1, "TMDIFrame::GetCommandTarget - returns " << \
                    (mdiChild ? "ActiveMDIChild->GetCommandTarget()" \
                              : "TFrameWindow::GetCommandTarget()"));

  return mdiChild ? mdiChild->GetCommandTarget() : TFrameWindow::GetCommandTarget();
}
开发者ID:Darkman-M59,项目名称:Meridian59_115,代码行数:18,代码来源:mdiframe.cpp


示例13: CreatePopupMenu

STDMETHODIMP CDrawMenu::Popup(/*[in, optional] */VARIANT X, /*[in, optional] */VARIANT Y)
{
	USES_CONVERSION;

	int nCount = m_arrItems.GetSize();
	if (nCount == 0)
		return S_FALSE;

	HMENU hMenu = CreatePopupMenu();
	if (hMenu == NULL) 
		return E_FAIL;

	int nIndex = 0;
	AddMenuItems(hMenu, nIndex, 0);

	HWND hWndParent = GetClientWindow();

	POINT pt;
	GetCursorPos(&pt);
	ScreenToClient(hWndParent, &pt);

	if (X.vt != VT_ERROR)
	{
		VariantChangeType(&X, &X, 0, VT_I4);
		pt.x = X.intVal;
	}
	if (Y.vt != VT_ERROR)
	{
		VariantChangeType(&Y, &Y, 0, VT_I4);
		pt.y = Y.intVal;
	}

	ClientToScreen(hWndParent, &pt);
	
	Fire_Event(2);

	// 2011.4.25: 鼠标按下时弹出菜单时,释放鼠标捕获
	SetCapture(FALSE);

	int nRet = TrackPopupMenu(hMenu, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_NONOTIFY | TPM_RETURNCMD, 
		pt.x, pt.y, 0, hWndParent, 0);

	if (nRet > 0 && nRet <= m_arrItems.GetSize())
	{
		CMenuItem& item = m_arrItems[nRet - 1];
		Fire_MenuClick(nRet, item.m_bstrID);
	}

	DestroyMenu(hMenu);

	Fire_Event(3);

	return S_OK;
}
开发者ID:JackWangCUMT,项目名称:SuperCxHMI,代码行数:54,代码来源:DrawMenu.cpp


示例14: AddWindowMenu

void wxMDIParentFrame::InternalSetMenuBar()
{
    if ( GetActiveChild() )
    {
        AddWindowMenu();
    }
    else // we don't have any MDI children yet
    {
        // wait until we do to add the window menu but do set the main menu for
        // now (this is done by AddWindowMenu() as a side effect)
        MDISetMenu(GetClientWindow(), (HMENU)m_hMenu, NULL);
    }
}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:13,代码来源:mdi.cpp


示例15: GetClientWindow

void MainWindow::OnSashDrag(wxSashEvent& event)
{
  
    s->SetDefaultSize(wxSize(event.GetDragRect().width, h));
           
	#if wxUSE_MDI_ARCHITECTURE
    wxLayoutAlgorithm layout;
    layout.LayoutMDIFrame(this);
	#endif // wxUSE_MDI_ARCHITECTURE

    // Leaves bits of itself behind sometimes
    GetClientWindow()->Refresh();
}
开发者ID:CristinaGajate,项目名称:Apolo,代码行数:13,代码来源:mainWindow.cpp


示例16: RemoveWindowMenu

void wxMDIParentFrame::SetWindowMenu(wxMenu* menu)
{
    if (m_windowMenu)
    {
        if (GetMenuBar())
        {
            // Remove old window menu
            RemoveWindowMenu(GetClientWindow(), m_hMenu);
        }

        delete m_windowMenu;
        m_windowMenu = (wxMenu*) NULL;
    }

    if (menu)
    {
        m_windowMenu = menu;
        if (GetMenuBar())
        {
            InsertWindowMenu(GetClientWindow(), m_hMenu,
                             GetHmenuOf(m_windowMenu));
        }
    }
}
开发者ID:HackLinux,项目名称:chandler-1,代码行数:24,代码来源:mdi.cpp


示例17: GetClientSize

void MyFrame::OnSize(wxSizeEvent& event)
{
    int w, h;
    GetClientSize(&w, &h);

    m_textWindow->SetSize(0, 0, 200, h);
    GetClientWindow()->SetSize(200, 0, w - 200, h);

    // FIXME: On wxX11, we need the MDI frame to process this
    // event, but on other platforms this should not
    // be done.
#ifdef __WXUNIVERSAL__
    event.Skip();
#else
    wxUnusedVar(event);
#endif
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:17,代码来源:mdi.cpp


示例18: wxGetClientDisplayRect

//*************************************** mainFrame
wxSize mainFrame::GetChildSize(int nPct)
{
#ifdef __NO_MDI__
    wxSize sz = wxGetClientDisplayRect().GetSize();
#else
    wxSize sz = GetClientWindow()->GetSize();
    wxStatusBar *pBar = GetStatusBar();
    if(pBar)
    {
        wxSize szBar = pBar->GetSize();
        int y = sz.GetHeight() - szBar.GetHeight();
        sz.SetHeight(y);
    }
#endif
    sz.SetHeight(sz.GetHeight() * nPct / 100);
    sz.SetWidth(sz.GetWidth() * nPct / 100);
    return sz;
}
开发者ID:josegm,项目名称:osiris,代码行数:19,代码来源:mainFrame.cpp


示例19: GetClientWindow

void wxAuiMDIParentFrame::Tile(wxOrientation orient)
{
    wxAuiMDIClientWindow* client_window = GetClientWindow();
    wxASSERT_MSG(client_window, wxT("Missing MDI Client Window"));

    int cur_idx = client_window->GetSelection();
    if (cur_idx == -1)
        return;

    if (orient == wxVERTICAL)
    {
        client_window->Split(cur_idx, wxLEFT);
    }
    else if (orient == wxHORIZONTAL)
    {
        client_window->Split(cur_idx, wxTOP);
    }
}
开发者ID:erwincoumans,项目名称:wxWidgets,代码行数:18,代码来源:tabmdi.cpp


示例20: switch

void wxMDIParentFrame::OnMDICommand(wxCommandEvent& event)
{
    WXWPARAM wParam = 0;
    WXLPARAM lParam = 0;
    int msg;
    switch ( event.GetId() )
    {
        case wxID_MDI_WINDOW_CASCADE:
            msg = WM_MDICASCADE;
            wParam = MDITILE_SKIPDISABLED;
            break;

        case wxID_MDI_WINDOW_TILE_HORZ:
            wParam |= MDITILE_HORIZONTAL;
            // fall through

        case wxID_MDI_WINDOW_TILE_VERT:
            if ( !wParam )
                wParam = MDITILE_VERTICAL;
            msg = WM_MDITILE;
            wParam |= MDITILE_SKIPDISABLED;
            break;

        case wxID_MDI_WINDOW_ARRANGE_ICONS:
            msg = WM_MDIICONARRANGE;
            break;

        case wxID_MDI_WINDOW_NEXT:
            msg = WM_MDINEXT;
            lParam = 0;         // next child
            break;

        case wxID_MDI_WINDOW_PREV:
            msg = WM_MDINEXT;
            lParam = 1;         // previous child
            break;

        default:
            wxFAIL_MSG( "unknown MDI command" );
            return;
    }

    ::SendMessage(GetWinHwnd(GetClientWindow()), msg, wParam, lParam);
}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:44,代码来源:mdi.cpp



注:本文中的GetClientWindow函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetClock函数代码示例发布时间:2022-05-30
下一篇:
C++ GetClientVoiceMgr函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap