* Fix compilation and clean up OLE Demo

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@615 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2008-12-07 14:18:52 +00:00
parent fb4ab1f20c
commit f96225429b
3 changed files with 16 additions and 22 deletions

View File

@ -3,8 +3,6 @@ object MainForm: TMainForm
Height = 575 Height = 575
Top = 261 Top = 261
Width = 790 Width = 790
HorzScrollBar.Page = 789
VertScrollBar.Page = 574
ActiveControl = Button1 ActiveControl = Button1
Caption = 'Demo for drag''n drop and clipboard transfers' Caption = 'Demo for drag''n drop and clipboard transfers'
ClientHeight = 575 ClientHeight = 575
@ -13,6 +11,7 @@ object MainForm: TMainForm
Font.Height = -12 Font.Height = -12
Font.Name = 'Arial' Font.Name = 'Arial'
OnCreate = FormCreate OnCreate = FormCreate
LCLVersion = '0.9.27'
Visible = True Visible = True
object Label1: TLabel object Label1: TLabel
Left = 10 Left = 10
@ -24,6 +23,7 @@ object MainForm: TMainForm
Font.Height = -11 Font.Height = -11
Font.Name = 'Arial' Font.Name = 'Arial'
ParentColor = False ParentColor = False
ParentFont = False
end end
object Label2: TLabel object Label2: TLabel
Left = 360 Left = 360
@ -36,6 +36,7 @@ object MainForm: TMainForm
Font.Height = -11 Font.Height = -11
Font.Name = 'Arial' Font.Name = 'Arial'
ParentColor = False ParentColor = False
ParentFont = False
WordWrap = True WordWrap = True
end end
object Panel3: TPanel object Panel3: TPanel
@ -59,6 +60,7 @@ object MainForm: TMainForm
Font.Name = 'Arial' Font.Name = 'Arial'
Font.Style = [fsBold] Font.Style = [fsBold]
ParentColor = False ParentColor = False
ParentFont = False
WordWrap = True WordWrap = True
end end
end end
@ -90,6 +92,7 @@ object MainForm: TMainForm
Height = 180 Height = 180
Top = 116 Top = 116
Width = 330 Width = 330
BorderStyle = bsSingle
ClipboardFormats.Strings = ( ClipboardFormats.Strings = (
'Plain text' 'Plain text'
'Unicode text' 'Unicode text'
@ -110,6 +113,7 @@ object MainForm: TMainForm
Header.MainColumn = -1 Header.MainColumn = -1
Header.Options = [hoColumnResize, hoDrag] Header.Options = [hoColumnResize, hoDrag]
HintMode = hmTooltip HintMode = hmTooltip
ParentFont = False
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 3 TabOrder = 3
@ -131,6 +135,7 @@ object MainForm: TMainForm
Height = 180 Height = 180
Top = 116 Top = 116
Width = 330 Width = 330
BorderStyle = bsSingle
ClipboardFormats.Strings = ( ClipboardFormats.Strings = (
'CSV' 'CSV'
'HTML Format' 'HTML Format'
@ -154,6 +159,7 @@ object MainForm: TMainForm
Header.Options = [hoColumnResize, hoDrag] Header.Options = [hoColumnResize, hoDrag]
HintMode = hmTooltip HintMode = hmTooltip
Images = TreeImages Images = TreeImages
ParentFont = False
ParentShowHint = False ParentShowHint = False
ShowHint = True ShowHint = True
TabOrder = 4 TabOrder = 4
@ -268,7 +274,7 @@ object MainForm: TMainForm
end end
object TabSheet1: TTabSheet object TabSheet1: TTabSheet
Caption = 'Tips' Caption = 'Tips'
ClientHeight = 219 ClientHeight = 217
ClientWidth = 677 ClientWidth = 677
ImageIndex = 2 ImageIndex = 2
object Label8: TLabel object Label8: TLabel

View File

@ -167,7 +167,8 @@ begin
if Succeeded(DataObject.EnumFormatEtc(DATADIR_GET, EnumFormat)) then if Succeeded(DataObject.EnumFormatEtc(DATADIR_GET, EnumFormat)) then
begin begin
EnumFormat.Reset; EnumFormat.Reset;
while EnumFormat.Next(1, Format, Fetched) = S_OK do SetLength(Formats, 0);
while EnumFormat.Next(1, Format, @Fetched) = S_OK do
begin begin
SetLength(Formats, Length(Formats) + 1); SetLength(Formats, Length(Formats) + 1);
Formats[High(Formats)] := Format.cfFormat; Formats[High(Formats)] := Format.cfFormat;
@ -204,8 +205,10 @@ end;
procedure TMainForm.FormCreate(Sender: TObject); procedure TMainForm.FormCreate(Sender: TObject);
{
var var
Stream: TResourceStream; Stream: TResourceStream;
}
begin begin
Logger.Channels.Add(TIPCChannel.Create); Logger.Channels.Add(TIPCChannel.Create);

View File

@ -9,7 +9,6 @@
</Flags> </Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=".exe"/> <TargetFileExt Value=".exe"/>
</General> </General>
<VersionInfo> <VersionInfo>
@ -34,7 +33,7 @@
<PackageName Value="virtualtreeview_package"/> <PackageName Value="virtualtreeview_package"/>
</Item2> </Item2>
</RequiredPackages> </RequiredPackages>
<Units Count="5"> <Units Count="2">
<Unit0> <Unit0>
<Filename Value="ole.lpr"/> <Filename Value="ole.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
@ -45,29 +44,15 @@
<ComponentName Value="MainForm"/> <ComponentName Value="MainForm"/>
<HasResources Value="True"/> <HasResources Value="True"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="Main.lrs"/> <ResourceFilename Value="Main.lrs"/>
<UnitName Value="Main"/> <UnitName Value="Main"/>
</Unit1> </Unit1>
<Unit2>
<Filename Value="..\..\include\intf\win32\dragmanager.inc"/>
<IsPartOfProject Value="True"/>
</Unit2>
<Unit3>
<Filename Value="..\..\include\intf\win32\olemethods.inc"/>
<IsPartOfProject Value="True"/>
</Unit3>
<Unit4>
<Filename Value="..\..\include\intf\win32\intf_uses.inc"/>
<IsPartOfProject Value="True"/>
</Unit4>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="8"/>
<PathDelim Value="\"/> <PathDelim Value="\"/>
<CodeGeneration>
<Generate Value="Faster"/>
</CodeGeneration>
<Linking> <Linking>
<Debugging> <Debugging>
<UseHeaptrc Value="True"/> <UseHeaptrc Value="True"/>