MyPanelSetSettingsA control panel extension must respond to the
kPanelSetSettingsSelectrequest code. A control panel sends this request code to your extension to request that your extension set the panel's current settings to the specified values. A control panel extension typically responds to the
kPanelSetSettingsSelectrequest code by calling an extension-defined subroutine (for example,
MyPanelSetSettings) to handle the request.
FUNCTION MyPanelSetSettings (globals: Handle; ud: UserData; flags: LongInt): ComponentResult;
- A handle to the control panel extension's global data.
- A handle to the control panel's configuration data.
- Reserved. This parameter is always 0.
MyPanelSetSettingsfunction should parse the block of configuration data passed in the
udparameter and set the values of the items in the panel based on that data. The control panel calls this function just before your panel is displayed to the user and whenever a user cancels changes to your panel. You can assume that the data passed in the
udparameter was created by a previous call to your extension's
It's possible that your extension might not able to set the value of one or more panel items to the values specified in the configuration data. (For example, the hardware environment might have changed since the configuration data was last stored by the control panel.) When this happens, you should try to match the specified panel settings as closely as possible. If you cannot match perfectly, you should return some nonzero result code.
MyPanelSetSettingsfunction should return
noErrif successful, or an appropriate result code otherwise.