Newsgroups: comp.windows.ms.programmer
Path: funic!fuug!news.funet.fi!sunic!psinntp!psinntp!rpi!usc!howland.reston.ans.net!spool.mu.edu!torn!watserv2.uwaterloo.ca!csg.uwaterloo.ca!wcruppel
From: wcruppel@csg.uwaterloo.ca (Bill Ruppel)
Subject: HELP! Custom PRINTDLG Problem!
Message-ID: <C1Gupv.FLF@watserv2.uwaterloo.ca>
Sender: news@watserv2.uwaterloo.ca
Organization: Computer Systems Group, University of Waterloo
Date: Tue, 26 Jan 1993 14:53:53 GMT
Lines: 29

Hi all.

I've written a custom dialog for use with the Common Dialog Routine 'PrintDlg'
in Windows 3.1. The custom dialog just adds one extra button, below the
"Setup..." button in the PRINT SETUP dialog. Now, the problem is, I want to
be able to determine which printer has been selected in the dialog when the
user presses this extra button. I've tried looking at the PRINTDLG structure
at the time the user pushes the button, but the DEVNAMES structure is the
same as it was when I called the 'PrintDlg' routine. (In other words,
Windows does not seem to update the PRINTDLG structure until you press the
'OK' button)

I know that I can kludge my way around this problem by looking directly at
the combo box in the PRINT SETUP dialog, and parsing the printer name out
of the text, but this would be far from elegant.

Does anyone know a solution to this? Does Windows perhaps send a message
to my Setup Hook routine informing me that the user has changed printers?

Any help would be appreciated, and please send replies via E-Mail, as I do
not regularly read this newsgroup...

Thanks in advance!

--
Bill Ruppel, Software Engineer Extrordinaire
Waterloo Foundation for the Advancement of Computing (WATFAC) 
EMail: wcruppel@csg.uwaterloo.ca

