| |
|
|
| CompileMarkSeparationSource wurde am 15.07.2007 aus der MMJ-Quellcodesammlung (Dietmar Horn) in die Babyklappe auf XProfan.Com abgelegt:
RTF: Text fett, kursiv, unterstrichen
WindowTitle Bitte Text mit der Maus markieren ...
window 50,50-500,400
settruecolor 1
usermessages 16---WM_CLOSE > Schliessen abfangen
usefont ms sans serif,15,7,0,0,0
setdialogfont 1
declare rtf#,Edit&,dll&,Test1%,Test2%,Test3%
dim rtf#,60
dll&=usedll(riched32.dll)
Edit&=control(RichEdit,,$54315004,180,10,300,200,%hwnd,100,%hinstance,$200)
settext Edit&,Test: LaberLaberLaber
sendmessage(Edit&,1087,0,1)----------EM_HIDESELECTION => none
Test1%=create(button,%hwnd,Fett,10,10,80,22)
Test2%=create(button,%hwnd,Kursiv,10,40,80,22)
Test3%=create(button,%hwnd,Unterstrichen,10,70,80,22)
proc rtf-SetFormat-----------------------------------------------------------------SetFormat
declare a%
parameters d%
long rtf#,0=60
long rtf#,4=31
sendmessage(Edit&,$043A,1,rtf#)-EM_GETCHARFORMAT
a%=byte(rtf#,8)
if testbit(a%,d%)
byte rtf#,8=setbit(a%,d%,0)
long rtf#,4=setbit(a%,d%,1)
else
byte rtf#,8=setbit(a%,d%,1)
long rtf#,4=setbit(a%,d%,1)
endif
sendmessage(Edit&,1092,1,rtf#)-EM_SETCHARFORMAT
setfocus(Edit&)
endproc------------------------------------------------------------------------------------
while 1
waitinput
case %umessage:break
if getfocus(Test1%)
rtf-SetFormat 0
elseif getfocus(Test2%)
rtf-SetFormat 1
elseif getfocus(Test3%)
rtf-SetFormat 2
endif
endwhile
destroywindow(Edit&)
case dll&:freedll dll&
../../Function-References/XProfan/dispose/'>dispose rtf#
|
|
|
| |
|
|