home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / common / msdev98 / template / atl / object.ctl < prev    next >
Text File  |  1998-06-16  |  1KB  |  51 lines

  1. [!newguid(InterfaceGUID)]
  2. [!Dialog("Names98", "ObjDlg98")]
  3. [!if=(ConnectionPointsEnabled, "TRUE")]
  4. [!newguid(InterfaceGUIDCP)]
  5. [!endif]
  6.  
  7. [!strcpy(UpperShortName, ShortName)]
  8. [!toupper(UpperShortName)]
  9.  
  10. [!AddStringToSymbol(HeaderTemplate, GalleryPath, "object.h")]
  11. [!AddStringToSymbol(CPPTemplate, GalleryPath, "object.cpp")]
  12. [!AddStringToSymbol(RGSTemplate, GalleryPath, "object.rgs")]
  13.  
  14. [!AddSymbolToSymbol(RGSName, ProjectDirectory, ShortName)]
  15. [!AddStringToSymbol(RGSName, RGSName, ".rgs")]
  16.  
  17. [!target(RGSName)]
  18. [!include(RGSTemplate)]
  19. [!target()]
  20.  
  21. [!AddSymbolToString(IDR_REGISTRYID, "IDR_", UpperShortName)]
  22. [!AddRegistryToRC(RGSName, IDR_REGISTRYID)]
  23.  
  24. [!target(HeaderName)]
  25. [!include(HeaderTemplate)]
  26. [!target()]
  27.  
  28. [!target(CPPName)]
  29. [!include(CPPTemplate)]
  30. [!target()]
  31.  
  32. [!AddStringToSymbol(IDLInterface, GalleryPath, "objint.idl")]
  33. [!AddStringToSymbol(IDLCoClass, GalleryPath, "objco.idl")]
  34. [!AddInterfaceToIDL(IDLProject, IDLInterface)]
  35. [!AddCoClassToIDL(IDLProject, IDLCoClass)]
  36.  
  37.  
  38. [!target(IDLName)]
  39. [!include(IDLTemplate)]
  40. [!target()]
  41.  
  42. [!AddToObjectMap(CoClassName, ClassName)]
  43.  
  44. [!AddSymbolToString(header, "\"", HeaderName)]
  45. [!AddStringToSymbol(header, header, "\"")]
  46. [!AddImportFile(IDLProject, "oaidl.idl")]
  47. [!AddIncludeFile(ProjectNameCPP,  header)]
  48.  
  49. [!AddFileToProject(CPPName)]
  50. [!AddFileToProject(HeaderName)]
  51.