當前位置: 首頁>>代碼示例>>C++>>正文


C++ GetClientWindow函數代碼示例

本文整理匯總了C++中GetClientWindow函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetClientWindow函數的具體用法?C++ GetClientWindow怎麽用?C++ GetClientWindow使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了GetClientWindow函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的GetClientWindow函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。