+ else if (name == "useSystemDefaults")
+ {
+ wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow);
+ bool useDefaults = property->GetValue().BoolValue();
+ long style = resource->GetResourceStyle();
+ if (useDefaults)
+ {
+ if ((style & wxRESOURCE_USE_DEFAULTS) == 0)
+ style |= wxRESOURCE_USE_DEFAULTS;
+ }
+ else
+ {
+ if ((style & wxRESOURCE_USE_DEFAULTS) != 0)
+ style -= wxRESOURCE_USE_DEFAULTS;
+ }
+ resource->SetResourceStyle(style);
+ panelWindow = (wxPanel *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(panelWindow, this);
+ return TRUE;
+ }
+ else if (name == "useDialogUnits")
+ {
+ wxItemResource *resource = wxResourceManager::GetCurrentResourceManager()->FindResourceForWindow(panelWindow);
+ bool useDialogUnits = property->GetValue().BoolValue();
+ long style = resource->GetResourceStyle();
+ if (useDialogUnits)
+ {
+ if ((style & wxRESOURCE_DIALOG_UNITS) == 0)
+ {
+ style |= wxRESOURCE_DIALOG_UNITS;
+ ConvertDialogUnits(TRUE); // Convert all resources
+ }
+ }
+ else
+ {
+ if ((style & wxRESOURCE_DIALOG_UNITS) != 0)
+ {
+ style -= wxRESOURCE_DIALOG_UNITS;
+ ConvertDialogUnits(FALSE); // Convert all resources
+ }
+ }
+ resource->SetResourceStyle(style);
+ panelWindow = (wxPanel *)wxResourceManager::GetCurrentResourceManager()->RecreateWindowFromResource(panelWindow, this);
+ m_propertyWindow = panelWindow;
+ // TODO: need to regenerate the width and height properties else they'll be inconsistent.
+ return TRUE;
+ }