Vitaly Lipatov lav@etersoft.ru writes:
+#define CALLANYPAINTHOOK(msg, wParam, lParam) \
- (((pda->dlga->Flags & PSD_ENABLEPAGEPAINTHOOK) && \
- pda->dlga->lpfnPagePaintHook(hWnd,msg,wParam,lParam)) || \
- PRINTDLG_DefaultPagePaintHook(hWnd,msg,wParam,lParam))
It would be a lot cleaner to always call your DefaultPagePaintHook function and have it call the user's hook first if it's set.
- if (CALLANYPAINTHOOK(WM_PSD_PAGESETUPDLG, MAKELONG(papersize, orientation), (LPARAM)pda))
return FALSE;
The LPARAM should probably be pda->dlga here.