这篇教程C++ EndDeferWindowPos函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中EndDeferWindowPos函数的典型用法代码示例。如果您正苦于以下问题:C++ EndDeferWindowPos函数的具体用法?C++ EndDeferWindowPos怎么用?C++ EndDeferWindowPos使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了EndDeferWindowPos函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: 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_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()*7)/8; int nYPos=rcClient.Height()-rcButton.Height()-30; //移动按钮 HDWP hDwp=BeginDeferWindowPos(7); const UINT uFlags=SWP_NOACTIVATE|SWP_NOZORDER|SWP_NOCOPYBITS|SWP_NOSIZE; DeferWindowPos(hDwp,m_btOpen,NULL,nXButtonSpace,nYPos,0,0,uFlags); DeferWindowPos(hDwp,m_btReLoad,NULL,nXButtonSpace*2+rcButton.Width(),nYPos,0,0,uFlags); DeferWindowPos(hDwp,m_btFirst,NULL,nXButtonSpace*3+rcButton.Width()*2,nYPos,0,0,uFlags); DeferWindowPos(hDwp,m_btBefore,NULL,nXButtonSpace*4+rcButton.Width()*3,nYPos,0,0,uFlags); DeferWindowPos(hDwp,m_btNext,NULL,nXButtonSpace*5+rcButton.Width()*4,nYPos,0,0,uFlags); DeferWindowPos(hDwp,m_btLast,NULL,nXButtonSpace*6+rcButton.Width()*5,nYPos,0,0,uFlags); DeferWindowPos(hDwp,m_btCancel,NULL,nXButtonSpace*7+rcButton.Width()*6,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:Michael-Z,项目名称:qipai-game,代码行数:57,
示例2: EtwDiskNetworkLayoutGraphsVOID 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,
示例3: SetRadiusvoid 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,
示例4: GetClientRectvoid CConsoleWindow::Layout(){ RECT rc; GetClientRect(&rc); HDWP hdwp = BeginDeferWindowPos(1); hdwp = m_LoggerConsole.DeferWindowPos(hdwp, NULL, 0, 0, rc.right, rc.bottom, SWP_NOZORDER); EndDeferWindowPos(hdwp);}
开发者ID:cherry-wb,项目名称:upgradr,代码行数:10,
示例5: ResizeWndstatic 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,
示例6: Test_OneParamRoutine_BeginDeferWindowPosvoidTest_OneParamRoutine_BeginDeferWindowPos(void) /* 0x1e */{ HDWP hWinPosInfo; hWinPosInfo = (HDWP)NtUserCallOneParam(5, 0x1e); TEST(hWinPosInfo != 0); TEST(EndDeferWindowPos(hWinPosInfo) != 0);}
开发者ID:GYGit,项目名称:reactos,代码行数:10,
示例7: clnt_rectvoid ResizeManager::HandleSize(int cx, int cy){ ClientRect clnt_rect(_hwnd); SIZE new_size = {cx, cy}; int dx = new_size.cx - _last_size.cx; int dy = new_size.cy - _last_size.cy; if (!dx && !dy) return; _last_size = new_size; HDWP hDWP = BeginDeferWindowPos(size()); for(ResizeManager::const_iterator it=begin(); it!=end(); ++it) { const ResizeEntry& e = *it; RECT move = {0}; if (e._flags & MOVE_LEFT) // Die verschiedenen Transformationsmatrizen in move lie C++ EndDialog函数代码示例 C++ EndCritical函数代码示例
|