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

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

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

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

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

示例1: test_redraw

/* * Tests if a progress bar repaints itself immediately when it receives * some specific messages. */static void test_redraw(void){    RECT client_rect;    LRESULT ret;    SendMessageA(hProgressWnd, PBM_SETRANGE, 0, MAKELPARAM(0, 100));    SendMessageA(hProgressWnd, PBM_SETPOS, 10, 0);    SendMessageA(hProgressWnd, PBM_SETSTEP, 20, 0);    update_window(hProgressWnd);    /* PBM_SETPOS */    ok(SendMessageA(hProgressWnd, PBM_SETPOS, 50, 0) == 10, "PBM_SETPOS must return the previous position/n");    ok(!GetUpdateRect(hProgressWnd, NULL, FALSE), "PBM_SETPOS: The progress bar should be redrawn immediately/n");        /* PBM_DELTAPOS */    ok(SendMessageA(hProgressWnd, PBM_DELTAPOS, 15, 0) == 50, "PBM_DELTAPOS must return the previous position/n");    ok(!GetUpdateRect(hProgressWnd, NULL, FALSE), "PBM_DELTAPOS: The progress bar should be redrawn immediately/n");        /* PBM_SETPOS */    ok(SendMessageA(hProgressWnd, PBM_SETPOS, 80, 0) == 65, "PBM_SETPOS must return the previous position/n");    ok(!GetUpdateRect(hProgressWnd, NULL, FALSE), "PBM_SETPOS: The progress bar should be redrawn immediately/n");        /* PBM_STEPIT */    ok(SendMessageA(hProgressWnd, PBM_STEPIT, 0, 0) == 80, "PBM_STEPIT must return the previous position/n");    ok(!GetUpdateRect(hProgressWnd, NULL, FALSE), "PBM_STEPIT: The progress bar should be redrawn immediately/n");    ret = SendMessageA(hProgressWnd, PBM_GETPOS, 0, 0);    if (ret == 0)        win_skip("PBM_GETPOS needs comctl32 > 4.70/n");    else        ok(ret == 100, "PBM_GETPOS returned a wrong position : %d/n", (UINT)ret);        /* PBM_SETRANGE and PBM_SETRANGE32:    Usually the progress bar doesn't repaint itself immediately. If the    position is not in the new range, it does.    Don't test this, it may change in future Windows versions. */    SendMessageA(hProgressWnd, PBM_SETPOS, 0, 0);    update_window(hProgressWnd);    /* increase to 10 - no background erase required */    erased = FALSE;    SetRectEmpty(&last_paint_rect);    SendMessageA(hProgressWnd, PBM_SETPOS, 10, 0);    GetClientRect(hProgressWnd, &client_rect);    ok(EqualRect(&last_paint_rect, &client_rect), "last_paint_rect was %s instead of %s/n",       wine_dbgstr_rect(&last_paint_rect), wine_dbgstr_rect(&client_rect));    update_window(hProgressWnd);    ok(!erased, "Progress bar shouldn't have erased the background/n");    /* decrease to 0 - background erase will be required */    erased = FALSE;    SetRectEmpty(&last_paint_rect);    SendMessageA(hProgressWnd, PBM_SETPOS, 0, 0);    GetClientRect(hProgressWnd, &client_rect);    ok(EqualRect(&last_paint_rect, &client_rect), "last_paint_rect was %s instead of %s/n",       wine_dbgstr_rect(&last_paint_rect), wine_dbgstr_rect(&client_rect));    update_window(hProgressWnd);    ok(erased, "Progress bar should have erased the background/n");}
开发者ID:AndreRH,项目名称:wine,代码行数:63,


示例2: verify_region

