这篇教程C++ GetScreenRect函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中GetScreenRect函数的典型用法代码示例。如果您正苦于以下问题:C++ GetScreenRect函数的具体用法?C++ GetScreenRect怎么用?C++ GetScreenRect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了GetScreenRect函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: GetMenuNamebool CollectionNavigationPane::ShowContextMenu(const OpPoint &point, BOOL center, OpTreeView* view, BOOL use_keyboard_context){ const char* menu_name = GetMenuName(); if (!menu_name) return true; NavigationItem* item = static_cast<NavigationItem*>(m_tree_view->GetOpWidget()->GetSelectedItem()); OpPoint p(point.x+GetScreenRect().x, point.y+GetScreenRect().y); g_application->GetMenuHandler()->ShowPopupMenu(menu_name, PopupPlacement::AnchorAt(p, center), item->GetID(), use_keyboard_context); return true;}
开发者ID:prestocore,项目名称:browser,代码行数:12,
示例2: GetScreenRectvoid CCWidget::Draw(CCDrawContext* pDC){ if(m_bVisible==false) return; unsigned char nLastOpacity; nLastOpacity = pDC->GetOpacity(); sRect sr = GetScreenRect(); pDC->SetOrigin(sPoint(sr.x, sr.y)); if(m_pFont!=NULL) pDC->SetFont(m_pFont); else pDC->SetFont(CCFontManager::Get(NULL)); pDC->SetOpacity((unsigned char)(nLastOpacity * (float)(m_iOpacity / 255.0f))); if(!IsEnable()) pDC->SetOpacity((unsigned char)(pDC->GetOpacity()*0.70)); bool bIntersect = true; sRect rectScreen(0, 0, CCGetWorkspaceWidth()-1, CCGetWorkspaceHeight()-1); sRect PrevClipRect; if(GetParent()!=NULL) { sRect parentClipRect = CCClientToScreen(GetParent(), GetParent()->GetClientRect()); bIntersect = rectScreen.Intersect(&PrevClipRect,parentClipRect); }else PrevClipRect = rectScreen; sRect CurrClipRect = GetScreenRect(); sRect IntersectClipRect; if(m_bClipByParent==true){ if(PrevClipRect.Intersect(&IntersectClipRect, CurrClipRect)==true){ sRect test = IntersectClipRect; if(IntersectClipRect.w>0 && IntersectClipRect.h>0) { pDC->SetClipRect(IntersectClipRect); OnDraw(pDC); } } } else{ pDC->SetClipRect(CurrClipRect); OnDraw(pDC); } for(int i=0; i<m_Children.GetCount(); i++){ CCWidget* pCurWnd = m_Children.Get(i); if(pCurWnd==GetLatestExclusive()) continue; if(pCurWnd != NULL ) pCurWnd->Draw(pDC); } if(GetLatestExclusive()!=NULL) GetLatestExclusive()->Draw(pDC); pDC->SetOpacity(nLastOpacity);}
开发者ID:Kallontz,项目名称:gunz-the-tps-mmorpg,代码行数:52,
示例3: switchvoid DockCont::EventProc(XWindow& w, XEvent *event){ if (IsOpen()) { switch(event->type) { case ConfigureNotify:{ XConfigureEvent& e = event->xconfigure; if (Point(e.x, e.y) != GetScreenRect().TopLeft()) { if (!dragging) MoveBegin(); Moving(); SetFocus(); dragging = true; } } break; case FocusIn: { XFocusChangeEvent &e = event->xfocus; if (e.mode == NotifyUngrab && dragging) { dragging = false; MoveEnd(); // SetFocus(); return; } break; } } } TopWindow::EventProc(w, event);}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:30,
示例4: memcpyvoid CCWidget::MakeLocalEvent(CCEvent* pLoalEvent, const CCEvent* pEvent){ memcpy(pLoalEvent, pEvent, sizeof(CCEvent)); sRect sr = GetScreenRect(); pLoalEvent->sPos.x -= sr.x; pLoalEvent->sPos.y -= sr.y;}
开发者ID:Kallontz,项目名称:gunz-the-tps-mmorpg,代码行数:7,
示例5: MessageBoxbool SharedDesktopArea::Apply(){ if (IsChecked(IDC_WINDOW) && m_hwndShared == NULL) { MessageBox(NULL, "You have not yet selected a window to share./n" "Please first select a window with the 'Window Target'/n" "icon, and try again.", "No Window Selected", MB_OK | MB_ICONEXCLAMATION); return false; } m_server->FullScreen(IsChecked(IDC_FULLSCREEN)); m_server->PrimaryDisplayOnlyShared(IsChecked(IDC_PRIMARY_DISPLAY_ONLY)); m_server->ScreenAreaShared(IsChecked(IDC_SCREEN)); m_server->WindowShared(IsChecked(IDC_WINDOW)); if (m_server->FullScreen()) { RECT temp = GetScreenRect(); m_server->SetMatchSizeFields(temp.left, temp.top, temp.right, temp.bottom); } else if (m_server->PrimaryDisplayOnlyShared()) { int w = GetSystemMetrics(SM_CXSCREEN); int h = GetSystemMetrics(SM_CYSCREEN); m_server->SetMatchSizeFields(0, 0, w, h); } else if (m_server->ScreenAreaShared()) { int left, right, top, bottom; m_pMatchWindow->GetPosition(left, top, right, bottom); m_server->SetMatchSizeFields(left, top, right, bottom); } else if (m_server->WindowShared()) { m_server->SetWindowShared(m_hwndShared); } return true;}
开发者ID:bk138,项目名称:CollabTool,代码行数:33,
示例6: wxMenu/**< context menu */void ImagePanel::OnContextMenu(wxContextMenuEvent& event){ if (m_stMP.iState != 0) return; wxMenu* pMenu = new wxMenu(); wxASSERT_MSG(pMenu != nullptr, _T("Create Popup Menu failed.")); wxMenuItem* pMenuItem = nullptr; // group 1 if (m_img.IsOk()) { pMenuItem = new wxMenuItem(pMenu, ID_CMENU_SAVE, _("&Save Image"), _("Save the Image")); pMenu->Append(pMenuItem); } // popup if (pMenuItem != nullptr) { wxPoint pt = event.GetPosition(); if (pt == wxDefaultPosition) { // position invalide, get the mouse position pt = wxGetMousePosition(); wxRect rc = GetScreenRect(); if (!rc.Contains(pt)) { // mouse is't in the panel, get the panel center pt.x = rc.x + rc.width/2; pt.y = rc.y + rc.height/2; } } pt = ScreenToClient(pt); PopupMenu(pMenu, pt); } delete pMenu;}
开发者ID:gxcast,项目名称:GEIM,代码行数:36,
示例7: OnModulesLodedstatic int OnModulesLoded(WPARAM, LPARAM){ HookEvent(ME_CLIST_CONTACTICONCHANGED, OnContactIconChanged); HookEvent(ME_SKIN_ICONSCHANGED, OnSkinIconsChanged); HookEvent(ME_CLUI_CONTACTDRAGGING, OnContactDrag); HookEvent(ME_CLUI_CONTACTDROPPED, OnContactDrop); HookEvent(ME_CLUI_CONTACTDRAGSTOP, OnContactDragStop); HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnContactSettingChanged); HookEvent(ME_DB_CONTACT_DELETED, OnContactDeleted); HookEvent(ME_OPT_INITIALISE, OnOptionsInitialize); HookEvent(ME_CLIST_STATUSMODECHANGE, OnStatusModeChange); HookEvent(ME_CLIST_PREBUILDCONTACTMENU, OnPrebuildContactMenu); hwndMiranda = pcli->hwndContactList; mir_subclassWindow(hwndMiranda, newMirandaWndProc); // No thumbs yet bEnableTip = ServiceExists("mToolTip/ShowTip"); RegisterWindowClass(); GetScreenRect(); LoadDBSettings(); CreateBackgroundBrush(); CreateThumbsFont(); LoadContacts(); LoadMenus(); if (fcOpt.bToTop) { fcOpt.ToTopTime = (fcOpt.ToTopTime < 1) ? 1 : fcOpt.ToTopTime; fcOpt.ToTopTime = (fcOpt.ToTopTime > TOTOPTIME_MAX) ? TOTOPTIME_MAX : fcOpt.ToTopTime; ToTopTimerID = SetTimer(NULL, 0, fcOpt.ToTopTime*TOTOPTIME_P, ToTopTimerProc); } return 0;}
开发者ID:truefriend-cz,项目名称:miranda-ng,代码行数:34,
示例8: GetDialogRectconst Rect ColorPicker::GetDialogRect() const{ Rect dialogRect; dialogRect.dx = ControlsFactory::COLOR_MAP_SIDE + ControlsFactory::COLOR_SELECTOR_WIDTH + ControlsFactory::COLOR_PREVIEW_SIDE + ControlsFactory::OFFSET * 4; dialogRect.dy = ControlsFactory::COLOR_MAP_SIDE + ControlsFactory::BUTTON_HEIGHT*2 + ControlsFactory::OFFSET * 3; dialogRect.x = (GetScreenRect().dx - dialogRect.dx) / 2; dialogRect.y = (GetScreenRect().dy - dialogRect.dy) / 2; return dialogRect;}
开发者ID:abaradulkin,项目名称:dava.framework,代码行数:16,
示例9: GetScreenRectvoid GUIEditMultiString::Draw(){ Rect rc; GetScreenRect(rc); if(GUISystem::Instance()->GetFocus() == this) { if(textChanged) { GUIControlContainer::Draw(); DrawText(rc, false); textChanged = false; } if(showCursor) { pApp->GetGraphicsSystem()->SetColor(0,0,0); pApp->GetGraphicsSystem()->DrawRect(rc.x + cursorX, rc.y + cursorY - yOffset, cursorWidth, pFont->GetHeight()); } } else { GUIControlContainer::Draw(); DrawText(rc, false); }}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:26,
示例10: GetScreenRectvoid tabButton::updateMouse(wxMouseEvent& event){ if (m_bSelected) return; wxRect panelRec = GetScreenRect(); panelRec.x += 2; panelRec.y += 2; panelRec.width -= 4; panelRec.height -= 4; wxPoint mousePoint = wxGetMousePosition(); bool t1 = panelRec.x <= mousePoint.x; bool t2 = panelRec.y <= mousePoint.y; bool t3 = (panelRec.x + panelRec.width ) >= mousePoint.x; bool t4 = (panelRec.y + panelRec.height) >= mousePoint.y; if (t1 && t2 && t3 && t4) { this->SetBackgroundColour( MOUSEOVER ); } else { this->SetBackgroundColour( NORMAL ); } this->Refresh();}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:29,
示例11: LLOGvoid Ctrl::ScrollView(const Rect& _r, int dx, int dy){ GuiLock __; LLOG("ScrollView " << _r << " " << dx << " " << dy); if(IsFullRefresh() || !IsVisible()) return; Size vsz = GetSize(); dx = sgn(dx) * min(abs(dx), vsz.cx); dy = sgn(dy) * min(abs(dy), vsz.cy); Rect r = _r & vsz; LLOG("ScrollView2 " << r << " " << dx << " " << dy); Ctrl *w; for(w = this; w->parent; w = w->parent) if(w->InFrame()) { Refresh(); return; } if(!w || !w->top) return; Rect view = InFrame() ? GetView() : GetClippedView(); Rect sr = (r + view.TopLeft()) & view; sr += GetScreenRect().TopLeft() - w->GetScreenRect().TopLeft(); if(w->AddScroll(sr, dx, dy)) Refresh(); else { LTIMING("ScrollCtrls1"); Top *top = GetTopCtrl()->top; for(Ctrl *q = GetFirstChild(); q; q = q->GetNext()) if(q->InView()) ScrollCtrl(top, q, r, q->GetRect(), dx, dy); if(parent) for(Ctrl *q = parent->GetFirstChild(); q; q = q->GetNext()) if(q->InView() && q != this) ScrollCtrl(top, q, r, q->GetScreenRect() - GetScreenView().TopLeft(), dx, dy); }}
开发者ID:pedia,项目名称:raidget,代码行数:35,
示例12: InRectbool CGUIObject::StealsMouse(int x, int y){ if (isDisabled()) return false; else return InRect(x, y, GetScreenRect());}
开发者ID:daoluong,项目名称:interactivenovelengine,代码行数:7,
示例13: GetScreenRectvoid StripMenuButton::updateMouse(){ wxRect panelRec = GetScreenRect(); panelRec.x += 2; panelRec.y += 2; panelRec.width -= 4; panelRec.height -= 4; wxPoint mousePoint = wxGetMousePosition(); bool t1 = panelRec.x <= mousePoint.x; bool t2 = panelRec.y <= mousePoint.y; bool t3 = (panelRec.x + panelRec.width ) >= mousePoint.x; bool t4 = (panelRec.y + panelRec.height) >= mousePoint.y; if (t1 && t2 && t3 && t4) { if (!m_bHovering) { SetForegroundColour( m_colHover ); m_bHovering = true; invalidatePaint(); this->Refresh(); } } else if (m_bHovering) { SetForegroundColour( m_colNormal ); m_bHovering = false; invalidatePaint(); this->Refresh(); }}
开发者ID:CSRedRat,项目名称:desura-app,代码行数:33,
示例14: ASSERTvoid PopUpDockWindow::ShowInnerPopUps(DockCont &dc, DockCont *target){ ASSERT(target); Rect wrect = GetScreenRect(); Size psz(style->innersize, style->innersize); Rect prect = Rect(psz); Point cp; psz /= 2; cp = target->GetScreenRect().CenterPoint(); int d = psz.cy * 5; cp.x = minmax(cp.x, wrect.left + d, wrect.right - d); cp.y = minmax(cp.y, wrect.top + d, wrect.bottom - d); int align = GetDockAlign(*target); if (IsTB(align)) { // Left/right docking allowed ShowPopUp(inner[DOCK_LEFT], prect.Offseted(cp.x - psz.cx*3, cp.y - psz.cy)); ShowPopUp(inner[DOCK_RIGHT], prect.Offseted(cp.x + psz.cx, cp.y - psz.cy)); } else { inner[DOCK_LEFT].Close(); inner[DOCK_RIGHT].Close(); } if (!IsTB(align)) { // Top/bottom docking allowed ShowPopUp(inner[DOCK_TOP], prect.Offseted(cp.x - psz.cx, cp.y - psz.cy*3)); ShowPopUp(inner[DOCK_BOTTOM], prect.Offseted(cp.x - psz.cx, cp.y + psz.cy)); } else { inner[DOCK_TOP].Close(); inner[DOCK_BOTTOM].Close(); } if (IsTabbing()) ShowPopUp(inner[4], prect.Offseted(cp.x-psz.cx, cp.y-psz.cy));}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:34,
示例15: DistributeAccessKeysvoid TopWindow::Open(HWND hwnd){ GuiLock __; if(dokeys && (!GUI_AKD_Conservative() || GetAccessKeysDeep() <= 1)) DistributeAccessKeys(); USRLOG(" OPEN " << Desc(this)); LLOG("TopWindow::Open, owner HWND = " << FormatIntHex((int)hwnd, 8) << ", Active = " << FormatIntHex((int)::GetActiveWindow(), 8)); IgnoreMouseUp(); SyncCaption();#ifdef PLATFORM_WINCE if(!GetRect().IsEmpty())#endif if(fullscreen) { SetRect(GetScreenRect()); // 12-05-23 Tom changed from GetScreenSize() to GetScreenRect() in order to get full screen on correct display Create(hwnd, WS_POPUP, 0, false, SW_SHOWMAXIMIZED, false); } else { CenterRect(hwnd, hwnd && hwnd == GetTrayHWND__() ? center ? 2 : 0 : center); Create(hwnd, style, exstyle, false, state == OVERLAPPED ? SW_SHOWNORMAL : state == MINIMIZED ? SW_MINIMIZE : SW_MAXIMIZE, false); } PlaceFocus(); SyncCaption(); FixIcons();}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:26,
示例16: GetScreenRectvoidShader::LoadConfig(){ wxConfigBase *config = wxConfigBase::Get(); //config->DeleteAll(); // Load the window position on the screen. wxRect pos = GetScreenRect(); long value; bool ok = config->Read(wxT("main_x"), &value); pos.SetX(value); ok = ok && config->Read(wxT("main_y"), &value); pos.SetY(value); ok = ok && config->Read(wxT("main_width"), &value); pos.SetWidth(value); ok = ok && config->Read(wxT("main_height"), &value); pos.SetHeight(value); if (ok) { SetSize(pos); } // Check if the window was maximized. if (config->Read(wxT("main_maximized"), &value) && value != 0) { Maximize(); } // Load the list of recent projects. m_RecentMenu->Load(*config, wxT("main_recent"));}
开发者ID:nocturnal,项目名称:FragmentShader,代码行数:28,
示例17: GetScreenRectvoid DisplayVariableDlg::DoUpdateSize(bool performClean){ if ( m_dragging ) { wxRect curect = GetScreenRect(); curect.SetBottomRight( ::wxGetMousePosition() ); if ( curect.GetHeight() <= 100 || curect.GetWidth() <= 100 ) { if ( performClean ) { m_dragging = false; if ( m_panelStatusBar->HasCapture() ) { m_panelStatusBar->ReleaseMouse(); } wxSetCursor( wxNullCursor ); } return; }#ifdef __WXMSW__ wxWindowUpdateLocker locker(clMainFrame::Get());#endif SetSize( curect ); if ( performClean ) { m_dragging = false; if ( m_panelStatusBar->HasCapture() ) { m_panelStatusBar->ReleaseMouse(); } wxSetCursor( wxNullCursor ); } }}
开发者ID:292388900,项目名称:codelite,代码行数:30,
示例18: GetScreenRectBOOL Hotlist::ShowContextMenu(const OpPoint &point, BOOL center, BOOL use_keyboard_context){ const char* menu_name = m_selector->GetFocused() != -1 ? "Hotlist Item Popup Menu" : "Hotlist Popup Menu"; const OpPoint p = point + GetScreenRect().TopLeft(); g_application->GetMenuHandler()->ShowPopupMenu(menu_name, PopupPlacement::AnchorAt(p, center), 0, use_keyboard_context); return TRUE;}
开发者ID:prestocore,项目名称:browser,代码行数:7,
示例19: GetScreenRectvoid DockWindow::Float(DockableCtrl &dc, Point p){ if (dc.GetParent() && p.IsNullInstance()) p = GetScreenRect().TopLeft(); else Register(dc); FloatContainer(*GetReleasedContainer(dc), p);}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:8,
示例20: ConvertWinToEngineScreenPos Math::Vector2 ConvertWinToEngineScreenPos(Math::Vector2 winScreenPos) { ScreenRect screenRect = GetScreenRect(); Math::Vector2 engineScreenPos = Math::Vector2::Zero; engineScreenPos._x = winScreenPos._x; engineScreenPos._y = screenRect._height - winScreenPos._y; return engineScreenPos; }
开发者ID:leonpardlee,项目名称:CDEngine,代码行数:8,
示例21: ConvertEngineToWinScreenPos Math::Vector2 ConvertEngineToWinScreenPos(Math::Vector2 engineScreenPos) { ScreenRect screenRect = GetScreenRect(); Math::Vector2 winScreenPos = Math::Vector2::Zero; winScreenPos._x = engineScreenPos._x; winScreenPos._y = screenRect._height - engineScreenPos._y; return winScreenPos; }
开发者ID:leonpardlee,项目名称:CDEngine,代码行数:8,
示例22: SubtractVector<Rect> Ctrl::GetPaintRects(){ Vector<Rect> r; r.Add(GetScreenRect()); for(int i = max(FindTopCtrl() + 1, 0); i < topctrl.GetCount(); i++) Subtract(r, topctrl[i]->GetScreenRect()); return r;}
开发者ID:dreamsxin,项目名称:ultimatepp,代码行数:8,
示例23: ChPaintvoid StaticBarArea::Paint(Draw& w){ if(IsNull(ToolBar().StyleDefault().arealook)) ChPaint(w, GetSize(), ToolBar().StyleDefault().look); else PaintBarArea(w, this, ToolBar().StyleDefault().arealook, upperframe ? Null : GetScreenRect().bottom);}
开发者ID:koz4k,项目名称:soccer,代码行数:8,
示例24: GetScreenRectBOOL OpWindowList::OnContextMenu(const OpPoint& point, const OpRect* avoid_rect, BOOL keyboard_invoked){ DesktopWindowCollectionItem* item = static_cast<DesktopWindowCollectionItem*>(GetSelectedItem()); if (!item) return FALSE; OpPoint p = point + GetScreenRect().TopLeft(); g_application->GetMenuHandler()->ShowPopupMenu(item->GetContextMenu(), PopupPlacement::AnchorAt(p), 0, keyboard_invoked); return TRUE;}
开发者ID:prestocore,项目名称:browser,代码行数:10,
示例25: GetScreenRectvoid SubMenuItem::Pull(){ Rect r = GetScreenRect(); Point p = r.TopRight(); p.x -= 3; p.y -= 2; SubMenuBase::Pull(this, p, Size(-r.Width(), 0)); if(parentmenu) parentmenu->SyncState();}
开发者ID:guowei8412,项目名称:upp-mirror,代码行数:10,
示例26: GetScreenRect void RenderDataUI::RenderText(TextRender* pTextRender) { Rectangle rect = pTextRender->_pRectTransform->GetScreenSpaceRect(); Text* pText = pTextRender->_pText; ScreenRect screenInfo = GetScreenRect(); float screenHeight = screenInfo._height; rect._bottom = screenHeight - rect._bottom; rect._top = screenHeight - rect._top; FontManager::GetInstance()->DrawString(rect, pText->_value.c_str()); }
开发者ID:leonpardlee,项目名称:CDEngine,代码行数:10,
注:本文中的GetScreenRect函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ GetScreenWidth函数代码示例 C++ GetScreenPosition函数代码示例 |