当前位置: 首页>>代码示例>>C++>>正文


C++ DeferWindowPos函数代码示例

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


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

示例1: ResizeToolbar

HDWP ResizeToolbar(HWND hwnd, HDWP hdwp, int width, int vPos, int height, int cControls, const ToolbarButton *buttons, int controlVisibility)
{
	HWND hCtrl;
	int i;
	int lPos = 0;
	int rPos = width;
	for (i = 0; i < cControls; i++) {
		if (!buttons[i].alignment && (controlVisibility & (1 << i))) {
			lPos += buttons[i].spacing;
			hCtrl = GetDlgItem(hwnd, buttons[i].controlId);
			if (NULL != hCtrl) /* Wine fix. */
				hdwp = DeferWindowPos(hdwp, hCtrl, 0, lPos, vPos, buttons[i].width, height, SWP_NOZORDER);
			lPos += buttons[i].width;
		}
	}
	for (i = cControls - 1; i >= 0; i--) {
		if (buttons[i].alignment && (controlVisibility & (1 << i))) {
			rPos -= buttons[i].spacing + buttons[i].width;
			hCtrl = GetDlgItem(hwnd, buttons[i].controlId);
			if (NULL != hCtrl) /* Wine fix. */
				hdwp = DeferWindowPos(hdwp, hCtrl, 0, rPos, vPos, buttons[i].width, height, SWP_NOZORDER);
		}
	}
	return hdwp;
}
开发者ID:ybznek,项目名称:miranda-ng,代码行数:25,代码来源:utils.cpp

示例2: WriteLog

//隐藏列表按钮
void CGameFrameDlg::OnBnClickedHideList()
{
	CString strFile,strTemp;
	CTime tmCur = CTime::GetCurrentTime();
	CString strTime = tmCur.Format("%m%d");
	strFile.Format("log\\%sOnBnClickedHideList.log",strTime);

	strTemp.Format("%s", "OnBnClickedHideList()");
	WriteLog(strFile, strTemp);

	static bool bHideList=true;
	int cx,cy;
	CRect rect;
	GetClientRect(rect);
	cx=rect.Width();
	cy=rect.Height();
	if(bHideList)
	{
		if (m_VorSplitter.GetSafeHwnd()) 
		{
			UINT uSplitPos=cx-12;
			//		SafeMoveWindow(&m_VorSplitter,uSplitPos,GetTitleHight(),SPLIT_WIDE,cy-GetTitleHight());

			HDWP hDwp=BeginDeferWindowPos(32);
			DeferWindowPos(hDwp,m_VorSplitter,NULL,uSplitPos, 0,SPLIT_WIDE,cy, uFlags);
			EndDeferWindowPos(hDwp);
			RectifyControl(cx,cy);

			strTemp.Format("bHideList cx=%d,cy=%d", cx,cy);
			WriteLog(strFile, strTemp);
			//			FixControlStation(cx,cy);
		}
		//		m_BtExpression.ShowWindow(SW_HIDE);
		//		m_BtSend.ShowWindow(SW_HIDE);
	}
	else
	{
		if (m_VorSplitter.GetSafeHwnd()) 
		{
			//UINT uSplitPos=__max(cx*2/3-SPLIT_WIDE,350);
			//UINT uSplitPos=__max(cx*17/24-SPLIT_WIDE,350);
			UINT uSplitPos = cx - INFO_WIDTH - BUTTON_WIDE - 1;
			//		SafeMoveWindow(&m_VorSplitter,uSplitPos,GetTitleHight(),SPLIT_WIDE,cy-GetTitleHight());
			HDWP hDwp=BeginDeferWindowPos(32);
			DeferWindowPos(hDwp,m_VorSplitter,NULL,uSplitPos,0,SPLIT_WIDE,cy, uFlags);
			EndDeferWindowPos(hDwp);

			m_VorSplitter.InitSplitBar(cx*3/5,cx-250,false);
			//			FixControlStation(cx,cy);
			RectifyControl(cx,cy);
			strTemp.Format("cx=%d,cy=%d", cx,cy);
			WriteLog(strFile, strTemp);

		}
		//	m_BtExpression.ShowWindow(SW_SHOW);
		//	m_BtSend.ShowWindow(SW_SHOW);
	}
	bHideList=!bHideList;
	return;
}
开发者ID:275958081,项目名称:netfox,代码行数:61,代码来源:GameFrameDlg.cpp

