<< Return to Main Index

< Return to Class Index

CGXPrintPropertiesDialog::CGXPrintPropertiesDialog

CGXPrintPropertiesDialog(CGXProperties* pSettings, CGXStylesMap* pStylesMap, BOOL* pbSaveDefault, CWnd* pParent = NULL);

pSettings

A pointer to the property object.

pStylesMap

A pointer to the styles map object.

pbSaveDefault

A pointer to a BOOL which will be set TRUE if the property-object shall be written to profile after the dialog has been closed.

pParent

Reserved. Pointer to a parent window.

Remarks

Constructs a CGXPrintPropertiesDialog object.

You can copy the example to your class if you want to provide the dialog for the end user.

Example

This example shows how to display the dialog:

void CMyGridView::OnFilePageSetup()
{
   BOOL bSaveDefault = FALSE;

   CGXProperties* pPropertyObj = GetParam()->GetProperties();
   ASSERT(pPropertyObj->IsKindOf(RUNTIME_CLASS(CGXProperties)));

   CGXProperties* pNewSettings = new CGXProperties;
   *pNewSettings = *pPropertyObj;

   CGXPrintPropertiesDialog  dlg(pNewSettings, GetParam()->GetStylesMap(), &bSaveDefault, FALSE);

   int result = dlg.DoModal();
   if (result == IDOK)
   {
      ChangeProperties(*pNewSettings);
      if (bSaveDefault)
         pPropertyObj->WriteProfile();

      SetModifiedFlag();
   }

   delete pNewSettings;
}

See Also

CGXProperties CGXGridCore::ChangeProperties

CGXPrintPropertiesDialog

Class Overview | Class Members