gdi32/tests: Create a window for justification tests that generate output

instead of painting over the desktop.
This commit is contained in:
Alexandre Julliard 2007-02-15 19:41:34 +01:00
parent 795b40187e
commit 6ede7a1130
1 changed files with 9 additions and 3 deletions

View File

@ -998,10 +998,11 @@ static void testJustification(HDC hdc, PSTR str, RECT *clientArea)
static void test_SetTextJustification(void)
{
HDC hdc = GetDC(0);
RECT clientArea = {0, 0, 400, 400};
HDC hdc;
RECT clientArea;
LOGFONTA lf;
HFONT hfont;
HWND hwnd;
static char testText[] =
"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do "
"eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut "
@ -1011,6 +1012,10 @@ static void test_SetTextJustification(void)
"nulla pariatur. Excepteur sint occaecat cupidatat non proident, "
"sunt in culpa qui officia deserunt mollit anim id est laborum.";
hwnd = CreateWindowExA(0, "static", "", WS_POPUP, 0,0, 400,400, 0, 0, 0, NULL);
GetClientRect( hwnd, &clientArea );
hdc = GetDC( hwnd );
memset(&lf, 0, sizeof lf);
lf.lfCharSet = ANSI_CHARSET;
lf.lfClipPrecision = CLIP_DEFAULT_PRECIS;
@ -1024,7 +1029,8 @@ static void test_SetTextJustification(void)
testJustification(hdc, testText, &clientArea);
DeleteObject(hfont);
ReleaseDC(0, hdc);
ReleaseDC(hwnd, hdc);
DestroyWindow(hwnd);
}
static void test_font_charset(void)