ll_libload user, "user32.dll"
ll_getproc DrawFrameControl, "DrawFrameControl", user
#module
#deffunc drawbutton str, int
mref caption, 32 : mref option, 1
mref bmscr, 67
rect = csrx, csry, csrx + bmscr.29, csry + bmscr.30
prm = bmscr.4, 0, 0x0004, (option = 1 * 0x0200) + (option = 2 * 0x4000) + 0x0010
ll_getptr rect : ll_ret prm.1
ll_callfunc prm, 4, DrawFrameControl@
i = bmscr.40 & 0xFF, bmscr.40 >> 8 & 0xFF, bmscr.40 >> 16 & 0xFF
color
pos winx : mes caption
ginfo 7
pos (bmscr.29 - prmx) / 2 + rect.0, (bmscr.30 - prmy) / 2 + rect.1 : mes caption
color i.0, i.1, i.2
redraw
return
#global
font msmincho, 12 : objmode 2
objsize 100, 25
pos 10, 10 : drawbutton "通常のボタン", 0
pos 10, 40 : drawbutton "押下済ボタン", 1
pos 10, 70 : drawbutton "平らなボタン", 2
pos 10, 100 : button "本物のボタン", *exit
stop
*exit
|