Environment: VC++ 6.0, NT 4.0
I am trying to customize the 'Page Setup' dialog box. All I want to do is to add a few controls to the
dialog box without changing any of the existing controls.
This is what I did:
--I created a dialog box with a group box and a button at the bottom. I then made this dialog box of type
'Child' with no border and checked the 'Clip siblings' and 'Visible' in the Styles options.
--I then added a class to my project using CDialog as my base class
--In the dialog header file, I changed the 'CDialog' string to 'CPageSetupDialog' also modifying the
constructor function.
--My constructor looks like this
SetupDlg::SetupDlg(DWORD dwFlags, CWnd *pParentWnd)
: CPageSetupDialog(dwFlags,pParentWnd)
{
//{{AFX_DATA_INIT(SetupDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_psd.lpPageSetupTemplateName = MAKEINTRESOURCE(IDD_PAGESETUP_DIALOG); //My
dialog box with a group box and a button
m_psd.Flags |= PSD_ENABLEPAGESETUPTEMPLATE ;
}
I have a 'Page Setup..' menu option which should invoke the dialog. However, the doModal() returns 0
and no dialog shows up. However, if I remove the last two lines in the code above, the 'Page Setup'
dialog box is displayed but without my button.
What am I doing wrong?
Thanks
( to copy the resource open the DLL in MSDEV and open as resource )