static void verify_region(HRGN hrgn, const RECT *rc){    union    {        RGNDATA data;        char buf[sizeof(RGNDATAHEADER) + sizeof(RECT)];    } rgn;    const RECT *rect;    DWORD ret;    ret = GetRegionData(hrgn, 0, NULL);    if (IsRectEmpty(rc))        ok(ret == sizeof(rgn.data.rdh), "expected sizeof(rdh), got %u/n", ret);    else        ok(ret == sizeof(rgn.data.rdh) + sizeof(RECT), "expected sizeof(rgn), got %u/n", ret);    if (!ret) return;    ret = GetRegionData(hrgn, sizeof(rgn), &rgn.data);    if (IsRectEmpty(rc))        ok(ret == sizeof(rgn.data.rdh), "expected sizeof(rdh), got %u/n", ret);    else        ok(ret == sizeof(rgn.data.rdh) + sizeof(RECT), "expected sizeof(rgn), got %u/n", ret);    trace("size %u, type %u, count %u, rgn size %u, bound (%d,%d-%d,%d)/n",          rgn.data.rdh.dwSize, rgn.data.rdh.iType,          rgn.data.rdh.nCount, rgn.data.rdh.nRgnSize,          rgn.data.rdh.rcBound.left, rgn.data.rdh.rcBound.top,          rgn.data.rdh.rcBound.right, rgn.data.rdh.rcBound.bottom);    if (rgn.data.rdh.nCount != 0)    {        rect = (const RECT *)rgn.data.Buffer;        trace("rect (%d,%d-%d,%d)/n", rect->left, rect->top, rect->right, rect->bottom);        ok(EqualRect(rect, rc), "rects don't match/n");    }    ok(rgn.data.rdh.dwSize == sizeof(rgn.data.rdh), "expected sizeof(rdh), got %u/n", rgn.data.rdh.dwSize);    ok(rgn.data.rdh.iType == RDH_RECTANGLES, "expected RDH_RECTANGLES, got %u/n", rgn.data.rdh.iType);    if (IsRectEmpty(rc))    {        ok(rgn.data.rdh.nCount == 0, "expected 0, got %u/n", rgn.data.rdh.nCount);        ok(rgn.data.rdh.nRgnSize == 0 ||           broken(rgn.data.rdh.nRgnSize == 168), /* NT4 */           "expected 0, got %u/n", rgn.data.rdh.nRgnSize);    }    else    {        ok(rgn.data.rdh.nCount == 1, "expected 1, got %u/n", rgn.data.rdh.nCount);        ok(rgn.data.rdh.nRgnSize == sizeof(RECT) ||           broken(rgn.data.rdh.nRgnSize == 168), /* NT4 */           "expected sizeof(RECT), got %u/n", rgn.data.rdh.nRgnSize);    }    ok(EqualRect(&rgn.data.rdh.rcBound, rc), "rects don't match/n");}
开发者ID:AmesianX,项目名称:RosWine,代码行数:54,


示例3: SetScnRect

STDMETHODIMP CGfxFB::SetScnRect(const RECT *pRect){	RECT rZero = {0,0,0,0};	if(pRect==0)	{		m_bScnClip = FALSE;		return S_OK;	}	if((EqualRect(pRect,&rZero))||(EqualRect(pRect,&m_rectScn) && m_bScnClip))		return S_OK;	m_rectScn = *pRect;	m_bScnClip = TRUE;	DP("[GFXFB]SetScnRect (%d,%d,%d,%d) /n", m_rectScn.left, m_rectScn.top, m_rectScn.right, m_rectScn.bottom);	return Update();}
开发者ID:xuweiqiang,项目名称:LibVRPresent,代码行数:15,


示例4: PollTimer

