January 23rd, 2009, 09:16 AM
DEVMODE changes while active not reflected in CPrintDialog derived class
Using CPrintDialog as a base class I've created my own dialog.
In this dialog you can select different views (Not related to MFC Views) and set print info for each view.
Most of the data is retrieved from the devmode structure and saved elsewhere.
My problem is that when selecting a view with non-default print info I try and put this data back into the devmode structure while the dialog is active and the changes do not get reflected in the dialog. If I make the same changes to the devmode structure before DoModal is called the dialog is initialized properly and reflects those changes.
I have tried UpdateData(FALSE) and the DocumentProperties() functions with no success.
Is there any way to update/reinitialize the CPrintDialog controls without destroying and recreating the dialog? Or even better, is there a way to make a modeless child CPrintDialog so that I could destroy and create it inside a parent dialog?
Any help would be greatly appreciated
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!