您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DeferWindowPos函数代码示例

51自学网 2021-06-01 20:26:12
  C++
这篇教程C++ DeferWindowPos函数代码示例写得很实用,希望能帮到您。

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

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


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例11: MainWndResize

static VOID CALLBACKMainWndResize(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,


示例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,


示例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,


示例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,


示例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,


示例16: GetClientRect

void CChildWnd::SizeListAndBar(CWnd* pList, CWnd* pBar){	CRect rc;	GetClientRect( &rc );	rc.bottom -= Settings.Skin.ToolbarHeight;	HDWP hPos = BeginDeferWindowPos( 2 );	DeferWindowPos( hPos, pList->GetSafeHwnd(), NULL,		rc.left, rc.top, rc.Width(), rc.Height(),		SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER );	DeferWindowPos( hPos, pBar->GetSafeHwnd(), NULL,		rc.left, rc.bottom, rc.Width(), Settings.Skin.ToolbarHeight,		SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER );	EndDeferWindowPos( hPos );}
开发者ID:lemonxiao0,项目名称:peerproject,代码行数:15,


示例17: SetWindowText

//初始化函数BOOL CChessManual::OnInitDialog(){	__super::OnInitDialog();	//设置标题	SetWindowText(TEXT("国际象棋棋谱:"));	//移动窗口	CImageHandle ImageHandeBack(&m_ImageBack);	SetWindowPos(NULL,0,0,m_ImageBack.GetWidth(),m_ImageBack.GetHeight(),SWP_NOZORDER|SWP_NOMOVE);	//获取大小	CRect rcClient;	GetClientRect(&rcClient);	//创建控件	const CSize & BoradSize=m_ChessBorad.GetChessBoradSize();	m_ChessBorad.Create(NULL,NULL,WS_CHILD|WS_VISIBLE,CRect(0,0,0,0),this,10);	//设置按钮	HINSTANCE hInstance=AfxGetInstanceHandle();	m_btOpen.SetButtonImage(IDB_MANUAL_BT_OPEN,hInstance,false);	m_btPreserve.SetButtonImage(IDB_MANUAL_BT_PRESERVE,hInstance,false);	m_btReLoad.SetButtonImage(IDB_MANUAL_BT_RELOAD,hInstance,false);	m_btFirst.SetButtonImage(IDB_MANUAL_BT_FIRST,hInstance,false);	m_btBefore.SetButtonImage(IDB_MANUAL_BT_BEFORE,hInstance,false);	m_btNext.SetButtonImage(IDB_MANUAL_BT_NEXT,hInstance,false);	m_btLast.SetButtonImage(IDB_MANUAL_BT_LAST,hInstance,false);	m_btCancel.SetButtonImage(IDB_MANUAL_BT_CLOSE,hInstance,false);	//计算位置	CRect rcButton;	m_btOpen.GetWindowRect(&rcButton);	int nXButtonSpace=(rcClient.Width()-rcButton.Width()*8-40)/9;	int nYPos=rcClient.Height()-rcButton.Height()-30;	//移动按钮	HDWP hDwp=BeginDeferWindowPos(8);	const UINT uFlags=SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOCOPYBITS|SWP_NOSIZE;	DeferWindowPos(hDwp,m_btOpen,NULL,20+nXButtonSpace,nYPos,0,0,uFlags);	DeferWindowPos(hDwp,m_btPreserve,NULL,20+nXButtonSpace*2+rcButton.Width(),nYPos,0,0,uFlags);	DeferWindowPos(hDwp,m_btReLoad,NULL,20+nXButtonSpace*3+rcButton.Width()*2,nYPos,0,0,uFlags);	DeferWindowPos(hDwp,m_btFirst,NULL,20+nXButtonSpace*4+rcButton.Width()*3,nYPos,0,0,uFlags);	DeferWindowPos(hDwp,m_btBefore,NULL,20+nXButtonSpace*5+rcButton.Width()*4,nYPos,0,0,uFlags);	DeferWindowPos(hDwp,m_btNext,NULL,20+nXButtonSpace*6+rcButton.Width()*5,nYPos,0,0,uFlags);	DeferWindowPos(hDwp,m_btLast,NULL,20+nXButtonSpace*7+rcButton.Width()*6,nYPos,0,0,uFlags);	DeferWindowPos(hDwp,m_btCancel,NULL,20+nXButtonSpace*8+rcButton.Width()*7,nYPos,0,0,uFlags);	EndDeferWindowPos(hDwp);	//移动控件	m_ChessBorad.MoveWindow(29,29,BoradSize.cx,BoradSize.cy);	m_ManualList.MoveWindow(BoradSize.cx+37,32,rcClient.Width()-BoradSize.cx-66,BoradSize.cy-8);	//更新棋谱	OnReLoad();	return TRUE;}
开发者ID:firehot,项目名称:WH2008,代码行数:59,


示例18: rectWndPos

HDWP CScheduleTableCfgDlg::vUpdateWindowPosition(int nXPos, int nYPos){    HDWP handleWP = NULL;    for (VecAutoSize::iterator itr = m_VecAutoSize.begin();  itr != m_VecAutoSize.end();  ++itr)    {        if (itr->wndHandle != NULL)        {            CRect rectWndPos(itr->wndRect);            int nCalXPos = int(nXPos * itr->fToXPos);            int nCalYPos = int(nYPos * itr->fToYPos);            int nCalRightPos = int(nXPos * itr->fSizeX);            int nCalBottomPos = int(nYPos * itr->fSizeY);            rectWndPos.OffsetRect(nCalXPos, nCalYPos);            rectWndPos.right = rectWndPos.right + nCalRightPos;            rectWndPos.bottom = rectWndPos.bottom + nCalBottomPos;            UINT uFlags = vChangeWindowPos(handleWP, itr->wndHandle, itr->fSizeX, itr->fSizeY, rectWndPos);            DeferWindowPos(handleWP, itr->wndHandle, NULL, rectWndPos.left, rectWndPos.top, rectWndPos.Width(), rectWndPos.Height(), uFlags);        }    }    return handleWP;}
开发者ID:IXXAT-wucherer,项目名称:busmaster,代码行数:26,


示例19: LockWindowUpdate

//调整界面void CGameParrentDlg::RectifyControl(int nWidth, int nHeight){	//状态判断	if (m_bInitDialog==false) return;	//改对话框要改	//变量定义	const int iXExc=0;//GetXExcursionPos();	const int iYExc=0;//GetYExcursionPos();	const UINT uFlags=SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOCOPYBITS;	//锁定屏幕	LockWindowUpdate();	//移动控件	HDWP hDwp=BeginDeferWindowPos(3);	DeferWindowPos(hDwp,m_pGameFrameView->GetSafeHwnd(),NULL,iXExc,iYExc,nWidth-2*iXExc,nHeight-iYExc,uFlags);	EndDeferWindowPos(hDwp);	//重画界面	Invalidate(FALSE);	UpdateWindow();	//解除锁定	UnlockWindowUpdate();	return;}
开发者ID:275958081,项目名称:netfox,代码行数:29,


示例20: rcNew

void CBaseDialog::OnSize(UINT nType, int cx, int cy) {	CDialog::OnSize(nType, cx, cy);	int iXDelta = cx - m_szInitial.cx;	int iYDelta = cy - m_szInitial.cy;	HDWP hDefer = NULL;	for (MovingChildren::iterator p = m_MovingChildren.begin();  p != m_MovingChildren.end();  ++p)	{		if (p->m_hWnd != NULL)		{			CRect rcNew(p->m_rcInitial);			rcNew.OffsetRect(int(iXDelta * p->m_dXMoveFrac), int(iYDelta * p->m_dYMoveFrac));			rcNew.right += int(iXDelta * p->m_dXSizeFrac);			rcNew.bottom += int(iYDelta * p->m_dYSizeFrac);			if (hDefer == NULL)				hDefer = BeginDeferWindowPos(m_MovingChildren.size());			UINT uFlags = SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER;			if ((p->m_dXSizeFrac != 0.0) || (p->m_dYSizeFrac != 0.0))				uFlags |= SWP_NOCOPYBITS;			DeferWindowPos(hDefer, p->m_hWnd, NULL, rcNew.left, rcNew.top, rcNew.Width(), rcNew.Height(), uFlags);		}	}	if (hDefer != NULL)		EndDeferWindowPos(hDefer);}
开发者ID:cookie114,项目名称:PerforceRoot_Lupc,代码行数:27,


示例21: GetClientRect

void SPLASH::Show(){  //get size of hSplashWnd (width and height)  int x,y;  int pwidth,pheight;  int tx,ty;  HDWP windefer;  RECT rect,prect;  GetClientRect(hSplashWnd,&rect);  x=rect.right;y=rect.bottom;  //get parent screen coordinates  GetWindowRect(this->hParentWindow,&prect);  //center splash window on parent window  pwidth=prect.right-prect.left;  pheight=prect.bottom - prect.top;  tx=(pwidth/2) - (x/2);  ty=(pheight/2) - (y/2);  tx+=prect.left;  ty+=prect.top;  windefer=BeginDeferWindowPos(1);  DeferWindowPos(windefer,hSplashWnd,HWND_NOTOPMOST,tx,ty,50,50,SWP_NOSIZE|SWP_SHOWWINDOW|SWP_NOZORDER);  EndDeferWindowPos(windefer);  ShowWindow(hSplashWnd,SW_SHOWNORMAL);  UpdateWindow(hSplashWnd);  this->SHOWING = TRUE;}
开发者ID:theplaymate,项目名称:windespacman,代码行数:34,


示例22: childresize_resize

void childresize_resize(HWND hwndDlg, ChildWndResizeItem *list, int num){	RECT r;	GetClientRect(hwndDlg,&r);	int x;	HDWP hdwp=BeginDeferWindowPos(num);	for (x = 0; x < num; x ++) if (list[x].type&0xf0000) {		RECT r2;		if (list[x].type&0xF000)  r2.left=r.right-list[x].rinfo.left;		else r2.left=list[x].rinfo.left;		if (list[x].type&0x0F00)  r2.top=r.bottom-list[x].rinfo.top;		else r2.top=list[x].rinfo.top;		if (list[x].type&0x00F0)  r2.right=r.right-list[x].rinfo.right;		else r2.right=list[x].rinfo.right;		if (list[x].type&0x000F)  r2.bottom=r.bottom-list[x].rinfo.bottom;		else r2.bottom=list[x].rinfo.bottom;		HWND h=GetDlgItem(hwndDlg,list[x].id);		DeferWindowPos(hdwp, h, NULL, r2.left,r2.top,r2.right-r2.left,r2.bottom-r2.top, SWP_NOZORDER|SWP_NOACTIVATE);	};	EndDeferWindowPos(hdwp);}
开发者ID:eiginn,项目名称:waste,代码行数:25,


示例23: GetWindowRect

void CAutoSplitter::MoveControls(int dx, int dy){	HDWP hDWP=BeginDeferWindowPos(GetSize());	for (int i=0; i<GetSize(); i++)		{		CAutoSizeControl* pControl=GetAt(i);		RECT rcControl;		GetWindowRect(pControl->m_hWndControl, &rcControl);		DWORD dwFlags=pControl->m_dwFlags;		// Work out new rectangle		if (dwFlags & ASF_TOP)			rcControl.top+=dy;		if (dwFlags & ASF_BOTTOM)			rcControl.bottom+=dy;		if (dwFlags & ASF_LEFT)			rcControl.left+=dx;		if (dwFlags & ASF_RIGHT)			rcControl.right+=dx;		ScreenToClient(m_hWndParent, (LPPOINT)&rcControl.left);		ScreenToClient(m_hWndParent, (LPPOINT)&rcControl.right);		hDWP=DeferWindowPos(hDWP, pControl->m_hWndControl, NULL, 				rcControl.left, rcControl.top,				rcControl.right-rcControl.left,				rcControl.bottom-rcControl.top, SWP_NOZORDER|SWP_NOACTIVATE);		}	EndDeferWindowPos(hDWP);}
开发者ID:adhawkins,项目名称:SimpleLib,代码行数:32,


示例24: UpdateWindowSize

void UpdateWindowSize(DialogData* pdd, const int cx, const int cy, HWND hwnd) {    const int nDeltaX = cx - pdd->sizeClient.dx;    const int nDeltaY = cy - pdd->sizeClient.dy;    HDWP hdwp = BeginDeferWindowPos(pdd->nItemCount);    for (int i = 0; i < pdd->nItemCount; i++) {        const DialogSizerSizingItem* psd = pdd->psd + i;        HWND hwndChild = GetDlgItem(hwnd, psd->uControlID);        RectI rect = MapRectToWindow(WindowRect(hwndChild), HWND_DESKTOP, hwnd);        // Adjust the window horizontally        if (psd->uSizeInfo & DS_MoveX)            rect.x += nDeltaX;        // Adjust the window vertically        if (psd->uSizeInfo & DS_MoveY)            rect.y += nDeltaY;        // Size the window horizontally        if (psd->uSizeInfo & DS_SizeX)            rect.dx += nDeltaX;        // Size the window vertically        if (psd->uSizeInfo & DS_SizeY)            rect.dy += nDeltaY;        DeferWindowPos(hdwp, hwndChild, nullptr, rect.x, rect.y, rect.dx, rect.dy, SWP_NOACTIVATE | SWP_NOZORDER);    }    EndDeferWindowPos(hdwp);    pdd->sizeClient = SizeI(cx, cy);    // If we have a sizing grip enabled then adjust it's position    pdd->UpdateGripper();}
开发者ID:jingyu9575,项目名称:sumatrapdf,代码行数:31,


示例25: LayoutTransfers

static void LayoutTransfers(HWND hwnd, struct TFtPageData *dat){	int top = 0;	RECT rc;	GetClientRect(hwnd, &rc);	dat->scrollPos = GetScrollPos(hwnd, SB_VERT);	dat->height = rc.bottom - rc.top;	if (dat->wnds->realCount) {		HDWP hdwp = BeginDeferWindowPos(dat->wnds->realCount);		top -= dat->scrollPos;		for (int i = 0; i < dat->wnds->realCount; ++i) {			int height = dat->wnds->items[i]->rc.bottom - dat->wnds->items[i]->rc.top;			hdwp = DeferWindowPos(hdwp, dat->wnds->items[i]->hwnd, NULL, 0, top, rc.right, height, SWP_NOZORDER);			top += height;		}		top += dat->scrollPos;		EndDeferWindowPos(hdwp);	}	dat->dataHeight = top;	SCROLLINFO si = { 0 };	si.cbSize = sizeof(si);	si.fMask = SIF_DISABLENOSCROLL | SIF_PAGE | SIF_RANGE;	si.nPage = dat->height;	si.nMin = 0;	si.nMax = dat->dataHeight;	SetScrollInfo(hwnd, SB_VERT, &si, TRUE);}
开发者ID:martok,项目名称:miranda-ng,代码行数:31,


示例26: rcNew

void CMsgSignalSelect::OnSize(UINT nType, int cx, int cy){    CDialog::OnSize(nType, cx, cy);    int iXDelta = cx - m_szInitial.cx;    int iYDelta = cy - m_szInitial.cy;    HDWP hDefer = NULL;    for (MovingChildren::iterator p = m_MovingChildren.begin();  p != m_MovingChildren.end();  ++p)    {        if (p->m_hWnd != NULL)        {            CRect rcNew(p->m_rcInitial);            rcNew.OffsetRect(int(iXDelta * p->m_dXMoveFrac), int(iYDelta * p->m_dYMoveFrac));            rcNew.right += int(iXDelta * p->m_dXSizeFrac);            rcNew.bottom += int(iYDelta * p->m_dYSizeFrac);            if (hDefer == NULL)            {                hDefer = BeginDeferWindowPos(m_MovingChildren.size());            }            UINT uFlags = SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER;            if ((p->m_dXSizeFrac != 0.0) || (p->m_dYSizeFrac != 0.0))            {                uFlags |= SWP_NOCOPYBITS;            }            DeferWindowPos(hDefer, p->m_hWnd, NULL, rcNew.left, rcNew.top, rcNew.Width(), rcNew.Height(), uFlags);        }    }    if (hDefer != NULL)    {        EndDeferWindowPos(hDefer);    }    //if (m_hGripper != NULL)    //   ::ShowWindow(m_hGripper, (nType == SIZE_MAXIMIZED) ? SW_HIDE : SW_SHOW);}
开发者ID:MarcSerraLear,项目名称:UDS_Busmaster,代码行数:35,


示例27: WC_D

void CBaseDialog::OnSize(UINT/* nType*/, int cx, int cy){	HRESULT hRes = S_OK;	HDWP hdwp = NULL;	WC_D(hdwp, BeginDeferWindowPos(1));	if (hdwp)	{		int iHeight = GetStatusHeight();		int iNewCY = cy - iHeight;		RECT rcStatus = { 0 };		::GetClientRect(m_hWnd, &rcStatus);		if (rcStatus.bottom - rcStatus.top > iHeight)		{			rcStatus.top = rcStatus.bottom - iHeight;		}		// Tell the status bar it needs repainting		::InvalidateRect(m_hWnd, &rcStatus, false);		if (m_lpFakeSplitter && m_lpFakeSplitter->m_hWnd)		{			DeferWindowPos(hdwp, m_lpFakeSplitter->m_hWnd, NULL, 0, 0, cx, iNewCY, SWP_NOZORDER);		}		WC_B(EndDeferWindowPos(hdwp));	}} // CBaseDialog::OnSize
开发者ID:JasonSchlauch,项目名称:mfcmapi,代码行数:28,


示例28: MyResizeWindow

HDWP MyResizeWindow(HDWP hDwp, HWND hwndDlg, HWND hwndControl,	int nHorizontalOffset, int nVerticalOffset,	int nWidthOffset, int nHeightOffset){	POINT pt;	RECT rcinit;	if (NULL == hwndDlg) /* Wine fix. */		return hDwp;	// get current bounding rectangle	GetWindowRect(hwndControl, &rcinit);	// get current top left point	pt.x = rcinit.left;	pt.y = rcinit.top;	ScreenToClient(hwndDlg, &pt);	// resize control	return DeferWindowPos(hDwp, hwndControl, NULL,		pt.x + nHorizontalOffset,		pt.y + nVerticalOffset,		rcinit.right - rcinit.left + nWidthOffset,		rcinit.bottom - rcinit.top + nHeightOffset,		SWP_NOZORDER);}
开发者ID:ybznek,项目名称:miranda-ng,代码行数:27,


示例29: 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 rcOrig;			const Param & e = m_table[n];			CWindow wndItem = m_thisWnd.GetDlgItem(e.id);			if (m_origRects.query(e.id, rcOrig) && wndItem != NULL) {				int dest_x = rcOrig.left, dest_y = rcOrig.top, 					dest_cx = rcOrig.Width(), dest_cy = rcOrig.Height();				int delta_x = newSize.cx - m_rcOrigClient.right,					delta_y = newSize.cy - m_rcOrigClient.bottom;				dest_x += pfc::rint32( e.snapLeft * delta_x );				dest_cx += pfc::rint32( (e.snapRight - e.snapLeft) * delta_x );				dest_y += pfc::rint32( e.snapTop * delta_y );				dest_cy += pfc::rint32( (e.snapBottom - e.snapTop) * delta_y );								DeferWindowPos(hWinPosInfo, wndItem, 0,dest_x,dest_y,dest_cx,dest_cy,SWP_NOZORDER);			}		}		if (m_sizeGrip != NULL)		{			RECT rc, rc_grip;			if (m_thisWnd.GetClientRect(&rc) && m_sizeGrip.GetWindowRect(&rc_grip)) {				DeferWindowPos(hWinPosInfo, m_sizeGrip, NULL, rc.right - (rc_grip.right - rc_grip.left), rc.bottom - (rc_grip.bottom - rc_grip.top), 0, 0, SWP_NOZORDER | SWP_NOSIZE);			}		}		EndDeferWindowPos(hWinPosInfo);	}	SetMsgHandled(FALSE);}
开发者ID:Jorgorbia,项目名称:AltaCast,代码行数:34,



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


C++ DeffunctionData函数代码示例
C++ DefclassData函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。