問題を切り分けるために、提示されたスクリプトまでのコードを抜粋しましたけど、下記でも表示上の問題は発生するのかな?
#uselib "user32.dll"
#func global SetWindowPos "SetWindowPos" int,int,int,int,int,int,int
#func global GetWindowRect "GetWindowRect" int,int
#func global GetSystemMetrics "GetSystemMetrics" int
#define global SWP_NOSIZE 1
#define global SWP_NOZORDER 4
#define global SM_CXSCREEN 0
#define global SM_CYSCREEN 1
#module
#deffunc Centerwin
;*******************************************************************************
; ウィンドウを中央に設定 (Centerwin)
;
; 戻り値 : statは常に0
;
; ・書式 Centerwin
; ・引数 なし
; ・タイプ モジュール命令
;
;-- (NOTE) ---------------------------------------------------------------------
;
; (使用例)
; screen 0,640,480,0 : Centerwin
;*******************************************************************************
GetSystemMetrics SM_CXSCREEN : CSX=stat
GetSystemMetrics SM_CYSCREEN : CSY=stat
dim rc,4
GetWindowRect hwnd,varptr(rc)
w = rc(2)-rc(0)
h = rc(3)-rc(1)
SetWindowPos hwnd,0,(CSX-w)/2,(CSY-h)/2,0,0,SWP_NOSIZE|SWP_NOZORDER
return 0
#global
screen 0,200,250,0 : color 255,0,0 : boxf : Centerwin
検証用のモジュールは説明の為、作者「さくら」さんの exwinstyle.as の一部を使用しています。