I'm trying to use a custom pagesetup dialog template which i've stored in a resource file that is used by my program:
12 DIALOG 0, 0, 356, 196
STYLE DS_MODALFRAME | DS_CONTEXTHELP | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Page Setup"
LANGUAGE LANG_ENGLISH, 0x1
FONT 8, "MS Shell Dlg"
// controls here
I've compiled this (without any apparent problems) and I created a custom pagesetup dialog class based on the standard one in dialogs.pas.
As you can see in the resource template, the pagesetup dialog is named 12, so I assume the ID will be 12.
I've added the following code to the dialog's GetDefaults method:
PageSetupDlgRec.lpPageSetupTemplateName := MakeIntResource(12);
The idea is that that'd supposed to load the new template, however, when creating and executing an instance of the class, it doesn't appear to have loaded the template as it still uses the default, where did I go wrong?