You've already forked lazarus-ccr
fixing win32 getattributes method, updating test sample
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@844 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
<MainUnit Value="0"/>
|
||||
<TargetFileExt Value=""/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<ActiveEditorIndexAtStart Value="1"/>
|
||||
<ActiveEditorIndexAtStart Value="4"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
@ -39,7 +39,7 @@
|
||||
<UnitName Value="project1"/>
|
||||
<CursorPos X="32" Y="12"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="49"/>
|
||||
<UsageCount Value="50"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
@ -47,10 +47,10 @@
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
<CursorPos X="10" Y="10"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="26" Y="52"/>
|
||||
<TopLine Value="41"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="49"/>
|
||||
<UsageCount Value="50"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
@ -135,7 +135,7 @@
|
||||
<UnitName Value="CarbonGDIObjects"/>
|
||||
<CursorPos X="3" Y="1109"/>
|
||||
<TopLine Value="1100"/>
|
||||
<UsageCount Value="24"/>
|
||||
<UsageCount Value="25"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="25" Y="150" ID="1"/>
|
||||
</Bookmarks>
|
||||
@ -190,7 +190,7 @@
|
||||
<UnitName Value="CarbonPrivate"/>
|
||||
<CursorPos X="17" Y="649"/>
|
||||
<TopLine Value="640"/>
|
||||
<UsageCount Value="23"/>
|
||||
<UsageCount Value="24"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit20>
|
||||
<Unit21>
|
||||
@ -236,19 +236,19 @@
|
||||
<Unit27>
|
||||
<Filename Value="../../richmemo.pas"/>
|
||||
<UnitName Value="RichMemo"/>
|
||||
<CursorPos X="3" Y="9"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="18" Y="181"/>
|
||||
<TopLine Value="178"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<UsageCount Value="20"/>
|
||||
<UsageCount Value="21"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit27>
|
||||
<Unit28>
|
||||
<Filename Value="../../wsrichmemo.pas"/>
|
||||
<UnitName Value="WSRichMemo"/>
|
||||
<CursorPos X="139" Y="28"/>
|
||||
<TopLine Value="11"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<UsageCount Value="20"/>
|
||||
<UsageCount Value="21"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit28>
|
||||
<Unit29>
|
||||
@ -292,7 +292,7 @@
|
||||
<UnitName Value="CarbonPaste"/>
|
||||
<CursorPos X="43" Y="9"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="33"/>
|
||||
<UsageCount Value="34"/>
|
||||
</Unit34>
|
||||
<Unit35>
|
||||
<Filename Value="../../../fpc/rtl/objpas/sysutils/sysutilh.inc"/>
|
||||
@ -317,10 +317,10 @@
|
||||
<Unit38>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<UnitName Value="Win32RichMemo"/>
|
||||
<CursorPos X="79" Y="177"/>
|
||||
<TopLine Value="168"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit38>
|
||||
<Unit39>
|
||||
@ -329,70 +329,73 @@
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<UsageCount Value="10"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="1" Y="99" ID="2"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
</Unit39>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<JumpHistory Count="29" HistoryIndex="28">
|
||||
<Position1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="104" Column="1" TopLine="91"/>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="98" Column="21" TopLine="88"/>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="96" Column="33" TopLine="81"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="14" Column="1" TopLine="25"/>
|
||||
<Caret Line="141" Column="53" TopLine="137"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="25" Column="11" TopLine="11"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="107" Column="15" TopLine="106"/>
|
||||
<Caret Line="26" Column="40" TopLine="1"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="27" Column="53" TopLine="14"/>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="158" Column="38" TopLine="142"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="87" Column="47" TopLine="84"/>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="18" Column="15" TopLine="1"/>
|
||||
<Caret Line="163" Column="36" TopLine="143"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="30" Column="25" TopLine="18"/>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="158" Column="38" TopLine="141"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="121" Column="62" TopLine="120"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="53" Column="20" TopLine="38"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
<Caret Line="150" Column="42" TopLine="142"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="28" Column="33" TopLine="16"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="53" Column="19" TopLine="38"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="30" Column="35" TopLine="16"/>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="148" Column="24" TopLine="130"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="121" Column="60" TopLine="109"/>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="141" Column="19" TopLine="129"/>
|
||||
<Caret Line="100" Column="36" TopLine="90"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
@ -400,60 +403,56 @@
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="25" Column="29" TopLine="13"/>
|
||||
<Caret Line="48" Column="18" TopLine="33"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="26" Column="88" TopLine="13"/>
|
||||
<Caret Line="100" Column="48" TopLine="85"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="96" Column="84" TopLine="84"/>
|
||||
<Caret Line="119" Column="47" TopLine="104"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="107" Column="25" TopLine="95"/>
|
||||
<Caret Line="133" Column="47" TopLine="104"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="141" Column="1" TopLine="129"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="143" Column="81" TopLine="131"/>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="48" Column="18" TopLine="33"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="32" Column="20" TopLine="20"/>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="122" Column="1" TopLine="117"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="121" Column="60" TopLine="109"/>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="143" Column="1" TopLine="131"/>
|
||||
<Filename Value="../../win32/win32richmemoproc.pas"/>
|
||||
<Caret Line="156" Column="1" TopLine="148"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
<Caret Line="159" Column="19" TopLine="144"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="24" Column="38" TopLine="17"/>
|
||||
<Filename Value="../../wsrichmemo.pas"/>
|
||||
<Caret Line="29" Column="20" TopLine="14"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="175" Column="30" TopLine="145"/>
|
||||
<Filename Value="../../richmemo.pas"/>
|
||||
<Caret Line="197" Column="22" TopLine="184"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="124" Column="61" TopLine="115"/>
|
||||
<Filename Value="../../richmemo.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="../../win32/win32richmemo.pas"/>
|
||||
<Caret Line="139" Column="61" TopLine="123"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
@ -1,228 +1,108 @@
|
||||
object Form1: TForm1
|
||||
Left = 344
|
||||
Height = 596
|
||||
Top = 51
|
||||
Width = 751
|
||||
Align = alNone
|
||||
AllowDropFiles = False
|
||||
AutoScroll = True
|
||||
AutoSize = False
|
||||
BorderIcons = [biSystemMenu, biMinimize, biMaximize]
|
||||
BorderStyle = bsSizeable
|
||||
BorderWidth = 0
|
||||
Left = 196
|
||||
Height = 457
|
||||
Top = 181
|
||||
Width = 634
|
||||
ActiveControl = RichMemo1
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 596
|
||||
ClientWidth = 751
|
||||
DefaultMonitor = dmActiveForm
|
||||
DockSite = False
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
FormStyle = fsNormal
|
||||
ClientHeight = 457
|
||||
ClientWidth = 634
|
||||
OnCreate = FormCreate
|
||||
ParentBiDiMode = True
|
||||
ParentFont = False
|
||||
Position = poDesigned
|
||||
ShowInTaskBar = stDefault
|
||||
UseDockManager = False
|
||||
LCLVersion = '0.9.27'
|
||||
WindowState = wsNormal
|
||||
object RichMemo1: TRichMemo
|
||||
Left = 24
|
||||
Height = 432
|
||||
Top = 24
|
||||
Width = 704
|
||||
Align = alNone
|
||||
Alignment = taLeftJustify
|
||||
Left = 8
|
||||
Height = 366
|
||||
Top = 8
|
||||
Width = 619
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
BorderStyle = bsSingle
|
||||
Color = clWindow
|
||||
DragCursor = crDrag
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
Font.Height = -13
|
||||
Font.Name = 'Tahoma'
|
||||
HideSelection = False
|
||||
Lines.Strings = (
|
||||
'RichMemo1'
|
||||
)
|
||||
MaxLength = 0
|
||||
ParentBidiMode = True
|
||||
ParentColor = False
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
ReadOnly = False
|
||||
ParentFont = False
|
||||
ScrollBars = ssBoth
|
||||
TabOrder = 0
|
||||
TabStop = True
|
||||
Visible = True
|
||||
WantReturns = True
|
||||
WantTabs = False
|
||||
WordWrap = False
|
||||
end
|
||||
object Button1: TButton
|
||||
Left = 24
|
||||
Height = 25
|
||||
Top = 472
|
||||
Top = 382
|
||||
Width = 160
|
||||
Align = alNone
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoSize = False
|
||||
Cancel = False
|
||||
Caption = 'Make Bold and Red'
|
||||
Color = clBtnFace
|
||||
Default = False
|
||||
DragCursor = crDrag
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
ParentBidiMode = True
|
||||
ModalResult = 0
|
||||
OnClick = Button1Click
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
TabOrder = 1
|
||||
TabStop = True
|
||||
Visible = True
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 192
|
||||
Height = 25
|
||||
Top = 472
|
||||
Top = 382
|
||||
Width = 97
|
||||
Align = alNone
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoSize = False
|
||||
Cancel = False
|
||||
Caption = 'Get Attribs'
|
||||
Color = clBtnFace
|
||||
Default = False
|
||||
DragCursor = crDrag
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
ParentBidiMode = True
|
||||
ModalResult = 0
|
||||
OnClick = Button2Click
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
TabOrder = 2
|
||||
TabStop = True
|
||||
Visible = True
|
||||
end
|
||||
object Button3: TButton
|
||||
Left = 304
|
||||
Height = 25
|
||||
Top = 472
|
||||
Top = 382
|
||||
Width = 96
|
||||
Align = alNone
|
||||
Anchors = [akLeft, akBottom]
|
||||
AutoSize = False
|
||||
Cancel = False
|
||||
Caption = 'Select Font'
|
||||
Color = clBtnFace
|
||||
Default = False
|
||||
DragCursor = crDrag
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
ParentBidiMode = True
|
||||
ModalResult = 0
|
||||
OnClick = Button3Click
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
TabOrder = 3
|
||||
TabStop = True
|
||||
Visible = True
|
||||
end
|
||||
object Button4: TButton
|
||||
Left = 112
|
||||
Left = 528
|
||||
Height = 25
|
||||
Top = 552
|
||||
Top = 382
|
||||
Width = 75
|
||||
Align = alNone
|
||||
AutoSize = False
|
||||
Cancel = False
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = 'Export'
|
||||
Color = clBtnFace
|
||||
Default = False
|
||||
DragCursor = crDrag
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
ParentBidiMode = True
|
||||
ModalResult = 0
|
||||
OnClick = Button4Click
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
TabOrder = 4
|
||||
TabStop = True
|
||||
Visible = True
|
||||
end
|
||||
object Button5: TButton
|
||||
Left = 24
|
||||
Left = 440
|
||||
Height = 25
|
||||
Top = 552
|
||||
Top = 382
|
||||
Width = 75
|
||||
Align = alNone
|
||||
AutoSize = False
|
||||
Cancel = False
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = 'Import'
|
||||
Color = clBtnFace
|
||||
Default = False
|
||||
DragCursor = crDrag
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
ParentBidiMode = True
|
||||
ModalResult = 0
|
||||
OnClick = Button5Click
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
TabOrder = 5
|
||||
TabStop = True
|
||||
Visible = True
|
||||
end
|
||||
object Button6: TButton
|
||||
Left = 24
|
||||
Height = 25
|
||||
Top = 504
|
||||
Top = 415
|
||||
Width = 160
|
||||
Align = alNone
|
||||
AutoSize = False
|
||||
Cancel = False
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = 'Next Style Range'
|
||||
Color = clBtnFace
|
||||
Default = False
|
||||
DragCursor = crDrag
|
||||
DragKind = dkDrag
|
||||
DragMode = dmManual
|
||||
Enabled = True
|
||||
ParentBidiMode = True
|
||||
ModalResult = 0
|
||||
OnClick = Button6Click
|
||||
ParentFont = True
|
||||
ParentShowHint = True
|
||||
TabOrder = 6
|
||||
TabStop = True
|
||||
Visible = True
|
||||
end
|
||||
object FontDialog1: TFontDialog
|
||||
MinFontSize = 0
|
||||
MaxFontSize = 0
|
||||
left = 696
|
||||
top = 472
|
||||
left = 352
|
||||
top = 552
|
||||
end
|
||||
object SaveDialog1: TSaveDialog
|
||||
DefaultExt = '.rtf'
|
||||
Filter = 'RichText file (*.rtf)|*.rtf'
|
||||
Options = [ofOverwritePrompt, ofEnableSizing, ofViewDetail]
|
||||
left = 616
|
||||
top = 472
|
||||
left = 280
|
||||
top = 552
|
||||
end
|
||||
object OpenDialog1: TOpenDialog
|
||||
DefaultExt = '.rtf'
|
||||
Filter = 'RichText file (*.rtf)|*.rtf'
|
||||
left = 536
|
||||
top = 472
|
||||
left = 208
|
||||
top = 552
|
||||
end
|
||||
end
|
||||
|
@ -1,64 +1,34 @@
|
||||
{ This is an automatically generated lazarus resource file }
|
||||
|
||||
LazarusResources.Add('TForm1','FORMDATA',[
|
||||
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'X'#1#6'Height'#3'T'#2#3'Top'#2'3'#5'Width'
|
||||
+#3#239#2#5'Align'#7#6'alNone'#14'AllowDropFiles'#8#10'AutoScroll'#9#8'AutoSi'
|
||||
+'ze'#8#11'BorderIcons'#11#12'biSystemMenu'#10'biMinimize'#10'biMaximize'#0#11
|
||||
+'BorderStyle'#7#10'bsSizeable'#11'BorderWidth'#2#0#7'Caption'#6#5'Form1'#12
|
||||
+'ClientHeight'#3'T'#2#11'ClientWidth'#3#239#2#14'DefaultMonitor'#7#12'dmActi'
|
||||
+'veForm'#8'DockSite'#8#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'E'
|
||||
+'nabled'#9#9'FormStyle'#7#8'fsNormal'#8'OnCreate'#7#10'FormCreate'#14'Parent'
|
||||
+'BiDiMode'#9#10'ParentFont'#8#8'Position'#7#10'poDesigned'#13'ShowInTaskBar'
|
||||
+#7#9'stDefault'#14'UseDockManager'#8#10'LCLVersion'#6#6'0.9.27'#11'WindowSta'
|
||||
+'te'#7#8'wsNormal'#0#9'TRichMemo'#9'RichMemo1'#4'Left'#2#24#6'Height'#3#176#1
|
||||
+#3'Top'#2#24#5'Width'#3#192#2#5'Align'#7#6'alNone'#9'Alignment'#7#13'taLeftJ'
|
||||
+'ustify'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#11'Border'
|
||||
+'Style'#7#8'bsSingle'#5'Color'#7#8'clWindow'#10'DragCursor'#7#6'crDrag'#8'Dr'
|
||||
+'agKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#13'HideSelection'
|
||||
+#8#13'Lines.Strings'#1#6#9'RichMemo1'#0#9'MaxLength'#2#0#14'ParentBidiMode'#9
|
||||
+#11'ParentColor'#8#10'ParentFont'#9#14'ParentShowHint'#9#8'ReadOnly'#8#10'Sc'
|
||||
+'rollBars'#7#6'ssBoth'#8'TabOrder'#2#0#7'TabStop'#9#7'Visible'#9#11'WantRetu'
|
||||
+'rns'#9#8'WantTabs'#8#8'WordWrap'#8#0#0#7'TButton'#7'Button1'#4'Left'#2#24#6
|
||||
+'Height'#2#25#3'Top'#3#216#1#5'Width'#3#160#0#5'Align'#7#6'alNone'#7'Anchors'
|
||||
+#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#8#6'Cancel'#8#7'Caption'#6#17'Make B'
|
||||
+'old and Red'#5'Color'#7#9'clBtnFace'#7'Default'#8#10'DragCursor'#7#6'crDrag'
|
||||
+#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#14'ParentBid'
|
||||
+'iMode'#9#11'ModalResult'#2#0#7'OnClick'#7#12'Button1Click'#10'ParentFont'#9
|
||||
+#14'ParentShowHint'#9#8'TabOrder'#2#1#7'TabStop'#9#7'Visible'#9#0#0#7'TButto'
|
||||
+'n'#7'Button2'#4'Left'#3#192#0#6'Height'#2#25#3'Top'#3#216#1#5'Width'#2'a'#5
|
||||
+'Align'#7#6'alNone'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#8'AutoSize'#8#6'Ca'
|
||||
+'ncel'#8#7'Caption'#6#11'Get Attribs'#5'Color'#7#9'clBtnFace'#7'Default'#8#10
|
||||
+'DragCursor'#7#6'crDrag'#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7
|
||||
+'Enabled'#9#14'ParentBidiMode'#9#11'ModalResult'#2#0#7'OnClick'#7#12'Button2'
|
||||
+'Click'#10'ParentFont'#9#14'ParentShowHint'#9#8'TabOrder'#2#2#7'TabStop'#9#7
|
||||
+'Visible'#9#0#0#7'TButton'#7'Button3'#4'Left'#3'0'#1#6'Height'#2#25#3'Top'#3
|
||||
+#216#1#5'Width'#2'`'#5'Align'#7#6'alNone'#7'Anchors'#11#6'akLeft'#8'akBottom'
|
||||
+#0#8'AutoSize'#8#6'Cancel'#8#7'Caption'#6#11'Select Font'#5'Color'#7#9'clBtn'
|
||||
+'Face'#7'Default'#8#10'DragCursor'#7#6'crDrag'#8'DragKind'#7#6'dkDrag'#8'Dra'
|
||||
+'gMode'#7#8'dmManual'#7'Enabled'#9#14'ParentBidiMode'#9#11'ModalResult'#2#0#7
|
||||
+'OnClick'#7#12'Button3Click'#10'ParentFont'#9#14'ParentShowHint'#9#8'TabOrde'
|
||||
+'r'#2#3#7'TabStop'#9#7'Visible'#9#0#0#7'TButton'#7'Button4'#4'Left'#2'p'#6'H'
|
||||
+'eight'#2#25#3'Top'#3'('#2#5'Width'#2'K'#5'Align'#7#6'alNone'#8'AutoSize'#8#6
|
||||
+'Cancel'#8#7'Caption'#6#6'Export'#5'Color'#7#9'clBtnFace'#7'Default'#8#10'Dr'
|
||||
+'agCursor'#7#6'crDrag'#8'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'E'
|
||||
+'nabled'#9#14'ParentBidiMode'#9#11'ModalResult'#2#0#7'OnClick'#7#12'Button4C'
|
||||
+'lick'#10'ParentFont'#9#14'ParentShowHint'#9#8'TabOrder'#2#4#7'TabStop'#9#7
|
||||
+'Visible'#9#0#0#7'TButton'#7'Button5'#4'Left'#2#24#6'Height'#2#25#3'Top'#3'('
|
||||
+#2#5'Width'#2'K'#5'Align'#7#6'alNone'#8'AutoSize'#8#6'Cancel'#8#7'Caption'#6
|
||||
+#6'Import'#5'Color'#7#9'clBtnFace'#7'Default'#8#10'DragCursor'#7#6'crDrag'#8
|
||||
+'DragKind'#7#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#14'ParentBidiM'
|
||||
+'ode'#9#11'ModalResult'#2#0#7'OnClick'#7#12'Button5Click'#10'ParentFont'#9#14
|
||||
+'ParentShowHint'#9#8'TabOrder'#2#5#7'TabStop'#9#7'Visible'#9#0#0#7'TButton'#7
|
||||
+'Button6'#4'Left'#2#24#6'Height'#2#25#3'Top'#3#248#1#5'Width'#3#160#0#5'Alig'
|
||||
+'n'#7#6'alNone'#8'AutoSize'#8#6'Cancel'#8#7'Caption'#6#16'Next Style Range'#5
|
||||
+'Color'#7#9'clBtnFace'#7'Default'#8#10'DragCursor'#7#6'crDrag'#8'DragKind'#7
|
||||
+#6'dkDrag'#8'DragMode'#7#8'dmManual'#7'Enabled'#9#14'ParentBidiMode'#9#11'Mo'
|
||||
+'dalResult'#2#0#7'OnClick'#7#12'Button6Click'#10'ParentFont'#9#14'ParentShow'
|
||||
+'Hint'#9#8'TabOrder'#2#6#7'TabStop'#9#7'Visible'#9#0#0#11'TFontDialog'#11'Fo'
|
||||
+'ntDialog1'#11'MinFontSize'#2#0#11'MaxFontSize'#2#0#4'left'#3#184#2#3'top'#3
|
||||
+#216#1#0#0#11'TSaveDialog'#11'SaveDialog1'#10'DefaultExt'#6#4'.rtf'#6'Filter'
|
||||
+#6#27'RichText file (*.rtf)|*.rtf'#7'Options'#11#17'ofOverwritePrompt'#14'of'
|
||||
+'EnableSizing'#12'ofViewDetail'#0#4'left'#3'h'#2#3'top'#3#216#1#0#0#11'TOpen'
|
||||
+'Dialog'#11'OpenDialog1'#10'DefaultExt'#6#4'.rtf'#6'Filter'#6#27'RichText fi'
|
||||
+'le (*.rtf)|*.rtf'#4'left'#3#24#2#3'top'#3#216#1#0#0#0
|
||||
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#196#0#6'Height'#3#201#1#3'Top'#3#181#0#5
|
||||
+'Width'#3'z'#2#13'ActiveControl'#7#9'RichMemo1'#7'Caption'#6#5'Form1'#12'Cli'
|
||||
+'entHeight'#3#201#1#11'ClientWidth'#3'z'#2#8'OnCreate'#7#10'FormCreate'#10'L'
|
||||
+'CLVersion'#6#6'0.9.27'#0#9'TRichMemo'#9'RichMemo1'#4'Left'#2#8#6'Height'#3
|
||||
+'n'#1#3'Top'#2#8#5'Width'#3'k'#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'
|
||||
+#8'akBottom'#0#11'Font.Height'#2#243#9'Font.Name'#6#6'Tahoma'#13'HideSelecti'
|
||||
+'on'#8#13'Lines.Strings'#1#6#9'RichMemo1'#0#10'ParentFont'#8#10'ScrollBars'#7
|
||||
+#6'ssBoth'#8'TabOrder'#2#0#8'WordWrap'#8#0#0#7'TButton'#7'Button1'#4'Left'#2
|
||||
+#24#6'Height'#2#25#3'Top'#3'~'#1#5'Width'#3#160#0#7'Anchors'#11#6'akLeft'#8
|
||||
+'akBottom'#0#7'Caption'#6#17'Make Bold and Red'#7'OnClick'#7#12'Button1Click'
|
||||
+#8'TabOrder'#2#1#0#0#7'TButton'#7'Button2'#4'Left'#3#192#0#6'Height'#2#25#3
|
||||
+'Top'#3'~'#1#5'Width'#2'a'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6
|
||||
+#11'Get Attribs'#7'OnClick'#7#12'Button2Click'#8'TabOrder'#2#2#0#0#7'TButton'
|
||||
+#7'Button3'#4'Left'#3'0'#1#6'Height'#2#25#3'Top'#3'~'#1#5'Width'#2'`'#7'Anch'
|
||||
+'ors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#11'Select Font'#7'OnClick'#7#12
|
||||
+'Button3Click'#8'TabOrder'#2#3#0#0#7'TButton'#7'Button4'#4'Left'#3#16#2#6'He'
|
||||
+'ight'#2#25#3'Top'#3'~'#1#5'Width'#2'K'#7'Anchors'#11#6'akLeft'#8'akBottom'#0
|
||||
+#7'Caption'#6#6'Export'#7'OnClick'#7#12'Button4Click'#8'TabOrder'#2#4#0#0#7
|
||||
+'TButton'#7'Button5'#4'Left'#3#184#1#6'Height'#2#25#3'Top'#3'~'#1#5'Width'#2
|
||||
+'K'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#6'Import'#7'OnClick'#7
|
||||
+#12'Button5Click'#8'TabOrder'#2#5#0#0#7'TButton'#7'Button6'#4'Left'#2#24#6'H'
|
||||
+'eight'#2#25#3'Top'#3#159#1#5'Width'#3#160#0#7'Anchors'#11#6'akLeft'#8'akBot'
|
||||
+'tom'#0#7'Caption'#6#16'Next Style Range'#7'OnClick'#7#12'Button6Click'#8'Ta'
|
||||
+'bOrder'#2#6#0#0#11'TFontDialog'#11'FontDialog1'#11'MinFontSize'#2#0#11'MaxF'
|
||||
+'ontSize'#2#0#4'left'#3'`'#1#3'top'#3'('#2#0#0#11'TSaveDialog'#11'SaveDialog'
|
||||
+'1'#10'DefaultExt'#6#4'.rtf'#6'Filter'#6#27'RichText file (*.rtf)|*.rtf'#7'O'
|
||||
+'ptions'#11#17'ofOverwritePrompt'#14'ofEnableSizing'#12'ofViewDetail'#0#4'le'
|
||||
+'ft'#3#24#1#3'top'#3'('#2#0#0#11'TOpenDialog'#11'OpenDialog1'#10'DefaultExt'
|
||||
+#6#4'.rtf'#6'Filter'#6#27'RichText file (*.rtf)|*.rtf'#4'left'#3#208#0#3'top'
|
||||
+#3'('#2#0#0#0
|
||||
]);
|
||||
|
@ -45,10 +45,14 @@ implementation
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
var
|
||||
fp : TFontParams;
|
||||
begin
|
||||
Caption := Format('sel start %d, sel length %d', [RichMemo1.SelStart, RichMemo1.SelLength]);
|
||||
RichMemo1.SetTextAttributes(
|
||||
RichMemo1.SelStart, RichMemo1.SelLength, GetFontParams(clRed, [fsBold]) );
|
||||
RichMemo1.GetTextAttributes(RichMemo1.SelStart, fp);
|
||||
fp.Color := clRed;
|
||||
fp.Style := [fsBold];
|
||||
RichMemo1.SetTextAttributes(RichMemo1.SelStart, RichMemo1.SelLength, fp);
|
||||
end;
|
||||
|
||||
procedure TForm1.Button2Click(Sender: TObject);
|
||||
|
@ -25,7 +25,7 @@ type
|
||||
published
|
||||
class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): HWND; override;
|
||||
class function GetTextAttributes(const AWinControl: TWinControl; TextStart: Integer;
|
||||
var Params: TIntFontParams): Boolean; virtual;
|
||||
var Params: TIntFontParams): Boolean; override;
|
||||
class procedure SetTextAttributes(const AWinControl: TWinControl; TextStart, TextLen: Integer;
|
||||
const Params: TIntFontParams); override;
|
||||
class procedure SetHideSelection(const AWinControl: TWinControl; AHideSelection: Boolean); override;
|
||||
@ -147,7 +147,10 @@ var
|
||||
OrigLen : Integer;
|
||||
NeedLock : Boolean;
|
||||
begin
|
||||
if not Assigned(RichEditManager) or not Assigned(AWinControl) then Exit;
|
||||
if not Assigned(RichEditManager) or not Assigned(AWinControl) then begin
|
||||
Result := false;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
RichEditManager.GetSelection(AWinControl.Handle, OrigStart, OrigLen);
|
||||
|
||||
|
@ -96,7 +96,7 @@ end;
|
||||
procedure CharFormatToFontParams(const fmt: TCHARFORMAT; var Params: TIntFontParams);
|
||||
begin
|
||||
Params.Name := fmt.szFaceName;
|
||||
Params.Size := fmt.cbSize;
|
||||
Params.Size := Round(fmt.yHeight/TwipsInFontSize);
|
||||
Params.Color := fmt.crTextColor;
|
||||
Params.Style := EffectsToFontStyles(fmt.dwEffects);
|
||||
end;
|
||||
@ -154,8 +154,7 @@ begin
|
||||
fmt.cbSize := sizeof(fmt);
|
||||
fmt.dwMask := CFM_COLOR or CFM_FACE or CFM_SIZE or CFM_EFFECTS;
|
||||
|
||||
mask := SendMessage(RichEditWnd, EM_GETCHARFORMAT, w, PtrInt(@fmt));
|
||||
if mask = 0 then Exit;
|
||||
SendMessage(RichEditWnd, EM_GETCHARFORMAT, w, PtrInt(@fmt));
|
||||
|
||||
CharFormatToFontParams(fmt, Params);
|
||||
Result := true;
|
||||
|
Reference in New Issue
Block a user