This is 'CStruct_Base' Class for struct simple to use. this struct class concept from get MFC structure based class.(CRect, CPoint, ...)
- use normal type array and defined CStruct class array
- struct in struct (use defined CStruct class)
- simply check struct data by use TreeView() method
- bitfield var support (ver 5.0)
- string auto encoding with these type (ver 5.2): CHAR,TCHAR,STR,LPSTR,LPTSTR,LPCTSTR,WCHAR,LPWSTR,LPCWSTR
struct class define sample
class CMyStruct extends CStruct_Base ; inherit CStruct_Base
{
__New()
{
this.AddStructVar("a", "int", 10)
this.AddStructVar("b", "CRect", 2) ; use defined CRect class (inherited CStruct_Base)
this.AddStructVar("c", "char", "bit:3") ; bit field
this.AddStructVar("d", "char", "bit:6")
this.AddStructVar("e", "CRect", "union_start") ; union {
this.AddStructVar("f", "CSize", "union_end") ; union }
this.SetStructCapacity() ; allocate struct memory
}
}
* same this structure *
struct MyStruct
{
int a[10];
RECT b[2];
char c :3;
char d :6;
union
{
RECT e;
SIZE f;
};
};
CStruct.ahk , Test.ahk
CStruct_Script Make Helper Download(include 'WinDef.txt') : C type MSDN struct convert to CStruct type class.