void CALLBACKPollTimer(HWND hwnd, UINT uMsg, UINT_PTR idTimer, DWORD dwTime){    HDC hdc = GetDC(hwnd);    if (hdc) {        RECT rcClip, rcClient;        LPCTSTR pszMsg;        switch (GetClipBox(hdc, &rcClip)) {        case NULLREGION:            pszMsg = TEXT("completely covered");            break;        case SIMPLEREGION:            GetClientRect(hwnd, &rcClient);            if (EqualRect(&rcClient, &rcClip)) {                pszMsg = TEXT("completely uncovered");            } else {                pszMsg = TEXT("partially covered");            }            break;        case COMPLEXREGION:            pszMsg = TEXT("partially covered");            break;        default:            pszMsg = TEXT("Error");            break;        }        // If we want to, we can also use RectVisible        // or PtVisible - or go totally overboard by        // using GetClipRgn        ReleaseDC(hwnd, hdc);        SetWindowText(hwnd, pszMsg);    }}
开发者ID:AnarNFT,项目名称:books-code,代码行数:34,


示例5: SubtractRect

BOOL WINAPISubtractRect( LPRECT dest, const RECT *src1, const RECT *src2 ){    RECT tmp;    if (IsRectEmpty( src1 ))    {	SetRectEmpty( dest );	return FALSE;    }    *dest = *src1;    if (IntersectRect( &tmp, src1, src2 ))    {	if (EqualRect( &tmp, dest ))	{	    SetRectEmpty( dest );	    return FALSE;	}	if ((tmp.top == dest->top) && (tmp.bottom == dest->bottom))	{	    if (tmp.left == dest->left) dest->left = tmp.right;	    else if (tmp.right == dest->right) dest->right = tmp.left;	}	else if ((tmp.left == dest->left) && (tmp.right == dest->right))	{	    if (tmp.top == dest->top) dest->top = tmp.bottom;	    else if (tmp.bottom == dest->bottom) dest->bottom = tmp.top;	}    }    return TRUE;}
开发者ID:ghaerr,项目名称:microwindows,代码行数:31,


示例6: OnDragOver

void CEdit::OnDragOver( LPDATAOBJECT pIDataSource, DWORD grfKeyState, POINTL pt, LPDWORD pdwEffect ){	CEditView *pView;	int nBuffCol, nRow;	*pdwEffect = GetDropEffect( pIDataSource, grfKeyState, pt, pView, nBuffCol, nRow );	if ( *pdwEffect != DROPEFFECT_NONE )	{		RECT rcDragCaret;		m_Selection.GetCaretRect( pView, nBuffCol, nRow, rcDragCaret );		if ( !EqualRect( &rcDragCaret, &m_rcDragCaret ) )		{			// erase old caret			DrawDragCaret( FALSE );			m_rcDragCaret = rcDragCaret;			// draw new caret			DrawDragCaret( FALSE );		}	}	else	{		// erase old caret		DrawDragCaret( TRUE );	}}
开发者ID:ForbiddenEra,项目名称:kx-audio-driver,代码行数:27,


示例7: GetForegroundWindow

	bool FSWinWatcher::IsCurrentFS ()	{#if !__GNUC__ // Not defined in my MinGW headers even on Vista // Maybe it will work later with MinGW		QUERY_USER_NOTIFICATION_STATE state;		if (SHQueryUserNotificationState (&state) != S_OK)			return false;		return state != QUNS_ACCEPTS_NOTIFICATIONS;#else		HWND hWnd = GetForegroundWindow ();		if (!hWnd)			return false;		HMONITOR monitor = MonitorFromWindow (hWnd, MONITOR_DEFAULTTONULL);		if (!monitor)			return false;		MONITORINFO lpmi;		lpmi.cbSize = sizeof (lpmi);		if (!GetMonitorInfo (monitor, &lpmi))			return false;		RECT monitorRect = lpmi.rcMonitor;		RECT windowRect;		GetWindowRect (hWnd, &windowRect);		return EqualRect (&windowRect, &monitorRect) &&				Proxy_->GetRootWindowsManager ()->GetPreferredWindow ()->effectiveWinId () != hWnd;#endif	}
开发者ID:SboichakovDmitriy,项目名称:leechcraft,代码行数:30,


示例8: warp_check

static void warp_check( SysMouseImpl* This, BOOL force ){    DWORD now = GetCurrentTime();    const DWORD interval = This->clipped ? 500 : 10;    if (force || (This->need_warp && (now - This->last_warped > interval)))    {        RECT rect, new_rect;        POINT mapped_center;        This->last_warped = now;        This->need_warp = FALSE;        if (!GetClientRect(This->base.win, &rect)) return;        MapWindowPoints( This->base.win, 0, (POINT *)&rect, 2 );        if (!This->clipped)        {            mapped_center.x = (rect.left + rect.right) / 2;            mapped_center.y = (rect.top + rect.bottom) / 2;            TRACE("Warping mouse to %d - %d/n", mapped_center.x, mapped_center.y);            SetCursorPos( mapped_center.x, mapped_center.y );        }        if (This->base.dwCoopLevel & DISCL_EXCLUSIVE)        {            /* make sure we clip even if the window covers the whole screen */            rect.left = max( rect.left, GetSystemMetrics( SM_XVIRTUALSCREEN ) + 1 );            rect.top = max( rect.top, GetSystemMetrics( SM_YVIRTUALSCREEN ) + 1 );            rect.right = min( rect.right, rect.left + GetSystemMetrics( SM_CXVIRTUALSCREEN ) - 2 );            rect.bottom = min( rect.bottom, rect.top + GetSystemMetrics( SM_CYVIRTUALSCREEN ) - 2 );            TRACE("Clipping mouse to %s/n", wine_dbgstr_rect( &rect ));            ClipCursor( &rect );            This->clipped = GetClipCursor( &new_rect ) && EqualRect( &rect, &new_rect );        }    }}
开发者ID:crank123,项目名称:reactos,代码行数:34,


示例9: OWndLPtoDP

void Protocol::Move  (  OpWndItemD* wi,  LPRECT      lprc  )  {  // make sure the borders are on pixel boundaries  OWndLPtoDP(m_oiWnd, (LPPOINT)lprc, 2);  OWndDPtoLP(m_oiWnd, (LPPOINT)lprc, 2);  if(m_fFrames)    {    RECT  rcOld;    CopyRect(&rcOld, &wi->m_rcItem);    InvalidateGrabHandles(wi, TRUE);    wi->Move(lprc);    InvalidateGrabHandles(wi, FALSE);    if(OWndIsHwndItem(wi) && !EqualRect(&rcOld, &wi->m_rcItem))      {      OWndInvalidateLogicalRect(m_oiWnd, &rcOld, TRUE);      OWndInvalidateLogicalRect(m_oiWnd, &wi->m_rcItem, TRUE);      }    }  else    {    wi->InvalidateGrabHandles(TRUE);    wi->Move(lprc);    wi->InvalidateGrabHandles(FALSE);    }  }
开发者ID:benbucksch,项目名称:AppWare,代码行数:32,


示例10: SetSrcRect

STDMETHODIMP CGfxRMI::SetSrcRect(const RECT *pRect){	if(EqualRect(pRect,&m_rectSrc))		return S_OK;	m_rectSrc = *pRect;	return Update();}
开发者ID:xuweiqiang,项目名称:LibVRPresent,代码行数:7,


示例11: SetSrcRect

STDMETHODIMP CGfxRenesasHW::SetSrcRect(const RECT *pRect){    if(EqualRect(pRect,&m_rectSrc))        return S_OK;    m_rectSrc = *pRect;    return S_OK;}
开发者ID:xuweiqiang,项目名称:LibVRPresent,代码行数:8,


示例12: SetSrcRect

STDMETHODIMP CGfxFB::SetSrcRect(const RECT *pRect){	if(EqualRect(pRect,&m_rectSrc))		return S_OK;	m_rectSrc = *pRect;	DP("[GFXFB]Set SourceRect (%d,%d, %d, %d) /n", m_rectSrc.left, m_rectSrc.top, m_rectSrc.right, m_rectSrc.bottom);	return Update();}
开发者ID:xuweiqiang,项目名称:LibVRPresent,代码行数:8,


示例13: EqualRect

 bool operator == ( const wxBrushRefData& brush ) const {     return m_style == brush.m_style &&             m_stipple.IsSameAs(brush.m_stipple) &&             m_colour == brush.m_colour &&             m_macBrushKind == brush.m_macBrushKind &&             m_macThemeBrush == brush.m_macThemeBrush &&             m_macThemeBackground == brush.m_macThemeBackground &&             EqualRect(&m_macThemeBackgroundExtent, &brush.m_macThemeBackgroundExtent); }
开发者ID:Bluehorn,项目名称:wxPython,代码行数:10,


示例14: DrawInsert

/*********************************************************************** *		DrawInsert (COMCTL32.15) * * Draws insert arrow by the side of the ListBox item in the parent window. * * RETURNS *      Nothing. */VOID WINAPI DrawInsert (HWND hwndParent, HWND hwndLB, INT nItem){    RECT rcItem, rcListBox, rcDragIcon;    HDC hdc;    DRAGLISTDATA * data;    TRACE("(%p %p %d)/n", hwndParent, hwndLB, nItem);    if (!hDragArrow)        hDragArrow = LoadIconW(COMCTL32_hModule, (LPCWSTR)IDI_DRAGARROW);    if (LB_ERR == SendMessageW(hwndLB, LB_GETITEMRECT, nItem, (LPARAM)&rcItem))        return;    if (!GetWindowRect(hwndLB, &rcListBox))        return;    /* convert item rect to parent co-ordinates */    if (!MapWindowPoints(hwndLB, hwndParent, (LPPOINT)&rcItem, 2))        return;    /* convert list box rect to parent co-ordinates */    if (!MapWindowPoints(HWND_DESKTOP, hwndParent, (LPPOINT)&rcListBox, 2))        return;    rcDragIcon.left = rcListBox.left - DRAGICON_HOTSPOT_X;    rcDragIcon.top = rcItem.top - DRAGICON_HOTSPOT_Y;    rcDragIcon.right = rcListBox.left;    rcDragIcon.bottom = rcDragIcon.top + DRAGICON_HEIGHT;    if (!GetWindowSubclass(hwndLB, DragList_SubclassWindowProc, DRAGLIST_SUBCLASSID, (DWORD_PTR*)&data))        return;    if (nItem < 0)        SetRectEmpty(&rcDragIcon);    /* prevent flicker by only redrawing when necessary */    if (!EqualRect(&rcDragIcon, &data->last_drag_icon_rect))    {        /* get rid of any previous inserts drawn */        RedrawWindow(hwndParent, &data->last_drag_icon_rect, NULL,            RDW_INTERNALPAINT | RDW_ERASE | RDW_INVALIDATE | RDW_UPDATENOW);        CopyRect(&data->last_drag_icon_rect, &rcDragIcon);        if (nItem >= 0)        {            hdc = GetDC(hwndParent);            DrawIcon(hdc, rcDragIcon.left, rcDragIcon.top, hDragArrow);            ReleaseDC(hwndParent, hdc);        }    }}
开发者ID:GYGit,项目名称:reactos,代码行数:63,


示例15: setdisplaymode

static void setdisplaymode(int i){    HRESULT rc;    rc = IDirectDraw_SetCooperativeLevel(lpDD,        hwnd, DDSCL_ALLOWMODEX | DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);    ok(rc==DD_OK,"SetCooperativeLevel returned: %x/n",rc);    if (modes[i].dwFlags & DDSD_PIXELFORMAT)    {        if (modes[i].ddpfPixelFormat.dwFlags & DDPF_RGB)        {            rc = IDirectDraw_SetDisplayMode(lpDD,                modes[i].dwWidth, modes[i].dwHeight,                U1(modes[i].ddpfPixelFormat).dwRGBBitCount);            ok(DD_OK==rc || DDERR_UNSUPPORTED==rc,"SetDisplayMode returned: %x/n",rc);            if (rc == DD_OK)            {                RECT r, scrn, virt;                SetRect(&virt, 0, 0, GetSystemMetrics(SM_CXVIRTUALSCREEN), GetSystemMetrics(SM_CYVIRTUALSCREEN));                OffsetRect(&virt, GetSystemMetrics(SM_XVIRTUALSCREEN), GetSystemMetrics(SM_YVIRTUALSCREEN));                SetRect(&scrn, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));                trace("Mode (%dx%d) [%dx%d] (%d %d)x(%d %d)/n", modes[i].dwWidth, modes[i].dwHeight,                      scrn.right, scrn.bottom, virt.left, virt.top, virt.right, virt.bottom);                ok(GetClipCursor(&r), "GetClipCursor() failed/n");                /* ddraw sets clip rect here to the screen size, even for                   multiple monitors */                ok(EqualRect(&r, &scrn), "Invalid clip rect: (%d %d) x (%d %d)/n",                   r.left, r.top, r.right, r.bottom);                ok(ClipCursor(NULL), "ClipCursor() failed/n");                ok(GetClipCursor(&r), "GetClipCursor() failed/n");                ok(EqualRect(&r, &virt), "Invalid clip rect: (%d %d) x (%d %d)/n",                   r.left, r.top, r.right, r.bottom);                rc = IDirectDraw_RestoreDisplayMode(lpDD);                ok(DD_OK==rc,"RestoreDisplayMode returned: %x/n",rc);            }        }    }}
开发者ID:WASSUM,项目名称:longene_travel,代码行数:42,


示例16: SetDstRect

STDMETHODIMP CGfxRMI::SetDstRect(const RECT *pRect){	if(EqualRect(pRect,&m_rectDst))		return S_OK;	m_rectDst = *pRect;	if ((DeviceIoControl(m_filehandle, AU1XXXMAE_SETDISPLAYRECT, (LPVOID)&m_rectDst, sizeof(RECT),(LPVOID)&m_DB, sizeof(DebugBuffers), &m_BytesReturned ,NULL)) != TRUE)		return E_FAIL;		return S_OK;}
开发者ID:xuweiqiang,项目名称:LibVRPresent,代码行数:11,


示例17: testcooperativelevels_exclusive

static void testcooperativelevels_exclusive(void){    BOOL sfw, success;    HRESULT rc;    RECT window_rect;    /* Do some tests with DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN mode */    /* First, resize the window so it is not the same size as any screen */    success = SetWindowPos(hwnd, 0, 0, 0, 281, 92, 0);    ok(success, "SetWindowPos failed/n");    /* Try to set exclusive mode only */    rc = IDirectDraw_SetCooperativeLevel(lpDD,        hwnd, DDSCL_EXCLUSIVE);    ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_EXCLUSIVE) returned: %x/n",rc);    /* Full screen mode only */    rc = IDirectDraw_SetCooperativeLevel(lpDD,        hwnd, DDSCL_FULLSCREEN);    ok(rc==DDERR_INVALIDPARAMS,"SetCooperativeLevel(DDSCL_FULLSCREEN) returned: %x/n",rc);    /* Full screen mode + exclusive mode */    rc = IDirectDraw_SetCooperativeLevel(lpDD, NULL, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE);    ok(rc==DDERR_INVALIDPARAMS, "Expected DDERR_INVALIDPARAMS, received %x/n", rc);    sfw=FALSE;    if(hwnd2)        sfw=SetForegroundWindow(hwnd2);    else        skip("Failed to create the second window/n");    rc = IDirectDraw_SetCooperativeLevel(lpDD,        hwnd, DDSCL_FULLSCREEN | DDSCL_EXCLUSIVE);    ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN) returned: %x/n",rc);    if(sfw)        ok(GetForegroundWindow()==hwnd,"Expected the main windows (%p) for foreground, received the second one (%p)/n",hwnd, hwnd2);    /* rect_before_create is assumed to hold the screen rect */    GetClientRect(hwnd, &window_rect);    rc = EqualRect(&rect_before_create, &window_rect);    ok(rc, "Fullscreen window has wrong size./n");    /* Set the focus window. Should fail */    rc = IDirectDraw_SetCooperativeLevel(lpDD,        hwnd, DDSCL_SETFOCUSWINDOW);    ok(rc==DDERR_HWNDALREADYSET ||       broken(rc==DDERR_INVALIDPARAMS) /* NT4/Win95 */,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW) returned: %x/n",rc);    /* All done */}
开发者ID:bfg-repo-cleaner-demos,项目名称:wine-original,代码行数:54,


示例18: releasedirectdraw

static void releasedirectdraw(void){    if( lpDD != NULL )    {        IDirectDraw_Release(lpDD);        lpDD = NULL;        SetRect(&rect_after_delete, 0, 0,                GetSystemMetrics(SM_CXSCREEN),                GetSystemMetrics(SM_CYSCREEN));        ok(EqualRect(&rect_before_create, &rect_after_delete) != 0,           "Original display mode was not restored/n");    }}
开发者ID:bfg-repo-cleaner-demos,项目名称:wine-original,代码行数:13,


示例19: SetScnRect

STDMETHODIMP CGfxRMI::SetScnRect(const RECT *pRect){	if(pRect==0)	{		m_bScnClip = FALSE;		return S_OK;	}	if(EqualRect(pRect,&m_rectScn))// && m_bScnClip)		return S_OK;	m_rectScn = *pRect;	m_bScnClip = TRUE;	return Update();}
开发者ID:xuweiqiang,项目名称:LibVRPresent,代码行数:13,


示例20: Move

/////////////////////////////////////////////////////////////// The Move Function/////////////////////////////////////////////////////////////void ALMAPI TABLE_WLAY::Move(LPRECT newRect)  {  if (EqualRect(newRect, &(m_rcItem)) == FALSE)      {      OWndInvalidateLogicalRect(m_oiParent, &m_rcItem, TRUE);      m_rcItem = *newRect;      table->visRect = *newRect;      // store the DP rect      OWndLPtoDP(m_oiParent, (LPPOINT)&table->visRect, 2);      OWndInvalidateLogicalRect(m_oiParent, &m_rcItem, TRUE);      }  }
开发者ID:benbucksch,项目名称:AppWare,代码行数:16,


示例21: CommonManage

void CommonManage(vout_display_t *vd){    vout_display_sys_t *sys = vd->sys;    /* We used to call the Win32 PeekMessage function here to read the window     * messages. But since window can stay blocked into this function for a     * long time (for example when you move your window on the screen), I     * decided to isolate PeekMessage in another thread. */    /* If we do not control our window, we check for geometry changes     * ourselves because the parent might not send us its events. */    if (sys->hparent) {        RECT rect_parent;        POINT point;        GetClientRect(sys->hparent, &rect_parent);        point.x = point.y = 0;        ClientToScreen(sys->hparent, &point);        OffsetRect(&rect_parent, point.x, point.y);        if (!EqualRect(&rect_parent, &sys->rect_parent)) {            sys->rect_parent = rect_parent;            /* FIXME I find such #ifdef quite weirds. Are they really needed ? */#if defined(MODULE_NAME_IS_direct3d) || defined(MODULE_NAME_IS_wingdi) || defined(MODULE_NAME_IS_wingapi)            SetWindowPos(sys->hwnd, 0, 0, 0,                         rect_parent.right - rect_parent.left,                         rect_parent.bottom - rect_parent.top,                         SWP_NOZORDER);            UpdateRects(vd, NULL, NULL, true);#else            /* This one is to force the update even if only             * the position has changed */            SetWindowPos(sys->hwnd, 0, 1, 1,                         rect_parent.right - rect_parent.left,                         rect_parent.bottom - rect_parent.top, 0);            SetWindowPos(sys->hwnd, 0, 0, 0,                         rect_parent.right - rect_parent.left,                         rect_parent.bottom - rect_parent.top, 0);#endif        }    }    /* */    if (EventThreadGetAndResetHasMoved(sys->event))        UpdateRects(vd, NULL, NULL, false);}
开发者ID:paa,项目名称:vlc,代码行数:50,


示例22: GetForegroundWindow

bool CCommonAppUtils::IsFullscreenWindowActive(){    HWND hwnd = GetForegroundWindow();    RECT rcWindow;    GetWindowRect(hwnd, &rcWindow);    HMONITOR hm = MonitorFromRect(&rcWindow, MONITOR_DEFAULTTONULL);    if (!hm)        return false;    MONITORINFO mi = { sizeof(mi) };    GetMonitorInfo(hm, &mi);    return !!EqualRect(&rcWindow, &mi.rcMonitor);}
开发者ID:ch3cooli,项目名称:TSVNUtils,代码行数:15,


示例23: test_margin

static void test_margin(void){    RECT r, r1;    HWND hwnd;    DWORD ret;    hwnd = CreateWindowExA(0, TOOLTIPS_CLASSA, NULL, 0,                           10, 10, 300, 100,                           NULL, NULL, NULL, 0);    ok(hwnd != NULL, "failed to create tooltip wnd/n");    ret = SendMessageA(hwnd, TTM_SETMARGIN, 0, 0);    ok(!ret, "got %d/n", ret);    SetRect(&r, -1, -1, 1, 1);    ret = SendMessageA(hwnd, TTM_SETMARGIN, 0, (LPARAM)&r);    ok(!ret, "got %d/n", ret);    SetRect(&r1, 0, 0, 0, 0);    ret = SendMessageA(hwnd, TTM_GETMARGIN, 0, (LPARAM)&r1);    ok(!ret, "got %d/n", ret);    ok(EqualRect(&r, &r1), "got %s, was %s/n", wine_dbgstr_rect(&r1), wine_dbgstr_rect(&r));    ret = SendMessageA(hwnd, TTM_SETMARGIN, 0, 0);    ok(!ret, "got %d/n", ret);    SetRect(&r1, 0, 0, 0, 0);    ret = SendMessageA(hwnd, TTM_GETMARGIN, 0, (LPARAM)&r1);    ok(!ret, "got %d/n", ret);    ok(EqualRect(&r, &r1), "got %s, was %s/n", wine_dbgstr_rect(&r1), wine_dbgstr_rect(&r));    ret = SendMessageA(hwnd, TTM_GETMARGIN, 0, 0);    ok(!ret, "got %d/n", ret);    DestroyWindow(hwnd);}
开发者ID:bdidemus,项目名称:wine,代码行数:36,


示例24: lock

HRESULT D3DPresentEngine::SetDestinationRect(const RECT& rcDest){    if (EqualRect(&rcDest, &m_rcDestRect))    {        return S_OK; // No change.    }    HRESULT hr = S_OK;    AutoLock lock(m_ObjectLock);    m_rcDestRect = rcDest;    return hr;}
开发者ID:FerozAhmed,项目名称:WPFMediaKit,代码行数:15,


示例25: GetClientRect

    void Cursor::adjustPosToClient(float &x, float &y)    {        RECT client;        RECT window;        HWND hwnd = (HWND)core::application::get()->get_handle();        GetClientRect(hwnd, &client);        GetWindowRect(hwnd, &window);        if (EqualRect(&client, &window))            return;        x = x * (client.right-client.left) / (window.right-window.left);        y = y * (client.bottom-client.top) / (window.bottom-window.top);    }
开发者ID:rgde,项目名称:rgdengine,代码行数:15,


示例26: CommonManage

void CommonManage(vout_display_t *vd){    vout_display_sys_t *sys = vd->sys;    /* We used to call the Win32 PeekMessage function here to read the window     * messages. But since window can stay blocked into this function for a     * long time (for example when you move your window on the screen), I     * decided to isolate PeekMessage in another thread. */    /* If we do not control our window, we check for geometry changes     * ourselves because the parent might not send us its events. */    if (sys->hparent) {        RECT rect_parent;        POINT point;        /* Check if the parent window has resized or moved */        GetClientRect(sys->hparent, &rect_parent);        point.x = point.y = 0;        ClientToScreen(sys->hparent, &point);        OffsetRect(&rect_parent, point.x, point.y);        if (!EqualRect(&rect_parent, &sys->rect_parent)) {            sys->rect_parent = rect_parent;            /* This code deals with both resize and move             *             * For most drivers(direct3d, gdi, opengl), move is never             * an issue. The surface automatically gets moved together             * with the associated window (hvideownd)             *             * For directx, it is still important to call UpdateRects             * on a move of the parent window, even if no resize occurred             */            SetWindowPos(sys->hwnd, 0, 0, 0,                         rect_parent.right - rect_parent.left,                         rect_parent.bottom - rect_parent.top,                         SWP_NOZORDER);            UpdateRects(vd, NULL, NULL, true);        }    }    /* HasMoved means here resize or move */    if (EventThreadGetAndResetHasMoved(sys->event))        UpdateRects(vd, NULL, NULL, false);}
开发者ID:orewatakesi,项目名称:VLC-for-VS2010,代码行数:46,


示例27: SetDstRect

STDMETHODIMP CGfxFB::SetDstRect(const RECT *pRect){	if(EqualRect(pRect,&m_rectDst))		return S_OK;	m_rectDst = *pRect;	IntersectRect(&m_rectDst,&m_rectScn,&m_rectDst);#ifdef PXA_LINUX	DP("FB Setdest(%d,%d,%d,%d) /n",m_rectDst.left, m_rectDst.top, m_rectDst.right, m_rectDst.bottom);	return E_UNEXPECTED;	m_fbvinfo.xres  = (m_rectDst.right - m_rectDst.left)&(~(DST_ALIGN-1));	m_fbvinfo.yres  = (m_rectDst.bottom - m_rectDst.top)&(~(DST_ALIGN -1));	m_fbvinfo.bits_per_pixel = 19;	m_fbvinfo.nonstd = (FORMAT_PLANAR_420<< 20) | (m_rectDst.top << 10) | m_rectDst.left;	if (m_pBuff != NULL)	{		munmap(m_pBuff, m_iBufSize);		m_pBuff = NULL;	}	DP("Update info: left = %d, top = %d, xres = %d, yres = %d/n", m_fbvinfo.nonstd&0x3ff, (m_fbvinfo.nonstd>>10)&0x3ff, m_fbvinfo.xres, m_fbvinfo.yres);	int ret = ioctl(m_iHndFB, FBIOPUT_VSCREENINFO, &m_fbvinfo);	DP("Update()::FBIOPUT_VSCREENINFO :%d /n", ret);		ioctl(m_iHndFB, FBIOGET_FSCREENINFO, &m_fbfinfo);	m_iBufSize = m_fbfinfo.smem_len;	DP("Update()::m_iBufSize  :%d /n", m_iBufSize );	m_pBuff = (unsigned char *)mmap(0, m_iBufSize, PROT_READ | PROT_WRITE, MAP_SHARED, m_iHndFB, 0);	if(m_pBuff ==NULL)	{		DP("Update()::set dest failed /n");		return E_FAIL;	}#endif	Update();	return S_OK;}
开发者ID:xuweiqiang,项目名称:LibVRPresent,代码行数:44,


示例28: __createWindow0

HWND __createWindow0(   MHND hmMonitor,LPCTSTR lpClassName,LPCTSTR lpWindowName,                        DWORD dwStyle,int x,int y,int nWidth,                        int nHeight,HWND hWndParent,HMENU hMenu,                        HANDLE hInstance,LPVOID lpParam ){    HWND    retCode = NULL;    if( (NULL != hmMonitor) && (NULL != lpClassName) &&        (NULL != lpWindowName) && (NULL != hInstance) )    {        RECT    rRW     = {0,0,0,0};        RECT    rRM     = {0,0,0,0};        RECT    rSect   = {0,0,0,0};        SetRect(&rRW,x,y,x+nWidth,y+nHeight);        if( TRUE == _monitorBounds(hmMonitor,&rRM) )        {            __normaRectPos(&rRW,rRW,rRM);            IntersectRect(&rSect,&rRM,&rRW);            if( TRUE == EqualRect(&rSect,&rRW) )            {                x = rSect.left;                y = rSect.top;                nWidth = rSect.right - rSect.left;                nHeight = rSect.bottom - rSect.top;                retCode = CreateWindow(                                            lpClassName,lpWindowName,                                            dwStyle,x,y,nWidth,                                            nHeight,hWndParent,hMenu,                                            (HINSTANCE)hInstance,lpParam                                        );            } else  {                    //  A coisa indefinida. Nao tenho sabdoria o que                    //  fazer aqui mesmo                    //  E necessario perguntar Jeannette                    }        }    }    return retCode;}
开发者ID:AllenWeb,项目名称:openjdk-1,代码行数:44,


示例29: dump_client

static void dump_client(HWND hRebar){    RECT r;    BOOL notify;    GetWindowRect(hRebar, &r);    MapWindowPoints(HWND_DESKTOP, hMainWnd, &r, 2);    if (height_change_notify_rect.top != -1)    {        RECT rcClient;        GetClientRect(hRebar, &rcClient);        assert(EqualRect(&rcClient, &height_change_notify_rect));        notify = TRUE;    }    else        notify = FALSE;    printf("    {{%d, %d, %d, %d}, %d, %s},/n", r.left, r.top, r.right, r.bottom, SendMessageA(hRebar, RB_GETROWCOUNT, 0, 0),        notify ? "TRUE" : "FALSE");    SetRect(&height_change_notify_rect, -1, -1, -1, -1);}
开发者ID:GYGit,项目名称:reactos,代码行数:19,



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


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