DirectSkin access violation
Hi,
I am testing your DirectSkin activeX (wbocx.ocx) with Delphi 2010 but I have an access violation when I close the program.
The skin is loaded and applied to the window properly but after closing the main frame the error message "access violation " appears.
Any idea?
The code is very simple :
unit Demo;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, WBOCXLib_TLB, OleCtrls;
type
TMainForm = class(TForm)
MainMenu1: TMainMenu;
File1: TMenuItem;
Exit1: TMenuItem;
Skin1: TMenuItem;
MacPC1: TMenuItem;
SigmaShadows1: TMenuItem;
MerlinEni1: TMenuItem;
Wbocx1: TWbocx;
procedure FormCreate(Sender: TObject);
procedure Exit1Click(Sender: TObject);
const SkinsFolder = 'C:\Program Files\Stardock\DirectSkin\samples\skins';
DogmaSkinFile = 'dogmax\dogmax.uis';
private
DirectSkinLoaded : Boolean;
public
{ Déclarations publiques }
end;
var
MainForm: TMainForm;
implementation
{$R *.dfm}
procedure TMainForm.FormCreate(Sender: TObject);
var
loadSkinError : Smallint;
begin
{ Change to the skin sample directory }
Wbocx1.SetRootPathStr (SkinsFolder);
{ Set the skin }
loadSkinError := Wbocx1.LoadUIS (DogmaSkinFile);
if loadSkinError = 0 then
begin
{ Init the ocx - allocates memory, loads skin etc }
DirectSkinLoaded := Wbocx1.InitWB ();
{ Apply the skin }
Wbocx1.DoWindow (0);
end;
end;
procedure TMainForm.Exit1Click(Sender: TObject);
begin
Application.Terminate;
end;
end.
Thank you in advance!