Using settings dialogs requires a bit more setup. The most important thing to remember is that the &xcenter; does not invoke a settings dialog on an open &xcenter; widget, but on a setup string only.
This was done so that settings dialogs can be displayed for a widget even if that widget is not currently visible (i.e. doesn't currently exist as a window). This allows the &xcenter; to display the settings dialog from both the "Properties" menu item in a widget's context menu and from a widget's context menu on the "Widgets" page in the &xcenter; settings notebook -- even if the &xcenter; isn't currently open.
Basically, to support settings dialogs, your widget class must do the following:
XCENTERWIDGETCLASS
), set
the pShowSettingsDlg
field to the function in your DLL which can
display the settings dialog.
This function must have the following prototype:
typedef VOID EXPENTRY ShowSettingsDialog(PWIDGETSETTINGSDLGDATA pData);
WinDlgBox
and not return until the dialog has been
dismissed ("OK" or "Cancel" were pressed).
That function receives a pointer to a temporary
WIDGETSETTINGSDLGDATA
structure, which the &xcenter; has composed for the settings dialog. In there, the
settings dialog can find out whether the widget is currently visible.
src\widgets
in the &xwp; sources.