CDK - function Open
function Open(const APluginID:Pchar; AOwner: hwnd): hwnd);
Declared in: svn\components\sharpcenter\uSharpCenterDllMethods.pas
Parameters
- APluginID: PChar (const)
The PluginID parameter is used to pass custom identifiers between configurations, such as passing a ThemeID to the a ThemeInfo configuration
- AOwner: Hwnd (const)
The AOwner parameter contains the handle of the SharpCenter form, this is required when creating the plugin form
- Result: Hwnd
The Result parameter should return the handle of the plugin form
Description
The Open function is used when first loading a configuration, a form is created within this method (SharpCenter Page), and then the handle is assigned to SharpCenter. The example below, will explain this more clearly.
Examples
// Create Form if Not(Assigned(AForm)) then AForm := TForm.Create(nil); // Assign form to owner handle AForm.ParentWindow := AOwner; AForm.Left := 0; AForm.Top := 0; AForm.BorderStyle := bsNone; AForm.Show; // Create supporting classes, and load ui AClass := TClass.Create; AClass.PluginID := APluginID; AClass.Load; // Return the new form handle Result:= AForm.Handle;
