[!newguid(InterfaceGUID)]

[!Dialog("Names", "ObjDlg", "CtlDlg", "StockProps")]

[!strcpy(UpperShortName, ShortName)]
[!toupper(UpperShortName)]

[!AddStringToSymbol(HeaderTemplate, GalleryPath, "control.h")]
[!AddStringToSymbol(CPPTemplate, GalleryPath, "control.cpp")]
[!AddStringToSymbol(RGSTemplate, GalleryPath, "control.rgs")]
[!AddStringToSymbol(HTMTemplate, GalleryPath, "default.htm")]

[!target(HeaderName)]
[!include(HeaderTemplate)]
[!target()]

[!target(CPPName)]
[!include(CPPTemplate)]
[!target()]

[!AddStringToSymbol(RGSName, ShortName, ".rgs")]

[!target(RGSName)]
[!include(RGSTemplate)]
[!target()]

[!AddStringToSymbol(HTMName, ShortName, ".htm")]

[!target(HTMName)]
[!include(HTMTemplate)]
[!target()]

[!AddStringToSymbol(IDLProject, ProjectName, ".idl")]
[!AddStringToSymbol(IDLInterface, GalleryPath, "ctlint.idl")]
[!AddStringToSymbol(IDLCoClass, GalleryPath, "ctlco.idl")]
[!AddInterfaceToIDL(IDLProject, IDLInterface)]
[!AddCoClassToIDL(IDLProject, IDLCoClass)]

[!AddToObjectMap(CoClassName, ClassName)]

[!AddSymbolToString(header, "\"", HeaderName)]
[!AddStringToSymbol(header, header, "\"")]
[!AddIncludeFile(ProjectNameCPP,  header)]

[!set(stdafx.h, "stdafx.h")]
[!set(stdafx.cpp, "stdafx.cpp")]
[!set(atlctl.h, "<atlctl.h>")]
[!set(atlctl.cpp, "<atlctl.cpp>")]
[!set(atlwin.cpp, "<atlwin.cpp>")]
[!set(olectl.h, "<olectl.h>")]
[!AddIncludeFile(stdafx.h, atlctl.h)]
[!AddIncludeFile(stdafx.cpp, atlctl.cpp)]
[!AddIncludeFile(stdafx.cpp, atlwin.cpp)]
[!AddImportFile(IDLProject, "oaidl.idl")]
[!AddImportFile(IDLProject, "ocidl.idl")]
[!AddIncludeFile(IDLProject, olectl.h)]

[!AddFileToProject(CPPName)]
[!AddFileToProject(HeaderName)]

[!AddSymbolToString(IDR_REGISTRYID, "IDR_", UpperShortName)]
[!AddRegistryToRC(RGSName, IDR_REGISTRYID)]
