static void ShowProperties(HWND parent, Doc doc, DisplayModel *dm, bool extended=false) { PropertiesLayout *layoutData = FindPropertyWindowByParent(parent); if (layoutData) { SetActiveWindow(layoutData->hwnd); return; } if (!doc.IsEngine() && !doc.IsEbook()) return; layoutData = new PropertiesLayout(); gPropertiesWindows.Append(layoutData); GetProps(doc, layoutData, dm, extended); if (!CreatePropertiesWindow(parent, layoutData)) delete layoutData; }
static void ShowProperties(HWND parent, Controller *ctrl, bool extended=false) { PropertiesLayout *layoutData = FindPropertyWindowByParent(parent); if (layoutData) { SetActiveWindow(layoutData->hwnd); return; } if (!ctrl) return; layoutData = new PropertiesLayout(); gPropertiesWindows.Append(layoutData); GetProps(ctrl, layoutData, extended); if (!CreatePropertiesWindow(parent, layoutData)) delete layoutData; }
void DeletePropertiesWindow(HWND hwndParent) { PropertiesLayout *pl = FindPropertyWindowByParent(hwndParent); if (pl) DestroyWindow(pl->hwnd); }