<Tips>
構造体のネスト
入れ子の構造体は次の例のように宣言できます。
VBScript
あるいは、次の例のように宣言することも可能です。
VBScript
このように宣言した場合、MSG.pt.xおよびMSG.pt.yの各プロパティにアクセスすることが可能になります。
VBScript
set POINTAPI=CreateObject("SfcMini.Structure")
set MSG=CreateObject("SfcMini.Structure")
POINTAPI _
"x", "Long", _
"y", "Long"
MSG _
"hwnd", "Long", _
"message", "Long", _
"wParam", "Long", _
"lParam", "Long", _
"time", "Long", _
"pt", POINTAPI
set MSG=CreateObject("SfcMini.Structure")
POINTAPI _
"x", "Long", _
"y", "Long"
MSG _
"hwnd", "Long", _
"message", "Long", _
"wParam", "Long", _
"lParam", "Long", _
"time", "Long", _
"pt", POINTAPI
あるいは、次の例のように宣言することも可能です。
VBScript
set MSG=CreateObject("SfcMini.Structure")
MSG _
"hwnd", "Long", _
"message", "Long", _
"wParam", "Long", _
"lParam", "Long", _
"time", "Long", _
"pt", CreateObject("SfcMini.Structure")("x","Long","y","Long")
MSG _
"hwnd", "Long", _
"message", "Long", _
"wParam", "Long", _
"lParam", "Long", _
"time", "Long", _
"pt", CreateObject("SfcMini.Structure")("x","Long","y","Long")
このように宣言した場合、MSG.pt.xおよびMSG.pt.yの各プロパティにアクセスすることが可能になります。