下のようなスクリプトをにしてみたんですが、90行目のGetWindowLongAでエラーが出てしまいます。
どうしたら良いでしょうか?
#module "scrlbar"
#uselib "user32"
#func GetWindowLongA "GetWindowLongA" int,int
#func SetWindowLongA "SetWindowLongA" int,int,int
#func ShowScrollBar "ShowScrollBar" int,int,int
#func SetScrollInfo "SetScrollInfo" int,int,var,int
#func SetScrollPos "SetScrollPos" int,int,int,int
#func SetWindowPos "SetWindowPos" int,int,int,int,int,int,int
#deffunc ScrollBar
oncmd gosub *WMSIZE, 5
oncmd gosub *SCROLL, $114
oncmd gosub *SCROLL, $115
si= 28, 31, 0,0,0,0,0 // SCROLLINFO構造体
wx.ginfo_sel= ginfo_sizex+ginfo_sx-ginfo_winx
wy.ginfo_sel= ginfo_sizey+ginfo_sy-ginfo_winy
; WS_VSCROLL|WS_HSCROLL|WS_SIZEBOX
GetWindowLongA hwnd,-16 : SetWindowLongA hwnd,-16,stat|$340000
SetWindowPos hWnd, 0, 0, 0, 0, 0, $37 ; screen 0, bgscr用
return 1
*WMSIZE //ウィンドウサイズが変更された時の処理
sel=ginfo_sel: gsel ginfo_intid
repeat 2
si.3= ginfo(26+cnt), ginfo(12+cnt), ginfo(8+cnt)
SetScrollInfo hWnd, cnt, si, 1
loop
groll ginfo_vx, ginfo_vy
mref bm,67 : bm.20=ginfo_winx, ginfo_winy
hHide= wx.ginfo_intid= ginfo_sizex ;gsel selを確実に実行させるため
vHide= wy.ginfo_intid= ginfo_sizey
wnd=hwnd : gsel sel ;何故かスクロールバーが描画されない環境があるため
if hHide=1: ShowScrollBar wnd, 0, 0:else: SetWindowPos Wnd, 0,0,0,0,0,$37
if vHide=1: ShowScrollBar wnd, 1, 0:else: SetWindowPos Wnd, 0,0,0,0,0,$37
return 1
*SCROLL //スクロールバー操作時の処理
sel=ginfo_sel : gsel ginfo_intid
m=iparam=$115 : nPos=ginfo(8+(m=1))
Code= wParam &$ffff
repeat 1
if Code= 5 : nPos=wParam>>16&$ffff : break ;TB_THUMBTRACK
if Code= 0 : nPos-4 : break ;TB_LINEUP
if Code= 1 : nPos+4 : break
if Code= 2 : nPos-32: break
if Code= 3 : nPos+32
loop
SetScrollPos hWnd, m, nPos, 1
if m : groll ginfo_vx, nPos :else: groll nPos, ginfo_vy
gsel sel : return 1
#global
#uselib "user32.dll"
#func global SetLong "SetWindowLongA" int, int, int
#cfunc global GetLong "GetWindowLongA" int, int
#define global StyleAdd(%1, %2=0, %3=0)ujw=((%3)&2)*-2-16 :\
SetLong %1, ujw, GetLong(%1, ujw)|(%2)^((%3)&1)*(%2)
#define 拡張 2
#define 削除 1
//以下pizzaさん提供
#uselib "user32.dll"
#func SetParent "SetParent" int, int
#func SetFocus "SetFocus" int
#define WS_THICKFRAME 0x00040000
#define WS_CHILD 0x40000000
#define WS_POPUP 0x80000000
#define GWL_STYLE (-16)
screen 0
hwnd0 = hwnd
buffer 2
dialog "", 16
if stat == 0 : end
picload refstr
bgscr 1, ginfo_winx, ginfo_winy, 2
gcopy 2, 0, 0, ginfo_winx, ginfo_winy
hwnd1 = hwnd
ScrollBar
SetParent hwnd, hwnd0
tf = WS_THICKFRAME
GetWindowLongA hwnd, GWL_STYLE
SetWindowLongA hwnd, GWL_STYLE, stat|WS_CHILD & (WS_POPUP|tf^0xFFFFFFFF)
width 200, 200, 100, 100
gsel 1, 1
gsel 0, 1
SetFocus hwnd1
stop