CGXDisplayPropertiesDialog::CGXDisplayPropertiesDialog

CGXDisplayPropertiesDialog(CGXProperties* pSettings, CGXStylesMap* pStylesMap, BOOL* pbSaveDefault, BOOL bIsChild, UINT nIDTemplate = GX_IDD_SETTINGS_DLG, 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.

bIsChild

Reserved. You should set this FALSE.

nIDTemplate

Reserved. You should use the default value.

pParent

Reserved. Pointer to a parent window.

Remarks

Constructs a CGXDisplayPropertiesDialog object.

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

Example

Here is how you should open the properties dialog and then apply the changes to the grid.

void CMyGridView::OnViewProperties()
{
   BOOL bSaveDefault = FALSE;
   CGXProperties* pPropertyObj = GetParam()->GetProperties();
   ASSERT(pPropertyObj->IsKindOf(RUNTIME_CLASS(CGXProperties)));
   CGXProperties* pNewSettings = new CGXProperties;
   *pNewSettings = *pPropertyObj;
   CGXDisplayPropertiesDialog dlg(pNewSettings, GetParam()->GetStylesMap(), &bSaveDefault, FALSE);
   int result = dlg.DoModal();
   if (result == IDOK)
   {
      ChangeProperties(*pNewSettings);
      if (bSaveDefault)
         pPropertyObj->WriteProfile();
      Redraw();
   }
   delete pNewSettings;
}

See Also

 CGXProperties  CGXGridCore::ChangeProperties

See the sample file mygridvw.cpp in gridapp for displaying a dialog that lets the user change header/footer and page setup settings.

CGXDisplayPropertiesDialog

 Class Overview |  Class Members