Detlef Riekenberg : comdlg32/tests: Add HDC tests for PrintDlgEx.
Alexandre Julliard
julliard at winehq.org
Tue Mar 27 12:48:05 CDT 2012
Module: wine
Branch: master
Commit: ed4167330601e27d152037575b0342fc1268bce3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ed4167330601e27d152037575b0342fc1268bce3
Author: Detlef Riekenberg <wine.dev at web.de>
Date: Sun Mar 18 22:14:24 2012 +0100
comdlg32/tests: Add HDC tests for PrintDlgEx.
---
dlls/comdlg32/tests/printdlg.c | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/dlls/comdlg32/tests/printdlg.c b/dlls/comdlg32/tests/printdlg.c
index 2eaf9d4..b6c8325 100644
--- a/dlls/comdlg32/tests/printdlg.c
+++ b/dlls/comdlg32/tests/printdlg.c
@@ -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;
More information about the wine-cvs
mailing list