示例3: GetClientRect

void CMonitorWnd::OnSize(UINT nType, int cx, int cy) 
{
	if ( nType != SIZE_INTERNAL ) CChildWnd::OnSize( nType, cx, cy );

	CRect rc;
	GetClientRect( &rc );
	
	if ( rc.Width() < 32 || rc.Height() < 32 ) return;
	
	HDWP hDWP = BeginDeferWindowPos( 4 );
	
	DeferWindowPos( hDWP, wndPanel.GetSafeHwnd(), NULL,
		rc.left, rc.top, PANEL_WIDTH, rc.Height(), SWP_NOZORDER );
	
	DeferWindowPos( hDWP, m_wndHeaderBar.GetSafeHwnd(), NULL,
		rc.left + PANEL_WIDTH, rc.top, rc.Width() - PANEL_WIDTH, BAR_HEIGHT, SWP_NOZORDER );
	
	DeferWindowPos( hDWP, m_wndChild.GetSafeHwnd(), NULL,
		rc.left + PANEL_WIDTH, rc.top + BAR_HEIGHT, rc.Width() - PANEL_WIDTH,
		rc.Height() - BAR_HEIGHT * 2, SWP_NOZORDER );
	
	DeferWindowPos( hDWP, m_wndBottom.GetSafeHwnd(), NULL,
		rc.left + PANEL_WIDTH, rc.bottom - BAR_HEIGHT, rc.Width() - PANEL_WIDTH, BAR_HEIGHT, SWP_NOZORDER );
	
	EndDeferWindowPos( hDWP );
}
开发者ID:pics860,项目名称:callcenter,代码行数:26,代码来源:wndmonitor.cpp

示例4: GetClientRect

void CChatWnd::OnSize(UINT nType, int cx, int cy)
{
    if ( nType != 1982 ) CPanelWnd::OnSize( nType, cx, cy );

    CRect rc;
    GetClientRect( &rc );

    if ( rc.Width() < m_nUsersSize + SPLIT_SIZE )
    {
        m_nUsersSize = max( 0, rc.Width() - SPLIT_SIZE );
    }

    HDWP hDWP = BeginDeferWindowPos( 4 );

    DeferWindowPos( hDWP, m_wndView, NULL, rc.left, rc.top,
                    rc.Width() - m_nUsersSize - SPLIT_SIZE, rc.Height() - TOOLBAR_HEIGHT - EDIT_HEIGHT, SWP_NOZORDER );

    DeferWindowPos( hDWP, m_wndUsers, NULL, rc.left + rc.Width() - m_nUsersSize, rc.top,
                    m_nUsersSize, rc.Height() - TOOLBAR_HEIGHT - EDIT_HEIGHT, SWP_NOZORDER );

    DeferWindowPos( hDWP, m_wndToolBar, NULL,
                    rc.left, rc.bottom - TOOLBAR_HEIGHT - EDIT_HEIGHT,
                    rc.Width(), TOOLBAR_HEIGHT, SWP_NOZORDER );

    DeferWindowPos( hDWP, m_wndEdit, NULL, rc.left, rc.bottom - EDIT_HEIGHT,
                    rc.Width(), EDIT_HEIGHT, SWP_NOZORDER );

    EndDeferWindowPos( hDWP );

    m_wndUsers.SetColumnWidth( 0, m_nUsersSize - GetSystemMetrics( SM_CXVSCROLL ) );
}
开发者ID:nlstone,项目名称:Shareaza,代码行数:31,代码来源:WndChat.cpp

示例5: DeferWindowPos

