From f69e89c0232af601b9c07296e355d96bd81e68e8 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 14 Jan 2011 18:53:49 -0700 Subject: [PATCH] win32: connect print dialog to given parent (if any) which causes a different style dialog to be used --- collects/mred/private/wx/win32/printer-dc.rkt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/collects/mred/private/wx/win32/printer-dc.rkt b/collects/mred/private/wx/win32/printer-dc.rkt index 71a54a6c0d..c4cedf4eb6 100644 --- a/collects/mred/private/wx/win32/printer-dc.rkt +++ b/collects/mred/private/wx/win32/printer-dc.rkt @@ -107,6 +107,9 @@ (set-PAGESETUPDLG-Flags! p (if just-create? PSD_RETURNDEFAULT 0)) + (set-PAGESETUPDLG-hwndOwner! p (and parent + (send parent is-shown?) + (send parent get-hwnd))) (let ([r (PageSetupDlgW p)]) (when r (let ([new-p (clone-page-setup p)]) @@ -128,6 +131,8 @@ (class (record-dc-mixin (dc-mixin bitmap-dc-backend%)) (init [parent #f]) + (define parent-frame parent) + (super-make-object (make-object win32-bitmap% 1 1 #f)) (inherit get-recorded-command @@ -168,6 +173,9 @@ (set-cpointer-tag! p PRINTDLG-tag) (memset p 0 1 _PRINTDLG) (set-PRINTDLG-lStructSize! p (ctype-sizeof _PRINTDLG)) + (set-PRINTDLG-hwndOwner! p (and parent-frame + (send parent-frame is-shown?) + (send parent-frame get-hwnd))) (set-PRINTDLG-hDevMode! p (PAGESETUPDLG-hDevMode page-setup)) (set-PRINTDLG-hDevNames! p (PAGESETUPDLG-hDevNames page-setup)) (set-PRINTDLG-Flags! p (bitwise-ior PD_RETURNDC))