ll_libload user, "user32.dll"
ll_getproc SetWindowPos, "SetWindowPos", user
ll_getproc GetWindowLong, "GetWindowLongA", user
ll_getproc SetWindowLong, "SetWindowLongA", user
#module
#deffunc setobjinfo int, int, int, int, int, int
mref id, 0 : mref px, 1 : mref py, 2 : mref sx, 3 : mref sy, 4 : mref flg, 5
mref bmscr, 67
if id < 1000 : i = id + 41 : i = bmscr.i : else : i = id
prm = i, 0, px, py, sx, sy, flg = -1 * 0x0027 + (flg ! -1 * flg)
ll_callfunc prm, 7, SetWindowPos@
return
#deffunc objgetstyle int, int
mref id, 0 : mref extflg, 1
mref stt, 64
mref bmscr, 67
if id < 1000 : i = id + 41 : i = bmscr.i : else : i = id
prm = i, -4 * (extflg ! 0) - 16
ll_callfunc prm, 2, GetWindowLong@
ll_ret i : stt = i
return
#deffunc objsetstyle int, int, int, int
mref id, 0 : mref extflg, 1 : mref aprm, 2 : mref dprm, 3
mref bmscr, 67
objgetstyle id, extflg
if id < 1000 : i = id + 41 : i = bmscr.i : else : i = id
prm = i, -4 * (extflg ! 0) - 16, stat | aprm & (stat | aprm ^ dprm)
ll_callfunc prm, 3, SetWindowLong@
setobjinfo id, , , , , -1 // 位置・サイズは変更せずにスタイルのみ変更
return
#global
sdim msg, 12, 6
msg = "左寄せ", "右寄せ", "上寄せ", "下寄せ", "左上寄せ", "右下寄せ"
prm = 0x100, 0x200, 0x400, 0x800, 0x500, 0xA00
objsize 100, 100
repeat 6
pos cnt \ 3 * 150, cnt / 3 * 150 : button msg.cnt, *click
objsetstyle cnt, , prm.cnt
loop
stop
*click
dialog msg.stat + "で表示されたボタンを押しました"
stop
|