void CEasySkinManager::OnSize( UINT nType, int cx, int cy )
{
	CEasySkinDialog::OnSize(nType, cx, cy);

	//移动准备
	HDWP hDwp=BeginDeferWindowPos(64);
	UINT uFlags=SWP_NOACTIVATE|SWP_NOCOPYBITS|SWP_NOZORDER;

	if ( m_enWndStyle != en_Wnd_None )
	{
		DeferWindowPos(hDwp,m_btClose,NULL,cx-41,0,0,0,uFlags|SWP_NOSIZE);

		if ( m_enWndStyle != en_Wnd_CloseBox )
		{
			if( m_enWndStyle != en_Wnd_MinimizeBox )
				DeferWindowPos(hDwp,m_btMax,NULL,cx-69,0,0,0,uFlags|SWP_NOSIZE);

			DeferWindowPos(hDwp,m_btMin,NULL,cx-69-(m_enWndStyle==en_Wnd_Normal?28:0),0,0,0,uFlags|SWP_NOSIZE);
		}
	}

	//结束调整
	//LockWindowUpdate();
	EndDeferWindowPos(hDwp);
	//UnlockWindowUpdate();

	//设置圆角
	CRgn rgn;
	rgn.CreateRoundRectRgn(0,0,cx,cy,4,4);
	SetWindowRgn(rgn,FALSE);

	//更新界面
	Invalidate(FALSE);
}
开发者ID:adam97428,项目名称:EasyClient,代码行数:34,代码来源:EasySkinManager.cpp

示例6: mxTab_resizeChild

