解説
hWnd:対象ウィンドウハンドル
hRgn:取得した領域ハンドル
|
サンプル
●GetWindowRgn(hWnd,hRgn) =DLL("user32.dll",
"int GetWindowRgn(
long hWnd, // ウィンドウハンドル
long hRgn // hRgn
)")
●CreateRectRgn(nL,nT,nR,nB) =DLL("gdi32.dll",
"long CreateRectRgn(
int nLeftRect,
int nTopRect,
int nRightRect,
int nBottomRect
)")
hRgnとは整数
hRgn=CreateRectRgn(0,0,0,0)#リージョンを作る
hRgnを表示
GetWindowRgn(母艦のハンドル,hRgn)
hRgnを表示
#メモリ開放
●DeleteObject(hObject) =DLL("gdi32.dll","long DeleteObject(long hObject)")
DeleteObject(hRgn)
補足
hRgnは一度、領域ハンドルが設定された変数を使うこと
でなければエラーとなります。
ハンドルは不要となった時点で削除→DeleteObject
【戻る】