*--------------------------------------------------------------------------------------------------------------------------------------------------------
* (EN) AUTOGENERATED - ATTENTION!! - NOT INTENDED FOR EXECUTION!! USE ONLY FOR MERGING CHANGES AND STORING WITH SCM TOOLS!!
*--------------------------------------------------------------------------------------------------------------------------------------------------------
*< FOXBIN2PRG: Version="1.21" SourceFile="ctl32_structs.vcx" CPID="1252" /> (Solo para binarios VFP 9 / Only for VFP 9 binaries)
*
*
DEFINE CLASS _base AS custom 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	#INCLUDE "ctl32.h"
	*<DefinedPropArrayMethod>
		*m: ctlallocatememory
		*m: ctlfreememory
		*m: ctlinttostr
		*m: ctlos
		*m: ctlregisterfunctions
		*m: ctlstrtoint
		*m: ctlwritememory
		*m: _struct_access
		*m: _struct_assign
		*p: ctlabout
		*p: ctlversion
		*p: _memberdata		&& XML Metadata for customizable properties
		*p: _struct
		*p: _structlen
	*</DefinedPropArrayMethod>

	*<PropValue>
		ctlabout = ctl32_structs - Carlos Alloatti
		ctlversion = 20061010
		Height = 17
		Name = "_base"
		Width = 17
		_struct = 
		_structlen = 0
	*</PropValue>
	
	PROCEDURE ctlallocatememory
		*!* Code stolen from www.foxitaly.com/ecerlini/struttureapi_en.html
		
		Lparameters tnBytes As Number
		
		Local ;
			lnHeap As Number, ;
			lnResult As Number
		
		m.lnHeap  = GetProcessHeap()
		
		m.lnResult = HeapAlloc(m.lnHeap, HEAP_ZERO_MEMORY, m.tnBytes) && non è necessario metterla a 0 ma ...
		
		Return m.lnResult
		
	ENDPROC

	PROCEDURE ctlfreememory
		*!* Code stolen from www.foxitaly.com/ecerlini/struttureapi_en.html
		
		Lparameters tnMemHandle As Number
		
		Local ;
			lnHeap As Number, ;
			lnResult As Number
		
		m.lnHeap  = GetProcessHeap()
		
		m.lnResult = HeapFree(m.lnHeap, 0, m.tnMemHandle)
		
		Return Iif(m.lnResult = 0, .F., .T.)
		
	ENDPROC

	PROCEDURE ctlinttostr
		*!* Code stolen from www.foxitaly.com/ecerlini/struttureapi_en.html
		
		Lparameters tnIntValue As Number
		
		Local ;
			lnx As Number, ;
			lnChars As Number, ;
			lnOper As Number, ;
			lcRetVal As String
		
		m.tnIntValue = Int(m.tnIntValue)
		m.lnChars = 4
		
		If Sign(m.tnIntValue) = -1
			m.tnIntValue = m.tnIntValue + 1 + Evaluate([0x] + Replicate([FF], m.lnChars))
		Endif
		
		m.lnOper = 0
		m.lcRetVal = []
		m.lnx = 0
		
		Do While m.tnIntValue > 0
			m.lnOper = Mod(Int(m.tnIntValue / 256 ^ m.lnx), 256)
			m.lcRetVal = m.lcRetVal + Chr(m.lnOper)
			m.tnIntValue = m.tnIntValue - (m.lnOper * (256 ^ m.lnx))
			m.lnx = m.lnx + 1
		Enddo
		
		Return Padr(m.lcRetVal, m.lnChars, Chr(0))
		
	ENDPROC

	PROCEDURE ctlos
		*!* Returns a numeric value representing the operating system version
		*!* Check ctl32.h for possible values
		*!* ie CON_OS_WINXPSP2 = 5010200
		
		Return Val(Os(3)) * 1000000 + Val(Os(4)) * 10000 + Val(Os(8)) * 100 + Val(Os(9))
		
	ENDPROC

	PROCEDURE ctlregisterfunctions
		Local Array laDeclaredDlls(1,3)
		Local lnLen
		m.lnLen = Adlls(m.laDeclaredDlls)
		
		If Ascan(m.laDeclaredDlls, [DeleteObject], 1, m.lnLen , 2, 15) = 0
			Declare Integer DeleteObject In gdi32;
				Integer hObject
		ENDIF
		
		If Ascan(m.laDeclaredDlls, [GetProcessHeap], 1, m.lnLen , 2, 15) = 0
			Declare Integer GetProcessHeap In win32api
		Endif
		
		If Ascan(m.laDeclaredDlls, [HeapAlloc], 1, m.lnLen , 2, 15) = 0
			Declare Integer HeapAlloc In win32api ;
				Integer hHeap, ;
				Integer dwFlags, ;
				Integer dwBytes
		Endif
		
		If Ascan(m.laDeclaredDlls, [HeapFree], 1, m.lnLen , 2, 15) = 0
			Declare Integer HeapFree In win32api ;
				Integer hHeap, ;
				Integer dwFlags, ;
				Integer lpMem
		Endif
		
		
		
		
	ENDPROC

	PROCEDURE ctlstrtoint
		*!* Code stolen from www.foxitaly.com/ecerlini/struttureapi_en.html
		
		Lparameters tcCharInt As Character, tlUnsigned As Logical
		
		Local ;
			lnx As Number, ;
			lnRetVal As Number, ;
			lnChars As Number, ;
			llBig As Logical
		
		m.lnRetVal = 0
		m.lnChars = Len(m.tcCharInt)
		
		If m.lnChars > 0 Then
			For m.lnx = 1 To m.lnChars
				m.lnRetVal = m.lnRetVal + (Asc(Substr(m.tcCharInt, m.lnx, 1)) * (256 ^ (m.lnx - 1)))
			Next
		
			m.llBig = m.lnRetVal > Evaluate([0x7F] + Replicate([FF], m.lnChars-1))
		
			If m.tlUnsigned = FALSE	And m.llBig
				m.lnRetVal = m.lnRetVal - 1 - Evaluate([0x] + Replicate([FF], m.lnChars))
			Endif
		Endif
		
		Return Int(m.lnRetVal)
		
	ENDPROC

	PROCEDURE ctlwritememory
		*!* Code stolen from www.foxitaly.com/ecerlini/struttureapi_en.html
		
		Lparameters tcMemString as Character
		
		Local ;
			lnSize As Number, ;
			lnMemHandle As Number, ;
			lcExErr As String
		
		m.lnSize = Len(m.tcMemString)
		
		m.lnMemHandle = 0
		
		m.lnMemHandle = This.ctlAllocateMemory(m.lnSize)
		
		*!* Write string to memory space
		Sys(2600, m.lnMemHandle, m.lnSize, m.tcMemString)
		
		Return m.lnMemHandle
		
	ENDPROC

	PROCEDURE Init
		This.ctlRegisterFunctions()
		
	ENDPROC

	PROCEDURE _struct_access
		*To do: Modify this routine for the Access method
		RETURN THIS._struct
		
	ENDPROC

	PROCEDURE _struct_assign
		LPARAMETERS vNewVal
		*To do: Modify this routine for the Assign method
		THIS._struct = m.vNewVal
		
	ENDPROC

