﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
2443	Name of nested structs	GtaSpider	Jon	"Hello,

as mentioned in this topic, i would realy like to see the ability to name nested structs.
http://www.autoitscript.com/forum/topic/154288-betastructs-and-nested-structs/

f.e. $tagMINMAXINFO: http://msdn.microsoft.com/en-us/library/windows/desktop/ms632605(v=vs.85).aspx consists of five POINT ($tagPOINT) structs. And these structs consits of two LONG variables. If you now could name these nested structs you could set them like on the example below. I don't know what would be better, maybe it would be smarter to set the name of the structure after the ENDSTRUCT keyword so you could use them like these

{{{
$tagMINMAXINFO = $tagPOINT&"" ptReserved; ""&$tagPOINT&"" ptMaxSize; [...]""
}}}

And the example:

{{{
#include <StructureConstants.au3>

#cs - Example 1
	Global Const $tagMINMAXINFO = ""struct ptReserved;long X;long Y;endstruct;"" & _
	""struct ptMaxSize;long X;long Y;endstruct;"" & _
	""struct ptMaxPosition;long X;long Y;endstruct;"" & _
	""struct ptMinTrackSize;long X;long Y;endstruct;"" & _
	""struct ptMaxTrackSize;long X;long Y;endstruct;""
#ce - Example 1

#region - Example 2, may the smarter option
Global Const $tagMINMAXINFO = $tagPOINT & "" ptReserved;"" & _
		$tagPOINT & "" ptMaxSize;"" & _
		$tagPOINT & "" ptMaxPosition;"" & _
		$tagPOINT & "" ptMinTrackSize;"" & _
		$tagPOINT & "" ptMaxTrackSize;""
#endregion - Example 2, may the smarter option


 
$tMINMAXINFO = DllStructCreate($tagMINMAXINFO)
 
;should be
$tMINMAXINFO.ptReserved.X = 12
ConsoleWrite('$tMINMAXINFO.ptReserved.X = ' & $tMINMAXINFO.ptReserved.X & @LF);empty (error)
 
;is actually
$tMINMAXINFO.X = 12
ConsoleWrite('$tMINMAXINFO.X = ' & $tMINMAXINFO.X & @LF);returns 12, but on which X?
 
;this works (first element: ptReserved.X)
ConsoleWrite('DllStructGetData($tMINMAXINFO,1,1) = ' & DllStructGetData($tMINMAXINFO, 1) & @LF);Returns 12
 
;the other X's are untouched
ConsoleWrite('DllStructGetData($tMINMAXINFO,3) = ' & DllStructGetData($tMINMAXINFO, 3) & @LF);Returns 0
 
;this works
DllStructSetData($tMINMAXINFO, 3, 5)
ConsoleWrite('DllStructGetData($tMINMAXINFO,3) = ' & DllStructGetData($tMINMAXINFO, 3) & @LF);Returns 5
}}}

Thanks in Advance,
Sincerely, 
your Spider.
p.s. thank you very much for your effort!"	Feature Request	assigned		AutoIt		None		nested structs	
