mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
comdlg32: Return a device context when requested.
This commit is contained in:
parent
ecd6f40acb
commit
24047e902f
@ -4002,7 +4002,19 @@ HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA lppd)
|
||||
hr = E_FAIL;
|
||||
|
||||
lppd->hDevMode = update_devmode_handleA(lppd->hDevMode, dm);
|
||||
if (!lppd->hDevMode)
|
||||
if (!hr && lppd->hDevMode) {
|
||||
if (lppd->Flags & PD_RETURNDC) {
|
||||
lppd->hDC = CreateDCA(dbuf->pDriverPath, pbuf->pPrinterName, pbuf->pPortName, dm);
|
||||
if (!lppd->hDC)
|
||||
hr = E_FAIL;
|
||||
}
|
||||
else if (lppd->Flags & PD_RETURNIC) {
|
||||
lppd->hDC = CreateICA(dbuf->pDriverPath, pbuf->pPrinterName, pbuf->pPortName, dm);
|
||||
if (!lppd->hDC)
|
||||
hr = E_FAIL;
|
||||
}
|
||||
}
|
||||
else
|
||||
hr = E_FAIL;
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, pbuf);
|
||||
@ -4111,7 +4123,19 @@ HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW lppd)
|
||||
hr = E_FAIL;
|
||||
|
||||
lppd->hDevMode = update_devmode_handleW(lppd->hDevMode, dm);
|
||||
if (!lppd->hDevMode)
|
||||
if (!hr && lppd->hDevMode) {
|
||||
if (lppd->Flags & PD_RETURNDC) {
|
||||
lppd->hDC = CreateDCW(dbuf->pDriverPath, pbuf->pPrinterName, pbuf->pPortName, dm);
|
||||
if (!lppd->hDC)
|
||||
hr = E_FAIL;
|
||||
}
|
||||
else if (lppd->Flags & PD_RETURNIC) {
|
||||
lppd->hDC = CreateICW(dbuf->pDriverPath, pbuf->pPrinterName, pbuf->pPortName, dm);
|
||||
if (!lppd->hDC)
|
||||
hr = E_FAIL;
|
||||
}
|
||||
}
|
||||
else
|
||||
hr = E_FAIL;
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, pbuf);
|
||||
|
Loading…
Reference in New Issue
Block a user