Add tests for NtGdiCombineRgn (14), NtGdiCreateCompatibleDC (4), NtGdiDoPalette (1), NtGdiFlushUserBatch (10), NtGdiPolyPolyDraw (60), NtGdiselectBitmap (4), NtGdiSelectPen (6), NtGdiSetDIBitsToDeviceInternal (2), NtUserEnumDisplayMonitors (7), NtUserGetClassInfo (15), NtUserProcessConnect (1), NtUserSelectPalette (13), NtUserSystemParametersInfo (1) (= 138 new tests)
svn path=/trunk/; revision=38044
2008-12-13 16:48:01 +00:00
|
|
|
|
|
|
|
INT
|
|
|
|
Test_NtGdiCreateCompatibleDC(PTESTINFO pti)
|
|
|
|
{
|
|
|
|
HDC hDC;
|
|
|
|
HGDIOBJ hObj;
|
|
|
|
|
|
|
|
/* Test if aa NULL DC is accepted */
|
|
|
|
hDC = NtGdiCreateCompatibleDC(NULL);
|
|
|
|
TEST(hDC != NULL);
|
|
|
|
|
|
|
|
/* We select a nwe palette. Note: SelectObject doesn't work with palettes! */
|
|
|
|
hObj = SelectPalette(hDC, GetStockObject(DEFAULT_PALETTE), 0);
|
|
|
|
/* The old palette should be GetStockObject(DEFAULT_PALETTE) */
|
|
|
|
TEST(hObj == GetStockObject(DEFAULT_PALETTE));
|
|
|
|
|
|
|
|
/* The default bitmap should be GetStockObject(21) */
|
|
|
|
hObj = SelectObject(hDC, GetStockObject(21));
|
|
|
|
TEST(hObj == GetStockObject(21));
|
|
|
|
|
|
|
|
/* The default pen should be GetStockObject(BLACK_PEN) */
|
|
|
|
hObj = SelectObject(hDC, GetStockObject(WHITE_PEN));
|
|
|
|
TEST(hObj == GetStockObject(BLACK_PEN));
|
2010-05-14 23:19:16 +00:00
|
|
|
|
|
|
|
TEST(NtGdiDeleteObjectApp(hDC) != 0);
|
Add tests for NtGdiCombineRgn (14), NtGdiCreateCompatibleDC (4), NtGdiDoPalette (1), NtGdiFlushUserBatch (10), NtGdiPolyPolyDraw (60), NtGdiselectBitmap (4), NtGdiSelectPen (6), NtGdiSetDIBitsToDeviceInternal (2), NtUserEnumDisplayMonitors (7), NtUserGetClassInfo (15), NtUserProcessConnect (1), NtUserSelectPalette (13), NtUserSystemParametersInfo (1) (= 138 new tests)
svn path=/trunk/; revision=38044
2008-12-13 16:48:01 +00:00
|
|
|
|
|
|
|
return APISTATUS_NORMAL;
|
|
|
|
}
|
|
|
|
|