return TRUE;
}
+ /***********************************************************************
+ * check_printer_setup [internal]
+ */
+static LRESULT check_printer_setup(HWND hDlg)
+{
+ DWORD needed,num;
+ WCHAR resourcestr[256],resultstr[256];
+ int res;
+
+ EnumPrintersW(PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &needed, &num);
+ if(needed == 0)
+ {
+ EnumPrintersW(PRINTER_ENUM_CONNECTIONS, NULL, 2, NULL, 0, &needed, &num);
+ }
+ if(needed > 0)
+ return TRUE;
+ else
+ {
+ LoadStringW(COMDLG32_hInstance, PD32_NO_DEVICES,resultstr, 255);
+ LoadStringW(COMDLG32_hInstance, PD32_PRINT_TITLE,resourcestr, 255);
+ res = MessageBoxW(hDlg, resultstr, resourcestr,MB_OK | MB_ICONWARNING);
+ return FALSE;
+ }
+}
+
/***********************************************************************
* PRINTDLG_WMInitDialog [internal]
*/
} else {
PrintStructures = (PRINT_PTRA*) lParam;
SetPropA(hDlg,"__WINE_PRINTDLGDATA",PrintStructures);
+ if(!check_printer_setup(hDlg))
+ {
+ EndDialog(hDlg,FALSE);
+ return FALSE;
+ }
res = PRINTDLG_WMInitDialog(hDlg, wParam, PrintStructures);
if(PrintStructures->lpPrintDlg->Flags & PD_ENABLEPRINTHOOK)
} else {
PrintStructures = (PRINT_PTRW*) lParam;
SetPropW(hDlg, propW, PrintStructures);
+ if(!check_printer_setup(hDlg))
+ {
+ EndDialog(hDlg,FALSE);
+ return FALSE;
+ }
res = PRINTDLG_WMInitDialogW(hDlg, wParam, PrintStructures);
if(PrintStructures->lpPrintDlg->Flags & PD_ENABLEPRINTHOOK)
/***********************************************************************
* PrintDlgW (COMDLG32.@)
+ *
+ * See PrintDlgA.
*/
BOOL WINAPI PrintDlgW(
LPPRINTDLGW lppd /* [in/out] ptr to PRINTDLG32 struct */
}
/***********************************************************************
* PageSetupDlgW (COMDLG32.@)
+ *
+ * See PageSetupDlgA.
*/
BOOL WINAPI PageSetupDlgW(LPPAGESETUPDLGW setupdlg) {
HGLOBAL hDlgTmpl;
/***********************************************************************
* PrintDlgExA (COMDLG32.@)
+ *
+ * See PrintDlgExW.
+ *
+ * FIXME
+ * Stub
*/
HRESULT WINAPI PrintDlgExA(LPPRINTDLGEXA lpPrintDlgExA)
{
/***********************************************************************
* PrintDlgExW (COMDLG32.@)
+ *
+ * Display the the PRINT dialog box, which enables the user to specify
+ * specific properties of the print job. The property sheet can also have
+ * additional application-specific and driver-specific property pages.
+ *
+ * PARAMS
+ * lppd [IO] ptr to PRINTDLGEX struct
+ *
+ * RETURNS
+ * Success: S_OK
+ * Failure: One of the following COM error codes:
+ * E_OUTOFMEMORY Insufficient memory.
+ * E_INVALIDARG One or more arguments are invalid.
+ * E_POINTER Invalid pointer.
+ * E_HANDLE Invalid handle.
+ * E_FAIL Unspecified error.
+ *
+ * FIXME
+ * Stub
*/
HRESULT WINAPI PrintDlgExW(LPPRINTDLGEXW lpPrintDlgExW)
{