home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / objmodel / appdefs.h < prev    next >
C/C++ Source or Header  |  1998-05-05  |  5KB  |  151 lines

  1. // Microsoft Visual Studio Object Model
  2. // Copyright (C) 1996-1997 Microsoft Corporation
  3. // All rights reserved.
  4.  
  5. /////////////////////////////////////////////////////////////////////////////
  6. // appdefs.h
  7.  
  8. // Declaration of constants and error IDs used by objects in the type library
  9. //  VISUAL STUDIO 97 SHARED OBJECTS (SharedIDE\bin\devshl.dll)
  10.  
  11. #ifndef __APPDEFS_H__
  12. #define __APPDEFS_H__
  13.  
  14.  
  15. ///////////////////////////////////////////////////////////////////////
  16. // Enumerations used by Automation Methods
  17.  
  18. // Application.WindowState
  19. enum DsWindowState
  20. {
  21.     dsWindowStateMaximized    = 1,
  22.     dsWindowStateMinimized    = 2,    
  23.     dsWindowStateNormal        = 3,
  24. };
  25.  
  26. // Windows.Arrange()
  27. enum DsArrangeStyle
  28. {
  29.     dsMinimize            = 1,
  30.     dsTileHorizontal    = 2,
  31.     dsTileVertical        = 3,
  32.     dsCascade            = 4
  33. };
  34.  
  35. // Application.AddCommandBarButton
  36. enum DsButtonType
  37. {
  38.     dsGlyph            = 1,
  39.     dsText            = 2
  40. };
  41.  
  42. // Save, Close, SaveAll CloseAll
  43. enum DsSaveChanges
  44. {
  45.     dsSaveChangesYes    = 1, 
  46.     dsSaveChangesNo        = 2,
  47.     dsSaveChangesPrompt    = 3
  48. };
  49.  
  50. // Return value for Save, Close, SaveAll, CloseAll
  51. enum DsSaveStatus
  52. {
  53.     dsSaveSucceeded    = 1,    // The Save was successful.
  54.     dsSaveCanceled    = 2        // The Save was canceled
  55. };
  56.  
  57.  
  58. ///////////////////////////////////////////////////////////////////////
  59. // Error constants returned by Automation Methods.
  60.  
  61. #define DS_E_START               0x8004A000
  62.  
  63. // general failure
  64. #define DS_E_UNKNOWN            0x8004A000
  65.  
  66. // The user gave an incorrect parameter VALUE (type is OK, but the value
  67. // is not).
  68. #define DS_E_BAD_PARAM_VALUE    0x8004A001
  69.  
  70. // The user tried to manipulate a Document object whose associated
  71. // document in the IDE has been closed.
  72. #define DS_E_DOC_RELEASED        0x8004A002
  73.  
  74. // The user tried to manipulate a Window object whose associated
  75. // window in the IDE has been closed.
  76. #define DS_E_WINDOW_RELEASED        0x8004A003
  77.  
  78. // The user tried to access a method or property on an object after
  79. // Visual Studio was requested to be shut down (via the UI or
  80. // the Application::Quit method), but before the object was
  81. // released.  In this state, although the object still exists,
  82. // its methods and properties all throw this error.
  83. #define DS_E_SHUTDOWN_REQUESTED        0x8004A012
  84.  
  85. // The user tried to add a command bar button for a non-existent command.
  86. #define DS_E_COMMAND_NOT_EXIST        0x8004A013
  87.  
  88. // AddCommandBarButton failed.  The command which the caller wishes to
  89. //  to be assigned to a toolbar button does exist, but an unexpected
  90. //  error occurred while trying to create the button itself.
  91. #define DS_E_CANT_ADD_CMDBAR_BUTTON    0x8004A014
  92.  
  93. // These errors are used by the project build systems. When a makefile is
  94. // loaded which needs to be converted, one of these errors will be
  95. // generation.  If the makefile was generated with VC the first error 
  96. // will have. If the makefile was created with an older version of 
  97. // Visual Studio, the other error will be sent.
  98. #define DS_E_PROJECT_OLD_MAKEFILE_VC        0x8004A015
  99. #define DS_E_PROJECT_OLD_MAKEFILE_DEVSTUDIO    0x8004A016
  100.  
  101. // The project system generates this error when attempting to open an
  102. // external makefile.
  103. #define DS_E_PROJECT_EXTERNAL_MAKEFILE        0x8004A017
  104.  
  105. // Cannot create a new window.
  106. #define DS_E_CANNOTCREATENEWWINDOW            0x8004A018
  107.  
  108. // The window specified by the Item method's index cannot be found.
  109. #define DS_E_CANNOT_FIND_WINDOW                0x8004A019
  110.  
  111. // The document specified by the Item method's index cannot be found.
  112. #define DS_E_CANNOT_FIND_DOCUMENT            0x8004A01A
  113.  
  114. // The project system generates this error when attempting to open a
  115. // project file of a future format
  116. #define DS_E_PROJECT_FUTURE_FORMAT        0x8004A01B
  117.  
  118. //
  119. // File IO Errors - Used by Open, Close, CloseAll, Save, SaveAll, etc...
  120. //
  121. // The following errors are mapped from CFileException
  122.  
  123. #define DS_E_FILENOTFOUND        0x8004A004
  124.  
  125. #define DS_E_ENDOFFILE            0x8004A005
  126.  
  127. // All or part of the path is invalid.
  128. #define DS_E_BADPATH             0x8004A006
  129.  
  130. //The file could not be accessed.
  131. #define DS_E_ACCESSDENIED         0x8004A007
  132.  
  133. //There was an attempt to use an invalid file handle.
  134. #define DS_E_INVALIDFILE         0x8004A008    
  135.  
  136. //The disk is full.
  137. #define DS_E_DISKFULL             0x8004A009    
  138.  
  139. #define DS_E_SHARINGVIOLATION    0x8004A00A
  140.  
  141. // The following are file errors are not part of CFileException.
  142.  
  143. // File is ReadOnly on disk.
  144. #define DS_E_READONLY            0x8004A010
  145.  
  146. // The document does not have a filename and cannot be saved.
  147. #define DS_E_NOFILENAME            0x8004A011
  148.  
  149.  
  150. #endif // __APPDEFS_H__
  151.