win32: application should call OleInitialize to use some windows features like Clipboard, Drag and Drop, etc. Do this for LCL applications (maybe related to issue #0010409).

git-svn-id: trunk@18807 -
This commit is contained in:
paul 2009-02-23 10:25:47 +00:00
parent d37ad93cb0
commit cdcb46fcd0
2 changed files with 3 additions and 1 deletions

View File

@ -34,7 +34,7 @@ interface
successful compilation. successful compilation.
} }
uses uses
Windows, Classes, Translations, ComCtrls, Controls, Buttons, Dialogs, Windows, ActiveX, Classes, Translations, ComCtrls, Controls, Buttons, Dialogs,
DynHashArray, ExtCtrls, Forms, GraphMath, GraphType, InterfaceBase, LCLIntf, DynHashArray, ExtCtrls, Forms, GraphMath, GraphType, InterfaceBase, LCLIntf,
LCLType, LMessages, StdCtrls, SysUtils, Win32Def, Graphics, Menus, CommCtrl, LCLType, LMessages, StdCtrls, SysUtils, Win32Def, Graphics, Menus, CommCtrl,
Themes, Win32Debug, Maps; Themes, Win32Debug, Maps;

View File

@ -108,6 +108,7 @@ begin
Exit; Exit;
end; end;
OleInitialize(nil);
//TODO: Remove when the WS interface is implemented //TODO: Remove when the WS interface is implemented
// Common controls only need to be initialized when used // Common controls only need to be initialized when used
// So they are initialized in the CreateHandle for common controls // So they are initialized in the CreateHandle for common controls
@ -417,6 +418,7 @@ end;
procedure TWin32WidgetSet.AppTerminate; procedure TWin32WidgetSet.AppTerminate;
begin begin
Assert(False, 'Trace:TWin32WidgetSet.AppTerminate - Start'); Assert(False, 'Trace:TWin32WidgetSet.AppTerminate - Start');
OleUninitialize;
end; end;
procedure TWin32WidgetSet.AppSetIcon(const Small, Big: HICON); procedure TWin32WidgetSet.AppSetIcon(const Small, Big: HICON);