ENDDEFINE

DEFINE CLASS _iconinfo AS _base OF "ctl32_structs.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	#INCLUDE "ctl32.h"
	*<DefinedPropArrayMethod>
		*p: _ficon
		*p: _hbmcolor
		*p: _hbmmask
		*p: _xhotspot
		*p: _yhotspot
	*</DefinedPropArrayMethod>

	*<PropValue>
		Name = "_iconinfo"
		_ficon = 0
		_hbmcolor = 0
		_hbmmask = 0
		_structlen = 20
		_xhotspot = 0
		_yhotspot = 0
	*</PropValue>
	
	PROCEDURE Destroy
		With This
			If ._hbmcolor <> 0 Then
				DeleteObject(._hbmcolor)
			Endif
			If ._hbmmask <> 0 Then
				DeleteObject(._hbmmask)
			Endif
		Endwith
		
		
	ENDPROC

	PROCEDURE _struct_access
		*!*	ICONINFO {
		*!*	    BOOL fIcon;			4
		*!*	    DWORD xHotspot;		4
		*!*	    DWORD yHotspot;		4
		*!*	    HBITMAP hbmMask;	4
		*!*	    HBITMAP hbmColor;	4
		*!*	ICONINFO;				20
		
		With This
			._Struct = ;
				.ctlIntToStr(._fIcon) + ;
				.ctlIntToStr(._xHotspot) + ;
				.ctlIntToStr(._yHotspot) + ;
				.ctlIntToStr(._hbmMask) + ;
				.ctlIntToStr(._hbmColor)
		Endwith
		
		Return This._Struct
	ENDPROC

	PROCEDURE _struct_assign
		*!*	ICONINFO {
		*!*	    BOOL fIcon;			4
		*!*	    DWORD xHotspot;		4
		*!*	    DWORD yHotspot;		4
		*!*	    HBITMAP hbmMask;	4
		*!*	    HBITMAP hbmColor;	4
		*!*	ICONINFO;				20
		
		Lparameters vNewVal
		
		This._Struct = m.vNewVal
		
		With This
			._fIcon    = .ctlStrToInt(Substr(m.vNewVal,  1, 4))
			._xHotspot = .ctlStrToInt(Substr(m.vNewVal,  5, 4))
			._yHotspot = .ctlStrToInt(Substr(m.vNewVal,  9, 4))
			._hbmMask  = .ctlStrToInt(Substr(m.vNewVal, 13, 4))
			._hbmColor = .ctlStrToInt(Substr(m.vNewVal, 17, 4))
		Endwith
		
	ENDPROC

ENDDEFINE

DEFINE CLASS _macros AS custom 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	#INCLUDE "ctl32.h"
	*<DefinedPropArrayMethod>
		*m: _get_x_lparam
		*m: _get_x_point
		*m: _get_y_lparam
		*m: _get_y_point
		*m: _hibyte
		*m: _hiword
		*m: _lobyte
		*m: _loword
		*m: _makelangid
		*m: _makelong
		*m: _makelparam
		*m: _makepoint
		*m: _makeword
		*m: _makewparam
		*m: _primarylangid
		*m: _sublangid
	*</DefinedPropArrayMethod>

	*<PropValue>
		Name = "_macros"
		Width = 17
	*</PropValue>
	
	PROCEDURE _get_x_lparam
		*!*	int GET_X_LPARAM(
		*!*	    LPARAM lParam
		*!*	);
		
		*!*	Parameters
		
		*!*	lParam
		*!*	Specifies the value to be converted.
		
		*!*	Return Value
		
		*!*	The return value is the low-order int of the specified value.
		
		Lparameters m.lParam As Integer
		
		Return Bitand(m.lParam, 0xFFFF)
		
	ENDPROC

	PROCEDURE _get_x_point
		*!*	POINT
		*!*	The POINT structure defines the x- and y- coordinates of a point.
		
		*!*	typedef struct tagPOINT {
		*!*	  LONG x;
		*!*	  LONG y;
		*!*	} POINT, *PPOINT;
		*!*	Members
		*!*	x
		*!*	Specifies the x-coordinate of the point.
		*!*	y
		*!*	Specifies the y-coordinate of the point.
		
		*!* This is not a Windows Macro
		
		Lparameters tcPoint As String
		
		Return CToBin(Substr(m.tcPoint, 1, 4), [4RS])
		
	ENDPROC

	PROCEDURE _get_y_lparam
		*!*	int GET_Y_LPARAM(
		*!*	    LPARAM lParam
		*!*	);
		
		*!*	Parameters
		
		*!*	lParam
		*!*	Specifies the value to be converted. 
		
		*!*	Return Value
		
		*!*	The return value is the high-order int of the specified value. 
		
		Lparameters m.lParam As Integer
		
		Return Bitrshift(m.lParam, 16)		&& Bitand(Int(m.lParam / 0x10000), 0xFFFF)
		
		
		
	ENDPROC

	PROCEDURE _get_y_point
		*!*	POINT
		*!*	The POINT structure defines the x- and y- coordinates of a point.
		
		*!*	typedef struct tagPOINT {
		*!*	  LONG x;
		*!*	  LONG y;
		*!*	} POINT, *PPOINT;
		*!*	Members
		*!*	x
		*!*	Specifies the x-coordinate of the point.
		*!*	y
		*!*	Specifies the y-coordinate of the point.
		
		*!* This is not a Windows Macro
		
		Lparameters tcPoint As String
		
		Return CToBin(Substr(m.tcPoint, 5, 4), [4RS])
		
	ENDPROC

	PROCEDURE _hibyte
		*!*	BYTE HIBYTE(
		*!*	Word wValue
		*!*	);
		
		*!*	Parameters
		
		*!*	wValue
		*!*	Specifies the Value To be converted.
		
		*!*	Return Value
		
		*!*	the Return Value Is the High-Order BYTE Of the specified Value.
		
		Lparameters m.lParam As Integer
		
		Return Bitrshift(m.lParam, 8)		&& Bitand(Int(m.lParam / 0x10000), 0xFFFF)
		
	ENDPROC

	PROCEDURE _hiword
		*!*	Word HIWORD(
		*!*	DWORD dwValue
		*!*	);
		
		*!*	Parameters
		
		*!*	dwValue
		*!*	Specifies the Value To be converted.
		
		*!*	Return Value
		
		*!*	the Return Value Is the High-Order Word Of the specified Value.
		
		Lparameters m.lParam As Integer
		
		Return Bitrshift(m.lParam, 16)		&& Bitand(Int(m.lParam / 0x10000), 0xFFFF)
		
	ENDPROC

	PROCEDURE _lobyte
		*!*	BYTE LOBYTE(
		*!*	Word wValue
		*!*	);
		
		*!*	Parameters
		
		*!*	wValue
		*!*	Specifies the Value To be converted.
		
		*!*	Return Value
		
		*!*	the Return Value Is the low-Order BYTE Of the specified Value.
		
		Lparameters m.lParam As Integer
		
		Return Bitand(m.lParam, 0xFF)
		
	ENDPROC

	PROCEDURE _loword
		*!*	Word LOWORD(
		*!*	DWORD dwValue
		*!*	);
		
		*!*	Parameters
		
		*!*	dwValue
		*!*	Specifies the Value To be converted.
		
		*!*	Return Value
		
		*!*	the Return Value Is the low-Order Word Of the specified Value.
		
		Lparameters m.lParam As Integer
		
		Return Bitand(m.lParam, 0xFFFF)
		
	ENDPROC

	PROCEDURE _makelangid
		*!*	WORD MAKELANGID(
		*!*	  USHORT usPrimaryLanguage,
		*!*	  USHORT usSubLanguage
		*!*	);
		
		*!*	Parameters
		
		*!*	usPrimaryLanguage
		*!*	Primary language identifier. This identifier can be a predefined value or
		*!*	a value for a user-defined primary language. For a user-defined language,
		*!*	the identifier is a value in the range 0x0200 to 0x03FF. All other values
		*!*	are reserved for operating system use. For more information, see Language
		*!*	Identifier Constants and Strings.
		
		*!*	usSubLanguage
		*!*	Sublanguage identifier. This parameter can be a predefined sublanguage
		*!*	identifier or a user-defined sublanguage. For a user-defined sublanguage,
		*!*	the identifier is a value in the range 0x20 to 0x3F. All other values are
		*!*	reserved for operating system use. For more information, see Language
		*!*	Identifier Constants and Strings.
		
		*!*	Return Values
		*!*	Returns the language identifier.
		
		Lparameters m.usPrimaryLanguage As Short, m.usSubLanguage As Short
		
		Return Bitor(m.usPrimaryLanguage, Bitlshift(m.usSubLanguage, 10))
		
	ENDPROC

	PROCEDURE _makelong
		*!*	DWORD MAKELONG(
		*!*	Word wLow,
		*!*	Word wHigh
		*!*	);
		
		*!*	Parameters
		
		*!*	wLow
		*!*	Specifies the low-Order Word Of the new Value.
		
		*!*	wHigh
		*!*	Specifies the High-Order Word Of the new Value.
		
		*!*	Return Value
		
		*!*	the Return Value Is a Long Value.
		
		Lparameters m.wLow As Integer, m.wHigh As Integer
		
		Return m.wLow + m.wHigh * 0x10000	&& Bitor(m.wLow, BITLSHIFT(m.wHigh, 16)
		
	ENDPROC

	PROCEDURE _makelparam
		*!*	LPARAM MAKELPARAM(
		*!*	    WORD wLow,
		*!*	    WORD wHigh
		*!*	);
		
		*!*	Parameters
		
		*!*	wLow
		*!*	Specifies the low-order word of the new value.
		
		*!*	wHigh
		*!*	Specifies the high-order word of the new value.
		
		*!*	Return Value
		
		*!*	The return value is an LPARAM value.
		
		Lparameters m.wLow As Integer, m.wHigh As Integer
		
		Return m.wLow + m.wHigh * 0x10000	&& Bitor(m.wLow, BITLSHIFT(m.wHigh, 16)
		
	ENDPROC

	PROCEDURE _makepoint
		*!*	POINT
		*!*	The POINT structure defines the x- and y- coordinates of a point.
		
		*!*	typedef struct tagPOINT {
		*!*	  LONG x;
		*!*	  LONG y;
		*!*	} POINT, *PPOINT;
		*!*	Members
		*!*	x
		*!*	Specifies the x-coordinate of the point.
		*!*	y
		*!*	Specifies the y-coordinate of the point.
		
		*!* This is not a Windows Macro
		
		Lparameters tnX as integer, tnY as integer
		
		Return BinToC(m.tnX, [4RS]) + BinToC(m.tnY, [4RS])
		
	ENDPROC

	PROCEDURE _makeword
		*!*	Word MAKEWORD(
		*!*	BYTE bLow,
		*!*	BYTE bHigh
		*!*	);
		
		*!*	Parameters
		
		*!*	bLow
		*!*	Specifies the low-Order BYTE Of the new Value.
		
		*!*	bHigh
		*!*	Specifies the High-Order BYTE Of the new Value.
		
		*!*	Return Value
		
		*!*	the Return Value Is a Word Value.
		
		Lparameters m.wLow As Integer, m.wHigh As Integer
		
		Return m.wLow + m.wHigh * 0x100	&& Bitor(m.wLow, BITLSHIFT(m.wHigh, 8)
		
	ENDPROC

	PROCEDURE _makewparam
		*!*	WPARAM MAKEWPARAM(
		*!*	Word wLow,
		*!*	Word wHigh
		*!*	);
		
		*!*	Parameters
		
		*!*	wLow
		*!*	Specifies the low-Order Word Of the new Value.
		
		*!*	wHigh
		*!*	Specifies the High-Order Word Of the new Value.
		
		*!*	Return Value
		
		*!*	the Return Value Is a WPARAM Value.
		
		Lparameters m.wLow As Integer, m.wHigh As Integer
		
		Return m.wLow + m.wHigh * 0x10000	&& Bitor(m.wLow, BITLSHIFT(m.wHigh, 16)
		
	ENDPROC

	PROCEDURE _primarylangid
		*!*	WORD PRIMARYLANGID(
		*!*	  WORD lgid
		*!*	);
		
		*!*	Parameters
		
		*!*	lgid
		*!*	Language identifier. This value is a combination of a primary language identifier
		*!* and a sublanguage identifier and is usually created by using the MAKELANGID macro.
		
		*!*	Return Values
		
		*!*	Returns the primary language identifier. It can be one of the predefined primary
		*!* language identifiers or a user-defined primary language identifier.
		*!* For more information, see MAKELANGID.
		
		Lparameters m.lgid As Integer
		
		Return Bitand(m.lgid, 0x3ff)
		
	ENDPROC

	PROCEDURE _sublangid
		*!*	WORD SUBLANGID(
		*!*	  WORD lgid
		*!*	);
		
		*!*	Parameters
		
		*!*	lgid
		*!*	Language identifier. You can supply predefined values for this parameter,
		*!* or create an identifier using the MAKELANGID macro.
		
		*!*	Return Values
		
		*!*	Returns a sublanguage identifier. This can be a predefined sublanguage
		*!* identifier or a user-defined sublanguage identifier.
		
		Lparameters m.lgid as integer
		
		Return Bitrshift(m.lgid, 10)
		
	ENDPROC

ENDDEFINE

DEFINE CLASS _nmhdr AS _base OF "ctl32_structs.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	#INCLUDE "ctl32.h"
	*<DefinedPropArrayMethod>
		*p: _code
		*p: _hwndfrom
		*p: _idfrom
	*</DefinedPropArrayMethod>

	*<PropValue>
		Name = "_nmhdr"
		_code = 0
		_hwndfrom = 0
		_idfrom = 0
		_structlen = 12
	*</PropValue>
	
	PROCEDURE _struct_access
		*!*	NMHDR
		*!*	    HWND hwndFrom;			4
		*!*	    UINT idFrom;			4
		*!*	    UINT code;				4
		*!* NMHDR;						12
		
		With This
			._Struct = ;
				.ctlIntToStr(._hwndFrom) + ;
				.ctlIntToStr(._idFrom) + ;
				.ctlIntToStr(._Code)
		Endwith
		
		Return This._Struct
		
	ENDPROC

	PROCEDURE _struct_assign
		*!*	NMHDR
		*!*	    HWND hwndFrom;			4
		*!*	    UINT idFrom;			4
		*!*	    UINT code;				4
		*!* NMHDR;						12
		
		LPARAMETERS vNewVal
		
		THIS._Struct = m.vNewVal
		
		With This
			._hwndFrom = .ctlStrToInt(Substr(m.vNewVal,  1, 4))
			._idFrom   = .ctlStrToInt(Substr(m.vNewVal,  5, 4))
			._code     = .ctlStrToInt(Substr(m.vNewVal,  9, 4))
		Endwith
		
	ENDPROC

ENDDEFINE

DEFINE CLASS _nmmouse AS _base OF "ctl32_structs.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	#INCLUDE "ctl32.h"
	*<DefinedPropArrayMethod>
		*p: _code
		*p: _dwhitinfo
		*p: _dwitemdata
		*p: _dwitemspec
		*p: _hwndfrom
		*p: _idfrom
		*p: _x
		*p: _y
	*</DefinedPropArrayMethod>

	*<PropValue>
		Name = "_nmmouse"
		_code = 0
		_dwhitinfo = 0
		_dwitemdata = 0
		_dwitemspec = 0
		_hwndfrom = 0
		_idfrom = 0
		_structlen = 32
		_x = 0
		_y = 0
	*</PropValue>
	
	PROCEDURE _struct_access
		*!*	NMMOUSE
		*!*	HWND hwndFrom;			4
		*!*	UINT idFrom;			4
		*!*	UINT code;				4
		*!*	DWORD_PTR dwItemSpec;	4
		*!*	DWORD_PTR dwItemData;	4
		*!*	LONG x; 				4
		*!*	LONG y; 				4
		*!*	LPARAM dwHitInfo;		4
		*!* NMMOUSE		   			32
		
		With This
			._Struct = ;
				.ctlIntToStr(._hwndFrom) + ;
				.ctlIntToStr(._idFrom) + ;
				.ctlIntToStr(._Code) + ;
				.ctlIntToStr(._dwItemSpec) + ;
				.ctlIntToStr(._dwItemData)  + ;
				.ctlIntToStr(._X)  + ;
				.ctlIntToStr(._Y)  + ;
				.ctlIntToStr(._dwHitInfo)
		Endwith
		
		Return This._Struct
		
	ENDPROC

	PROCEDURE _struct_assign
		Lparameters vNewVal
		
		*!*	NMMOUSE
		*!*	HWND hwndFrom;			4
		*!*	UINT idFrom;			4
		*!*	UINT code;				4
		*!*	DWORD_PTR dwItemSpec;	4
		*!*	DWORD_PTR dwItemData;	4
		*!*	LONG x; 				4
		*!*	LONG y; 				4
		*!*	LPARAM dwHitInfo;		4
		*!* NMMOUSE		   			32
		
		This._struct = m.vNewVal
		
		With This
			._hwndFrom	 = .ctlStrToInt(Substr(m.vNewVal,  1, 4))
			._idFrom	 = .ctlStrToInt(Substr(m.vNewVal,  5, 4), TRUE)
			._code		 = .ctlStrToInt(Substr(m.vNewVal,  9, 4))
			._dwItemSpec = .ctlStrToInt(Substr(m.vNewVal, 13, 4))
			._dwItemData = .ctlStrToInt(Substr(m.vNewVal, 17, 4))
			._x          = .ctlStrToInt(Substr(m.vNewVal, 21, 4))
			._y			 = .ctlStrToInt(Substr(m.vNewVal, 25, 4))
			._dwHitInfo  = .ctlStrToInt(Substr(m.vNewVal, 29, 4))
		Endwith
		
	ENDPROC

ENDDEFINE

DEFINE CLASS _nmttdispinfo AS _base OF "ctl32_structs.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	#INCLUDE "ctl32.h"
	*<DefinedPropArrayMethod>
		*p: _code
		*p: _hbmp
		*p: _hinst
		*p: _hwndfrom
		*p: _idfrom
		*p: _lparam
		*p: _lpsztext
		*p: _lpsztextstring
		*p: _sztext
		*p: _uflags
	*</DefinedPropArrayMethod>

	*<PropValue>
		Name = "_nmttdispinfo"
		_code = 0
		_hbmp = 0
		_hinst = 0
		_hwndfrom = 0
		_idfrom = 0
		_lparam = 0
		_lpsztext = 0
		_lpsztextstring = 
		_structlen = 108
		_sztext = 
		_uflags = 0
	*</PropValue>
	
	PROCEDURE Destroy
		If This._lpszText <> 0 Then
			This.ctlFreeMemory(This._lpszText)
		Endif
		
	ENDPROC

	PROCEDURE _struct_access
		*!*	NMTTDISPINFO {
		*!*	    HWND hwndFrom;					4
		*!*	    UINT idFrom;					4
		*!*	    UINT code;						4
		*!*	    LPTSTR     lpszText;			4
		*!*	    char       szText[80];			80
		*!*	    HINSTANCE  hinst;				4
		*!*	    UINT       uFlags;				4
		*!*	#if (_WIN32_IE >= 0x0300)
		*!*	    LPARAM     lParam;				4
		*!*	#endif
		*!*	#if (_WIN32_WINNT >= 0x0600)
		*!*	    HBITMAP hbmp;
		*!*	#endif
		*!*	} NMTTDISPINFO, *LPNMTTDISPINFO;
		
		If This._lpszText <> 0 Then
			This.ctlFreeMemory(This._lpszText)
			This._lpszText = 0
		Endif
		
		If Vartype(This._lpszTextString) <> T_CHARACTER Then
			This._lpszTextString = []
		Endif
		
		This._lpszTextString = Alltrim(This._lpszTextString)
		
		If Len(This._lpszTextString) = 0 Then
			This._lpszText = 0
		Else
			If Right(This._lpszTextString, 1) <> Chr(0) Then
				This._lpszTextString = This._lpszTextString + Chr(0)
			Endif
			This._lpszText = This.ctlWriteMemory(This._lpszTextString)
		Endif
		
		With This
			._Struct = ;
				.ctlIntToStr(._hwndFrom) + ;
				.ctlIntToStr(._idFrom) + ;
				.ctlIntToStr(._code) + ;
				.ctlIntToStr(._lpszText) + ;
				.Padr(_szText, 80)  + ;
				.ctlIntToStr(._hinst) + ;
				.ctlIntToStr(._uFlags) + ;
				.ctlIntToStr(._lParam)
		Endwith
		
		Return This._Struct
		
	ENDPROC

	PROCEDURE _struct_assign
		*!*	typedef struct tagNMHDR {
		*!*	    HWND hwndFrom;
		*!*	    UINT idFrom;
		*!*	    UINT code;
		*!*	} NMHDR;
		
		*!*	typedef struct tagNMTTDISPINFO {
		*!*	    NMHDR      hdr;
		*!*	    LPTSTR     lpszText;
		*!*	    char       szText[80];
		*!*	    HINSTANCE  hinst;
		*!*	    UINT       uFlags;
		*!*	#if (_WIN32_IE >= 0x0300)
		*!*	    LPARAM     lParam;
		*!*	#endif
		*!*	#if (_WIN32_WINNT >= 0x0600)
		*!*	    HBITMAP hbmp;
		*!*	#endif
		*!*	} NMTTDISPINFO, *LPNMTTDISPINFO;
		
		LPARAMETERS vNewVal
		
		THIS._struct = m.vNewVal
		
		With This
			._hwndFrom = .ctlStrToInt(Substr(m.vNewVal,  1, 4))
			._idFrom = .ctlStrToInt(Substr(m.vNewVal,  5, 4), TRUE)
			._code = .ctlStrToInt(Substr(m.vNewVal,  9, 4))
			._lpszText = .ctlStrToInt(Substr(m.vNewVal, 13, 4))
			._szText =  Substr(m.vNewVal, 17, 80)
			._hinst = .ctlStrToInt(Substr(m.vNewVal, 97, 4))
			._uFlags = .ctlStrToInt(Substr(m.vNewVal, 101, 4), TRUE)
			._lParam = .ctlStrToInt(Substr(m.vNewVal, 105, 4))
		Endwith
		
	ENDPROC

ENDDEFINE

DEFINE CLASS _rect AS _base OF "ctl32_structs.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	#INCLUDE "ctl32.h"
	*<DefinedPropArrayMethod>
		*p: _bottom
		*p: _height
		*p: _left
		*p: _right
		*p: _top
		*p: _width
	*</DefinedPropArrayMethod>

	*<PropValue>
		Name = "_rect"
		_bottom = 0
		_height = 0
		_left = 0
		_right = 0
		_structlen = 16
		_top = 0
		_width = 0
	*</PropValue>
	
	PROCEDURE _struct_access
		*!*	RECT
		*!*	  LONG left;			4
		*!*	  LONG top;				4
		*!*	  LONG right;			4
		*!*	  LONG bottom;			4
		*!* RECT;					16
		
		With This
			._Struct = ;
				.ctlIntToStr(._Left)   + ;
				.ctlIntToStr(._Top)    + ;
				.ctlIntToStr(._Right)  + ;
				.ctlIntToStr(._Bottom)
		Endwith
		
		Return This._Struct
		
		
	ENDPROC

	PROCEDURE _struct_assign
		*!*	RECT
		*!*	  LONG left;			4
		*!*	  LONG top;				4
		*!*	  LONG right;			4
		*!*	  LONG bottom;			4
		*!* RECT;					16
		
		Lparameters vNewVal
		
		This._Struct = m.vNewVal
		
		With This
			._Left   = .ctlStrToInt(Substr(m.vNewVal,  1, 4))
			._Top    = .ctlStrToInt(Substr(m.vNewVal,  5, 4))
			._Right  = .ctlStrToInt(Substr(m.vNewVal,  9, 4))
			._Bottom = .ctlStrToInt(Substr(m.vNewVal, 13, 4))
		
			._Width  = ._Right - ._Left
			._Height = ._Bottom - ._Top
		Endwith
		
	ENDPROC

ENDDEFINE

DEFINE CLASS _scrollinfo AS _base OF "ctl32_structs.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	#INCLUDE "ctl32.h"
	*<DefinedPropArrayMethod>
		*p: _cbsize
		*p: _fmask
		*p: _nmax
		*p: _nmin
		*p: _npage
		*p: _npos
		*p: _ntrackpos
	*</DefinedPropArrayMethod>

	*<PropValue>
		Name = "_scrollinfo"
		_cbsize = 0
		_fmask = 0
		_nmax = 0
		_nmin = 0
		_npage = 0
		_npos = 0
		_ntrackpos = 0
		_structlen = 28
	*</PropValue>
	
	PROCEDURE _struct_access
		*!*	typedef struct tagSCROLLINFO {
		*!*	    UINT cbSize;							4
		*!*	    UINT fMask;								4
		*!*	    int  nMin;								4
		*!*	    int  nMax;								4
		*!*	    UINT nPage;								4
		*!*	    int  nPos;								4
		*!*	    int  nTrackPos;							4
		*!*	}   SCROLLINFO, *LPSCROLLINFO;				28
		*!*	typedef SCROLLINFO CONST *LPCSCROLLINFO;
		
		With This
			._cbSize = 28
			._Struct = ;
				.ctlIntToStr(._cbSize) + ;
				.ctlIntToStr(._fMask) + ;
				.ctlIntToStr(._nMin) + ;
				.ctlIntToStr(._nMax) + ;
				.ctlIntToStr(._nPage) + ;
				.ctlIntToStr(._nPos) + ;
				.ctlIntToStr(._nTrackPos)
		Endwith
		
		Return This._Struct
		
	ENDPROC

ENDDEFINE

DEFINE CLASS _tcitem AS _base OF "ctl32_structs.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	#INCLUDE "ctl32.h"
	*<DefinedPropArrayMethod>
		*p: _cchtextmax
		*p: _dwstate
		*p: _dwstatemask
		*p: _iimage
		*p: _lparam
		*p: _lpsztext
		*p: _lpsztextstring
		*p: _mask
	*</DefinedPropArrayMethod>

	*<PropValue>
		Name = "_tcitem"
		_cchtextmax = 0
		_dwstate = 0
		_dwstatemask = 0
		_iimage = 0
		_lparam = 0
		_lpsztext = 0
		_lpsztextstring = 
		_mask = 0
		_structlen = 28
	*</PropValue>
	
	PROCEDURE Destroy
		If This._lpszText <> 0 Then
			This.ctlFreeMemory(This._lpszText)
		Endif
		
	ENDPROC

	PROCEDURE _struct_access
		*!* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/tab/structures/tcitem.asp
		
		*!*	typedef struct tagTCITEM {
		*!*	    UINT mask;				4
		*!*	#if (_WIN32_IE >= 0x0300)
		*!*	    DWORD dwState;			4
		*!*	    DWORD dwStateMask;		4
		*!*	#else
		*!*	    UINT lpReserved1;
		*!*	    UINT lpReserved2;
		*!*	#endif
		*!*	    LPTSTR pszText;			4
		*!*	    int cchTextMax;			4
		*!*	    int iImage;				4
		*!*	    LPARAM lParam;			4
		*!*	} TCITEM, *LPTCITEM;
		
		If This._lpszText <> 0 Then
			This.ctlFreeMemory(This._lpszText)
			This._lpszText = 0
		Endif
		
		If Vartype(This._lpszTextString) <> T_CHARACTER Then
			This._lpszTextString = []
		Endif
		
		This._lpszTextString = Alltrim(This._lpszTextString)
		
		If Len(This._lpszTextString) = 0 Then
			This._lpszText = 0
		Else
			If Right(This._lpszTextString, 1) <> Chr(0) Then
				This._lpszTextString = This._lpszTextString + Chr(0)
			Endif
			This._lpszText = This.ctlWriteMemory(This._lpszTextString)
		Endif
		
		This._cchTextMax = Len(This._lpszTextString)
		
		With This
			._Struct = ;
				.ctlIntToStr(._mask) + ;
				.ctlIntToStr(._dwState) + ;
				.ctlIntToStr(._dwStateMask) + ;
				.ctlIntToStr(._lpszText) + ;
				.ctlIntToStr(._cchTextMax) + ;
				.ctlIntToStr(._iImage) + ;
				.ctlIntToStr(._lParam)
		Endwith
		
		Return This._Struct
		
	ENDPROC

ENDDEFINE

DEFINE CLASS _toolinfo AS _base OF "ctl32_structs.vcx" 
 	*< CLASSDATA: Baseclass="custom" Timestamp="" Scale="Pixels" Uniqueid="" />

	#INCLUDE "ctl32.h"
	*<DefinedPropArrayMethod>
		*p: uid
		*p: _bottom
		*p: _cbsize
		*p: _hbitmap
		*p: _hinst
		*p: _hwnd
		*p: _left
		*p: _lparam
		*p: _lpreserved
		*p: _lpsztext
		*p: _lpsztextstring
		*p: _rect
		*p: _right
		*p: _top
		*p: _uflags
		*p: _uid
	*</DefinedPropArrayMethod>

	*<PropValue>
		Name = "_toolinfo"
		uid = 
		_bottom = 0
		_cbsize = 0
		_hbitmap = 0
		_hinst = 0
		_hwnd = 0
		_left = 0
		_lparam = 0
		_lpreserved = 0
		_lpsztext = 0
		_lpsztextstring = 
		_rect = 0
		_right = 0
		_structlen = 0
		_top = 0
		_uflags = 0
		_uid = 0
	*</PropValue>
	
	PROCEDURE Destroy
		If This._lpszText <> 0 Then
			This.ctlFreeMemory(This._lpszText)
		Endif
		
	ENDPROC

	PROCEDURE Init
		*!* http://windowssdk.msdn.microsoft.com/en-us/library/ms650460.aspx
		
		*!*	typedef struct tagTOOLINFO{
		*!*	    UINT      cbSize;		4
		*!*	    UINT      uFlags; 		4
		*!*	    HWND      hwnd; 		4
		*!*	    UINT_PTR  uId; 			4
		*!*	LONG left;					4
		*!*	LONG top; 					4
		*!*	LONG right;					4
		*!*	LONG bottom;				4
		*!*	    HINSTANCE hinst; 		4
		*!*	    LPTSTR    lpszText; 	4
		*!*	#if (_WIN32_IE >= 0x0300)
		*!*	    LPARAM lParam;			4
		*!*	#endif
		*!*	#if (_WIN32_WINNT >= 0x0501)
		*!*	    void *lpReserved;		4
		*!*	#endif
		*!*	#if (_WIN32_WINNT >= 0x0600)
		*!*	    HBITMAP hbmp;			4
		*!*	#endif
		*!*	} TOOLINFO, NEAR *PTOOLINFO, *LPTOOLINFO;
		
		DoDefault()
		
		This._cbSize = 44
		
		If This.ctlOS() >= CON_OS_WINXP Then
			This._cbSize = 48
		Endif
		
		*!* Vista 5600 does not work
		*If Val(Os(3)) * 100 + Val(Os(4)) >= 600 Then
		*	This._cbSize = 52
		*Endif
		
	ENDPROC

	PROCEDURE _struct_access
		*!* http://windowssdk.msdn.microsoft.com/en-us/library/ms650460.aspx
		
		*!*	typedef struct tagTOOLINFO{
		*!*	    UINT      cbSize;		4
		*!*	    UINT      uFlags; 		4
		*!*	    HWND      hwnd; 		4
		*!*	    UINT_PTR  uId; 			4
		*!*	LONG left;					4
		*!*	LONG top; 					4
		*!*	LONG right;					4
		*!*	LONG bottom;				4
		*!*	    HINSTANCE hinst; 		4
		*!*	    LPTSTR    lpszText; 	4
		*!*	#if (_WIN32_IE >= 0x0300)
		*!*	    LPARAM lParam;			4
		*!*	#endif
		*!*	#if (_WIN32_WINNT >= 0x0501)
		*!*	    void *lpReserved;		4
		*!*	#endif
		*!*	#if (_WIN32_WINNT >= 0x0600)
		*!*	    HBITMAP hbmp;			4
		*!*	#endif
		*!*	} TOOLINFO, NEAR *PTOOLINFO, *LPTOOLINFO;
		
		
		
		If This._lpszText <> 0 Then
			This.ctlFreeMemory(This._lpszText)
			This._lpszText = 0
		Endif
		
		If Vartype(This._lpszTextString) <> T_CHARACTER Then
			This._lpszTextString = []
		Endif
		
		This._lpszTextString = Alltrim(This._lpszTextString)
		
		If Len(This._lpszTextString) = 0 Then
			This._lpszText = 0
		Else
			If Right(This._lpszTextString, 1) <> Chr(0) Then
				This._lpszTextString = This._lpszTextString + Chr(0)
			Endif
			This._lpszText = This.ctlWriteMemory(This._lpszTextString)
		Endif
		
		*This._lpszText = This.ctlWriteMemory(This._lpszTextString)
		
		With This
			._Struct = ;
				.ctlIntToStr(._cbSize) + ;
				.ctlIntToStr(._uFlags) + ;
				.ctlIntToStr(._hwnd) + ;
				.ctlIntToStr(._uId) + ;
				.ctlIntToStr(._left) + ;
				.ctlIntToStr(._top) + ;
				.ctlIntToStr(._right) + ;
				.ctlIntToStr(._bottom) + ;
				.ctlIntToStr(._hinst) + ;
				.ctlIntToStr(._lpszText) + ;
				.ctlIntToStr(._lParam)
		
			If This.ctlOS() >= CON_OS_WINXP Then
				._Struct = ._Struct + .ctlIntToStr(._lpReserved)
			Endif
		
			*!* Vista 5600 does not work
		*	If Val(Os(3)) * 100 + Val(Os(4)) >= 600 Then
		*		._Struct = ._Struct + .ctlIntToStr(._hBitmap)
		*	Endif
		
		Endwith
		
		Return This._Struct
		
	ENDPROC

	PROCEDURE _struct_assign
		*!* http://windowssdk.msdn.microsoft.com/en-us/library/ms650460.aspx
		
		*!*	typedef struct tagTOOLINFO{
		*!*	    UINT      cbSize;		4
		*!*	    UINT      uFlags; 		4
		*!*	    HWND      hwnd; 		4
		*!*	    UINT_PTR  uId; 			4
		*!*	LONG left;					4
		*!*	LONG top; 					4
		*!*	LONG right;					4
		*!*	LONG bottom;				4
		*!*	    HINSTANCE hinst; 		4
		*!*	    LPTSTR    lpszText; 	4
		*!*	#if (_WIN32_IE >= 0x0300)
		*!*	    LPARAM lParam;			4
		*!*	#endif
		*!*	#if (_WIN32_WINNT >= 0x0501)
		*!*	    void *lpReserved;		4
		*!*	#endif
		*!*	#if (_WIN32_WINNT >= 0x0600)
		*!*	    HBITMAP hbmp;			4
		*!*	#endif
		*!*	} TOOLINFO, NEAR *PTOOLINFO, *LPTOOLINFO;
		
		Lparameters vNewVal
		
		This._struct = m.vNewVal
		
		With This
			._cbSize = 		.ctlStrToInt(Substr(m.vNewVal,  1, 4))
			._uFlags = 		.ctlStrToInt(Substr(m.vNewVal,  5, 4))
			._hwnd = 		.ctlStrToInt(Substr(m.vNewVal,  9, 4))
			._uId = 		.ctlStrToInt(Substr(m.vNewVal, 13, 4))
			._left =  		.ctlStrToInt(Substr(m.vNewVal, 17, 4))
			._top =  		.ctlStrToInt(Substr(m.vNewVal, 21, 4))
			._right = 		.ctlStrToInt(Substr(m.vNewVal, 25, 4))
			._bottom = 		.ctlStrToInt(Substr(m.vNewVal, 29, 4))
			._hinst = 		.ctlStrToInt(Substr(m.vNewVal, 33, 4))
			._lpszText = 	.ctlStrToInt(Substr(m.vNewVal, 37, 4))
			._lParam = 		.ctlStrToInt(Substr(m.vNewVal, 41, 4))
		
			If This.ctlOS() >= CON_OS_WINXP Then
				._lpReserved = 	.ctlStrToInt(Substr(m.vNewVal, 45, 4))
			Endif
		
			*!* Vista 5600 does not work
		*	If Val(Os(3)) * 100 + Val(Os(4)) >= 600 Then
		*		._hBitmap = 	.ctlStrToInt(Substr(m.vNewVal, 49, 4))
		*	Endif
		
		Endwith
		
	ENDPROC

ENDDEFINE
