| |
|
|
|
Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) in The Babyklappe on XProfan.Com stored:
ChooseFont-Dialog create and inquire
Def @Choosefont(1) ! COMDLG32.DLL,ChooseFontA
Declare Choosefont#,Logfont#,Buf#,Buf&,Big%,Italic%,Underlined%
Declare Font&
Settruecolor 1
Windowstyle 31
Windowtitle ChooseFont-Dialog
Window 0,0-640,440
Dim Logfont#,60
Dim Choosefont#,60
Dim Buf#,32
Clear Buf#
String Buf#,0=standard
Clear Choosefont#
Long Choosefont#,0=60
Long Choosefont#,4=%Hwnd
Long Choosefont#,12=Logfont#
Long Choosefont#,20=$800 | $20000 | $400 | $80 | $100 | $40000 | $1 | $40 + $800000
Long Choosefont#,44=Buf#
Let Buf&=Buf#
Clear Logfont#
Long Logfont#,0=20
Long Logfont#,4=0
Long Logfont#,12=200
Long Logfont#,16=400
byte Logfont#,20=1
byte Logfont#,26=1
String Logfont#,28=Times New novel
@Choosefont(Choosefont#)
If @Instr(ITALIC,@Upper $(@String $(Buf#,0)))>0
Let Italic%=1
Endif
If @Instr(BIG,@Upper $(@String $(Buf#,0)))>0
Let Big%=1
Endif
If @byte(Logfont#,21)=1
Let Underlined%=1
Endif
If @byte(Logfont#,22)=1
@Messagebox(Durchstreichen wants I today not!,Info,64)
Endif
Addstring Font=+@String $(Logfont#,28)
Addstring Höhe=+@Str $(@Long(Logfont#,0))
Addstring wide=+@Str $(@Long(Logfont#,4))
Addstring Big=+@Str $(Big%)
Addstring Italic=+@Str $(Italic%)
Addstring Underlined=+@Str $(Underlined%)
Addstring colour=+@Str $(@Long(Choosefont#,24))
Usefont @String $(Logfont#,28),@Abs(@Long(Logfont#,0)),@Abs(@Long(Logfont#,4)),Big%,Italic%,Underlined%
Textcolor @Long(Choosefont#,24),@Rgb(255,255,255)
DrawText 0,0,Hello
@Listbox$(the watts chosen:,1)
Dispose Logfont#
Dispose Choosefont#
Dispose Buf#
While 0=0
Waitinput
Wend
|
|
|
| |
|
|