Commit ed416733 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

comdlg32/tests: Add HDC tests for PrintDlgEx.

parent 24047e90
......@@ -344,6 +344,32 @@ static void test_PrintDlgExW(void)
GlobalFree(pDlg->hDevMode);
GlobalFree(pDlg->hDevNames);
/* this works: PD_RETURNDC with PD_RETURNDEFAULT */
ZeroMemory(pDlg, sizeof(PRINTDLGEXW));
pDlg->lStructSize = sizeof(PRINTDLGEXW);
pDlg->hwndOwner = GetDesktopWindow();
pDlg->Flags = PD_RETURNDEFAULT | PD_NOWARNING | PD_NOPAGENUMS | PD_RETURNDC;
pDlg->nStartPage = START_PAGE_GENERAL;
res = pPrintDlgExW(pDlg);
ok(res == S_OK, "got 0x%x (expected S_OK)\n", res);
ok(pDlg->hDC != NULL, "HDC missing for PD_RETURNDC\n");
GlobalFree(pDlg->hDevMode);
GlobalFree(pDlg->hDevNames);
DeleteDC(pDlg->hDC);
/* this works: PD_RETURNIC with PD_RETURNDEFAULT */
ZeroMemory(pDlg, sizeof(PRINTDLGEXW));
pDlg->lStructSize = sizeof(PRINTDLGEXW);
pDlg->hwndOwner = GetDesktopWindow();
pDlg->Flags = PD_RETURNDEFAULT | PD_NOWARNING | PD_NOPAGENUMS | PD_RETURNIC;
pDlg->nStartPage = START_PAGE_GENERAL;
res = pPrintDlgExW(pDlg);
ok(res == S_OK, "got 0x%x (expected S_OK)\n", res);
ok(pDlg->hDC != NULL, "HDC missing for PD_RETURNIC\n");
GlobalFree(pDlg->hDevMode);
GlobalFree(pDlg->hDevNames);
DeleteDC(pDlg->hDC);
HeapFree(GetProcessHeap(), 0, pDlg);
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment