2015-12-28 20:31:10 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS api tests
|
|
|
|
* LICENSE: GPL - See COPYING in the top level directory
|
|
|
|
* PURPOSE: Test for NtUserGetClassInfo
|
|
|
|
* PROGRAMMERS:
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <win32nt.h>
|
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
|
|
|
|
2015-12-28 20:31:10 +00:00
|
|
|
START_TEST(NtUserGetClassInfo)
|
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
|
|
|
{
|
2015-12-28 20:31:10 +00:00
|
|
|
HINSTANCE hinst = GetModuleHandle(NULL);
|
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
|
|
|
WNDCLASSEXW wclex, wclex2 = {0};
|
|
|
|
UNICODE_STRING us;
|
2012-09-25 21:30:25 +00:00
|
|
|
PWSTR pwstr = NULL;
|
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
|
|
|
|
|
|
|
us.Length = 8;
|
|
|
|
us.MaximumLength = 8;
|
|
|
|
us.Buffer = L"test";
|
|
|
|
|
|
|
|
wclex.cbSize = sizeof(WNDCLASSEXW);
|
|
|
|
wclex.style = 0;
|
|
|
|
wclex.lpfnWndProc = NULL;
|
|
|
|
wclex.cbClsExtra = 2;
|
|
|
|
wclex.cbWndExtra = 4;
|
2015-12-28 20:31:10 +00:00
|
|
|
wclex.hInstance = hinst;
|
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
|
|
|
wclex.hIcon = NULL;
|
|
|
|
wclex.hCursor = NULL;
|
|
|
|
wclex.hbrBackground = CreateSolidBrush(RGB(4,7,5));
|
|
|
|
wclex.lpszMenuName = L"MyMenu";
|
|
|
|
wclex.lpszClassName = us.Buffer;
|
|
|
|
wclex.hIconSm = NULL;
|
|
|
|
|
|
|
|
ASSERT(RegisterClassExW(&wclex) != 0);
|
|
|
|
|
2015-12-28 20:31:10 +00:00
|
|
|
TEST(GetClassInfoExW(hinst, us.Buffer, &wclex) != 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
|
|
|
wclex2.cbSize = sizeof(WNDCLASSEXW);
|
2015-12-28 20:31:10 +00:00
|
|
|
TEST(NtUserGetClassInfo(hinst, &us, &wclex2, &pwstr, 0) != 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
|
|
|
|
|
|
|
TEST(pwstr == wclex.lpszMenuName);
|
|
|
|
TEST(wclex2.cbSize == wclex.cbSize);
|
|
|
|
TEST(wclex2.style == wclex.style);
|
|
|
|
TEST(wclex2.lpfnWndProc == wclex.lpfnWndProc);
|
|
|
|
TEST(wclex2.cbClsExtra == wclex.cbClsExtra);
|
|
|
|
TEST(wclex2.cbWndExtra == wclex.cbWndExtra);
|
|
|
|
TEST(wclex2.hInstance == wclex.hInstance);
|
|
|
|
TEST(wclex2.hIcon == wclex.hIcon);
|
|
|
|
TEST(wclex2.hCursor == wclex.hCursor);
|
|
|
|
TEST(wclex2.hbrBackground == wclex.hbrBackground);
|
|
|
|
TEST(wclex2.lpszMenuName == 0);
|
|
|
|
TEST(wclex2.lpszClassName == 0);
|
|
|
|
TEST(wclex2.hIconSm == wclex.hIconSm);
|
|
|
|
|
|
|
|
}
|