1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
|
#module "fontdialog"
#deffunc getfont var _fontname , array _font_info
#uselib "comdlg32"
#func ChooseFontA "ChooseFontA" sptr
#define CF_EFFECTS $00000100 #define CF_SCREENFONTS $00000001
dim logfont,15
dim chfont,15 chfont.0 = 60 chfont.1 = hwnd chfont.2 = 0 chfont.3 = varptr(logfont) chfont.4 = 0 chfont.5 = CF_SCREENFONTS | CF_EFFECTS chfont.6 = 0 chfont.7 = 0 chfont.8 = 0 chfont.9 = 0 chfont.10 = 0 chfont.11 = 0 chfont.12 = 0 chfont.13 = 0 chfont.14 = 0
ChooseFontA varptr(chfont)
if stat=0 : return
sdim _fontname_,33
memcpy _fontname_,logfont.7,32
_fontname = _fontname_ _font_info.0 = chfont.4/10 _font_info.1 = font_normal _font_info.2 = chfont.6
if logfont.4>400 : _font_info.1 += font_bold if peek(logfont.5,0)=1 : _font_info.1 += font_italic if peek(logfont.5,1)=1 : _font_info.1 += font_underline if peek(logfont.5,2)=1 : _font_info.1 += font_strikeout
return
#global
dim font_info,3
getfont fontname,font_info
if stat=0 : stop
font fontname , font_info.0 , font_info.1
r=peek(font_info.2 , 0)
g=peek(font_info.2 , 1)
b=peek(font_info.2 , 2)
color r,g,b
mes "文字色 : "+r+","+g+","+b
mes "フォント名: "+fontname
mes "Font Size : "+font_info.0
mes "太 さ : "+(font_info.1 & 1)
mes "斜 線 : "+(font_info.1 & 2)
mes "下 線 : "+(font_info.1 & 4)
mes "取消線 : "+(font_info.1 & 8)
stop
|