ll_libload user, "user32.dll"
ll_getproc GetWindowLong, "GetWindowLongA", user
ll_getproc GetSystemMetrics, "GetSystemMetrics", user
#module
#deffunc wingetstyle int
mref extflg, 0
mref stt, 64
mref bmscr, 67
prm = bmscr.13, -4 * (extflg ! 0) - 16
ll_callfunc prm, 2, GetWindowLong@
ll_ret i : stt = i
return
#deffunc gsm int
mref i, 0
mref stt, 64
ll_callfunc i, 1, GetSystemMetrics@
ll_ret i : stt = i
return
#global
#define getwakusize wingetstyle : gsm ((stat & 0x00040000) ! 0) * 0x0019 + 0x0007
#define getcaptionsize gsm 0x0004
screen 0, 400, 300, , 100, 50
title "サイズ不変ウィンドウ"
getwakusize : mes "枠幅は" + stat + "です"
getcaptionsize : mes "タイトルバーの高さは" + stat + "です"
getwakusize
screen 2, 400, 300, , winx + stat + 100, 50
title "サイズ可変ウィンドウ"
getwakusize : mes "枠幅は" + stat + "です"
getcaptionsize : mes "タイトルバーの高さは" + stat + "です"
stop
|