void mxTab_resizeChild (HWND hwnd)
{
	TC_ITEM ti;

	int index = TabCtrl_GetCurSel (hwnd);
	if (index >= 0)
	{
		ti.mask = TCIF_PARAM;
		TabCtrl_GetItem (hwnd, index, &ti);
		mxWidget *widget = (mxWidget *) ti.lParam;
		if (widget)
		{
			RECT rc, rc2;

			GetWindowRect (hwnd, &rc);
			ScreenToClient (GetParent (hwnd), (LPPOINT) &rc.left);
			ScreenToClient (GetParent (hwnd), (LPPOINT) &rc.right);

			TabCtrl_GetItemRect (hwnd, index, &rc2);

			int ex = GetSystemMetrics (SM_CXEDGE);
			int ey = GetSystemMetrics (SM_CYEDGE);
			rc.top += (rc2.bottom - rc2.top) + 3 * ey;
			rc.left += 2 * ex;
			rc.right -= 2 * ex;
			rc.bottom -= 2 * ey;
			HDWP hdwp = BeginDeferWindowPos (2);
			DeferWindowPos (hdwp, hwnd, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
			DeferWindowPos (hdwp, (HWND) widget->getHandle (), HWND_TOP, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, SWP_SHOWWINDOW);
			EndDeferWindowPos (hdwp);
		}
	}
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:33,代码来源:mxtab.cpp

示例7: GetClientRect

void CPlayerWnd::OnSize(UINT nType, int cx, int cy) 
{
	if ( nType != SIZE_INTERNAL ) CChildWnd::OnSize( nType, cx, cy );

	CRect rc;
	GetClientRect( &rc );
	
	if ( rc.Width() < 32 || rc.Height() < 32 ) return;
	
	HDWP hDWP = BeginDeferWindowPos( 3 );
	
	DeferWindowPos( hDWP, wndPanel.GetSafeHwnd(), NULL,
		rc.left, rc.top, PANEL_WIDTH, rc.Height(), SWP_NOZORDER );
	
	DeferWindowPos( hDWP, m_wndHeaderBar.GetSafeHwnd(), NULL,
		rc.left + PANEL_WIDTH, rc.top, rc.Width() - PANEL_WIDTH, BAR_HEIGHT, SWP_NOZORDER );
	
	DeferWindowPos( hDWP, m_wndBottom.GetSafeHwnd(), NULL,
		rc.left + PANEL_WIDTH, rc.bottom - BAR_HEIGHT, rc.Width() - PANEL_WIDTH, BAR_HEIGHT, SWP_NOZORDER );
	
	EndDeferWindowPos( hDWP );
	
	if ( ! m_bPlaying ) return;
	
	CRect rect(
		rc.left + PANEL_WIDTH, rc.top + BAR_HEIGHT,
		rc.right, rc.bottom - BAR_HEIGHT );
	
	m_wndPlayer.PutIntoWindow( m_hWnd, rect );
}
开发者ID:pics860,项目名称:callcenter,代码行数:30,代码来源:wndplayer.cpp

示例8: BeginDeferWindowPos

void CDialogResizeHelper::OnSize(UINT, CSize newSize)
{
	if (m_thisWnd != NULL) {
		HDWP hWinPosInfo = BeginDeferWindowPos( m_table.get_size() + (m_sizeGrip != NULL ? 1 : 0) );
		for(t_size n = 0; n < m_table.get_size(); ++n) {
			CRect rc;
			if (_EvalRect(n, newSize, rc)) {
				hWinPosInfo = DeferWindowPos(hWinPosInfo, m_thisWnd.GetDlgItem(m_table[n].id), 0, rc.left,rc.top,rc.Width(),rc.Height(),SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS);
			}
		}
		if (m_sizeGrip != NULL)
		{
			RECT rc, rc_grip;
			if (m_thisWnd.GetClientRect(&rc) && m_sizeGrip.GetWindowRect(&rc_grip)) {
				DWORD flags = SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOACTIVATE | SWP_NOSIZE | SWP_NOCOPYBITS;
				if (IsZoomed(m_thisWnd)) flags |= SWP_HIDEWINDOW;
				else flags |= SWP_SHOWWINDOW;
				hWinPosInfo = DeferWindowPos(hWinPosInfo, m_sizeGrip, NULL, rc.right - (rc_grip.right - rc_grip.left), rc.bottom - (rc_grip.bottom - rc_grip.top), 0, 0, flags );
			}
		}
		EndDeferWindowPos(hWinPosInfo);
		//RedrawWindow(m_thisWnd, NULL, NULL, RDW_UPDATENOW | RDW_ALLCHILDREN);
	}
	SetMsgHandled(FALSE);
}
开发者ID:Irwin1138,项目名称:foo_bestversion,代码行数:25,代码来源:CDialogResizeHelper.cpp

示例9: GetWindowRect

void CInteractionAreaDialog::RepositionControls() {
    if (m_bIsInitialized) {
        CRect rcWin;
        GetWindowRect(&rcWin);

        CRect rcOK;
        m_btnOK.GetWindowRect(&rcOK);
        CRect rcCancel;
        m_btnCancel.GetWindowRect(&rcCancel);
        CRect rcBack;
        m_stBottom.GetWindowRect(&rcBack);
        

        CRect rcControl;
        rcControl = rcOK;
        rcControl.top = rcWin.bottom - m_iButtonVOffset - rcOK.Height();
        rcControl.bottom = rcWin.bottom - m_iButtonVOffset;
        
        rcControl.left = rcOK.left;
        rcControl.right = rcOK.right;
        ScreenToClient(&rcControl);
        //m_btnOK.MoveWindow(&rcControl, TRUE);

        CRect rcControl1;
        rcControl1 = rcCancel;
        rcControl1.top = rcWin.bottom - m_iButtonVOffset - rcCancel.Height();
        rcControl1.bottom = rcWin.bottom - m_iButtonVOffset;
        
        rcControl1.left = rcCancel.left;
        rcControl1.right = rcCancel.right;
        ScreenToClient(&rcControl1);
        //m_btnCancel.MoveWindow(&rcControl, TRUE);

        CRect rcControl2;
        rcControl2 = rcBack;
        rcControl2.top = rcWin.bottom - m_iBackVOffset - rcBack.Height();
        rcControl2.bottom = rcWin.bottom - m_iBackVOffset;
        
        rcControl2.left = rcBack.left;
        rcControl2.right = rcBack.right;
        ScreenToClient(&rcControl2);
        //m_stBottom.MoveWindow(&rcControl, TRUE);
         

        HDWP hDefer = BeginDeferWindowPos(3);
        UINT uFlags = SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER;
        if(hDefer)
            DeferWindowPos(hDefer, m_btnOK.m_hWnd, NULL, rcControl.left, rcControl.top, rcControl.Width(), rcControl.Height(), uFlags);
        if(hDefer)
            DeferWindowPos(hDefer, m_btnCancel.m_hWnd, NULL, rcControl1.left, rcControl1.top, rcControl1.Width(), rcControl1.Height(), uFlags);
        if(hDefer)
            DeferWindowPos(hDefer, m_stBottom.m_hWnd, NULL, rcControl2.left, rcControl2.top, rcControl2.Width(), rcControl2.Height(), uFlags);
        

        EndDeferWindowPos(hDefer);

        InvalidateRect(&rcControl2);
    }
}
开发者ID:identity0815,项目名称:os45,代码行数:59,代码来源:InteractionAreaDialog.cpp

示例10: size_windows

void size_windows()
{
	if (!/*g_minimised*/IsIconic(g_main_window) && !ui_initialising)
	{		
		RECT rc_main_client;
		GetClientRect(g_main_window, &rc_main_client);
		
		HDWP dwp = BeginDeferWindowPos(7);
		if (dwp)
		{
			
			int status_height = 0;
			if (g_status) 
			{

				//uSendMessage(g_status, WM_SETREDRAW, FALSE, 0);
				uSendMessage(g_status,WM_SIZE,0,0);
				RECT rc_status;
				GetWindowRect(g_status, &rc_status);
				
				status_height += rc_status.bottom-rc_status.top;
				
				//dwp = DeferWindowPos(dwp, g_status, 0, 0, rc_main_client.bottom-status_height, rc_main_client.right-rc_main_client.left, status_height, SWP_NOZORDER|SWP_NOREDRAW);
				
			}
			if (g_status_pane.get_wnd()) 
			{
				int cy = g_status_pane.get_ideal_height();
				RedrawWindow(g_status_pane.get_wnd(), 0, 0, RDW_INVALIDATE);
				dwp = DeferWindowPos(dwp, g_status_pane.get_wnd(), 0, 0, rc_main_client.bottom-status_height-cy, rc_main_client.right-rc_main_client.left, cy, SWP_NOZORDER);
				status_height += cy;
			}
			int rebar_height=0;
			
			if (g_rebar) 
			{
				RECT rc_rebar;
				GetWindowRect(g_rebar, &rc_rebar);
				rebar_height = rc_rebar.bottom-rc_rebar.top;
			}
			if (g_layout_window.get_wnd())
				dwp = DeferWindowPos(dwp, g_layout_window.get_wnd(), 0, 0, rebar_height, rc_main_client.right-rc_main_client.left, rc_main_client.bottom-rc_main_client.top-rebar_height-status_height, SWP_NOZORDER);
			if (g_rebar) 
			{
				dwp = DeferWindowPos(dwp, g_rebar, 0, 0, 0, rc_main_client.right-rc_main_client.left, rebar_height, SWP_NOZORDER);
			}
			
			EndDeferWindowPos(dwp);

			if (g_status)
			{
				status_bar::set_part_sizes(status_bar::t_parts_none);
			}
			
			
		}
	}
}
开发者ID:ttsping,项目名称:columns_ui,代码行数:58,代码来源:main_window.cpp

示例11: MainWndResize

static VOID CALLBACK
MainWndResize(PVOID Context,
              WORD cx,
              WORD cy)
{
    RECT rcClient = {0};
    RECT rcStatus = {0};
    HDWP dwp;
    PMAIN_WND_INFO Info = (PMAIN_WND_INFO)Context;

    /* Calculate the MDI client rectangle */
    rcClient.right = cx;
    rcClient.bottom = cy;

    if (Info->hStatus != NULL)
    {
        GetWindowRect(Info->hStatus,
                      &rcStatus);
        rcClient.bottom -= (rcStatus.bottom - rcStatus.top);
    }


    dwp = BeginDeferWindowPos(2);
    if (dwp != NULL)
    {
        /* Update the MDI client */
        if (Info->hMdiClient != NULL)
        {
            dwp = DeferWindowPos(dwp,
                                 Info->hMdiClient,
                                 NULL,
                                 rcClient.left,
                                 rcClient.top,
                                 rcClient.right - rcClient.left,
                                 rcClient.bottom - rcClient.top,
                                 SWP_NOZORDER);
            if (dwp == NULL)
                return;
        }

        /* Update the status bar */
        if (Info->hStatus != NULL)
        {
            dwp = DeferWindowPos(dwp,
                                 Info->hStatus,
                                 NULL,
                                 0,
                                 cy - (rcStatus.bottom - rcStatus.top),
                                 cx,
                                 rcStatus.bottom - rcStatus.top,
                                 SWP_NOZORDER);
            if (dwp == NULL)
                return;
        }

        EndDeferWindowPos(dwp);
    }
}
开发者ID:GYGit,项目名称:reactos,代码行数:58,代码来源:mainwnd.c

示例12: SetRadius

void CTestClockDlg::OnSize(UINT nType, int cx, int cy)
{
    if (m_bInit == TRUE)
    {
        SetRadius(cx, cy);
        SetCenterPoint(cx, cy);
        SetGradationPoints();

        m_nHourGradSize = MulDiv(DEFAULT_HOUR_GRAD_SIZE, m_nRadius, m_nRadiusOrg);
        m_nMinuteGradSize = MulDiv(DEFAULT_MINUTE_GRAD_SIZE, m_nRadius, m_nRadiusOrg);
        m_nSecondHandSize = MulDiv(DEFAULT_SECOND_HAND_SIZE, m_nRadius, m_nRadiusOrg);
        m_nCenterPointSize = MulDiv(DEFAULT_CENTER_POINT_SIZE, m_nRadius, m_nRadiusOrg);

        SetClockHandPoints();

        // Set position of the 'OK' and 'Cancel' button

        CRect rect;
        CRect rectBtnOk;
        CRect rectBtnOkToMove;
        CRect rectBtnCancel;
        CRect rectBtnCancelToMove;

        GetClientRect(rect);
        ClientToScreen(rect);

        m_btnOk.GetWindowRect(rectBtnOk);
        ScreenToClient(rectBtnOk);

        m_btnCancel.GetWindowRect(rectBtnCancel);
        ScreenToClient(rectBtnCancel);

        rectBtnOkToMove.right = rect.Width() - m_marginBtnOk.right;
        rectBtnOkToMove.bottom = rect.Height() - m_marginBtnOk.bottom;
        rectBtnOkToMove.left = rectBtnOkToMove.right - rectBtnOk.Width();
        rectBtnOkToMove.top = rectBtnOkToMove.bottom - rectBtnOk.Height();

        rectBtnCancelToMove.right = rect.Width() - m_marginBtnCancel.right;
        rectBtnCancelToMove.bottom = rect.Height() - m_marginBtnCancel.bottom;
        rectBtnCancelToMove.left = rectBtnCancelToMove.right - rectBtnCancel.Width();
        rectBtnCancelToMove.top = rectBtnCancelToMove.bottom - rectBtnCancel.Height();

        HDWP hdwp = ::BeginDeferWindowPos(2);
        if (hdwp)
            hdwp = DeferWindowPos(hdwp, m_btnOk.GetSafeHwnd(), HWND_TOP, rectBtnOkToMove.left, rectBtnOkToMove.top, rectBtnOkToMove.Width(), rectBtnOkToMove.Height(), SWP_NOZORDER);
        if (hdwp)
            DeferWindowPos(hdwp, m_btnCancel.GetSafeHwnd(), HWND_TOP, rectBtnCancelToMove.left, rectBtnCancelToMove.top, rectBtnCancelToMove.Width(), rectBtnCancelToMove.Height(), SWP_NOZORDER);
        if (hdwp)
            EndDeferWindowPos(hdwp);

        Invalidate();
        UpdateWindow();
    }

    CDialog::OnSize(nType, cx, cy);
}
开发者ID:reveur2016,项目名称:TestClock,代码行数:56,代码来源:TestClockDlg.cpp

示例13: EtwDiskNetworkLayoutGraphs

VOID EtwDiskNetworkLayoutGraphs(
    _In_ PET_DISKNET_CONTEXT Context
    )
{
    HDWP deferHandle;
    RECT clientRect;
    RECT panelRect;
    RECT margin = { PH_SCALE_DPI(13), PH_SCALE_DPI(13), PH_SCALE_DPI(13), PH_SCALE_DPI(13) };
    RECT innerMargin = { PH_SCALE_DPI(10), PH_SCALE_DPI(20), PH_SCALE_DPI(10), PH_SCALE_DPI(10) };
    LONG between = PH_SCALE_DPI(3);
    ULONG graphWidth;
    ULONG graphHeight;

    PhLayoutManagerLayout(&Context->LayoutManager);

    Context->DiskGraphState.Valid = FALSE;
    Context->NetworkGraphState.Valid = FALSE;

    GetClientRect(Context->WindowHandle, &clientRect);

    // Limit the rectangle bottom to the top of the panel.
    GetWindowRect(Context->PanelHandle, &panelRect);
    MapWindowPoints(NULL, Context->WindowHandle, (PPOINT)&panelRect, 2);
    clientRect.bottom = panelRect.top + 10; // +10 removing extra spacing

    graphWidth = clientRect.right - margin.left - margin.right;
    graphHeight = (clientRect.bottom - margin.top - margin.bottom - between * 2) / 2;

    deferHandle = BeginDeferWindowPos(4);

    deferHandle = DeferWindowPos(deferHandle, Context->DiskGroupBox, NULL, margin.left, margin.top, graphWidth, graphHeight, SWP_NOACTIVATE | SWP_NOZORDER);
    deferHandle = DeferWindowPos(
        deferHandle,
        Context->DiskGraphHandle,
        NULL,
        margin.left + innerMargin.left,
        margin.top + innerMargin.top,
        graphWidth - innerMargin.left - innerMargin.right,
        graphHeight - innerMargin.top - innerMargin.bottom,
        SWP_NOACTIVATE | SWP_NOZORDER
        );

    deferHandle = DeferWindowPos(deferHandle, Context->NetworkGroupBox, NULL, margin.left, margin.top + graphHeight + between, graphWidth, graphHeight, SWP_NOACTIVATE | SWP_NOZORDER);
    deferHandle = DeferWindowPos(
        deferHandle,
        Context->NetworkGraphHandle,
        NULL,
        margin.left + innerMargin.left,
        margin.top + graphHeight + between + innerMargin.top,
        graphWidth - innerMargin.left - innerMargin.right,
        graphHeight - innerMargin.top - innerMargin.bottom,
        SWP_NOACTIVATE | SWP_NOZORDER
        );

    EndDeferWindowPos(deferHandle);
}
开发者ID:PKRoma,项目名称:ProcessHacker,代码行数:56,代码来源:etwprprp.c

示例14: ResizeWnd

static void ResizeWnd(int cx, int cy)
{
    HDWP hdwp = BeginDeferWindowPos(2);
    RECT rt = {0, 0, cx, cy};

    cx = g_pChildWnd->nSplitPos + SPLIT_WIDTH/2;
    DeferWindowPos(hdwp, g_pChildWnd->hTreeWnd, 0, rt.left, rt.top, g_pChildWnd->nSplitPos-SPLIT_WIDTH/2-rt.left, rt.bottom-rt.top, SWP_NOZORDER|SWP_NOACTIVATE);
    DeferWindowPos(hdwp, g_pChildWnd->hListWnd, 0, rt.left+cx  , rt.top, rt.right-cx, rt.bottom-rt.top, SWP_NOZORDER|SWP_NOACTIVATE);
    EndDeferWindowPos(hdwp);
}
开发者ID:AlexSteel,项目名称:wine,代码行数:10,代码来源:childwnd.c

示例15: BeginDeferWindowPos

void CNetworkMonitorBox::OnSize(UINT nType, int cx, int cy) 
{
	CTaskBox::OnSize( nType, cx, cy );
	
	HDWP hDWP = BeginDeferWindowPos( 2 );
	
	DeferWindowPos( hDWP, m_wndStart, NULL, BOX_MARGIN, 7, 55, 23, SWP_NOZORDER );
	DeferWindowPos( hDWP, m_wndClock, NULL, BOX_MARGIN + 61, 7, 13 * 8, 23, SWP_NOZORDER );
	
	EndDeferWindowPos( hDWP );
}
开发者ID:pics860,项目名称:callcenter,代码行数:11,代码来源:CtrlNetworkPanel.cpp


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