home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / tutsamp / dcdserve / dcdserve.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-30  |  3.3 KB  |  100 lines

  1. /*+==========================================================================
  2.   File:      DCDSERVE.H
  3.  
  4.   Summary:   Main include file for the DCDSERVE.EXE sample application.
  5.              In addition to class definitions, this DCDSERVE.H file
  6.              contains definitions of the application's menu, string,
  7.              and other resource IDs.
  8.  
  9.              For a comprehensive tutorial code tour of DCDSERVE's contents
  10.              and offerings see the tutorial DCDSERVE.HTM file. For
  11.              more specific technical details on the internal workings see
  12.              the comments dispersed throughout the DCDSERVE source code.
  13.  
  14.   Classes:   CMainWindow.
  15.  
  16.   Functions: WinMain.
  17.  
  18.   Origin:    8-23-97: atrent - Editor-inheritance from LOCSERVE.H in
  19.                the LOCSERVE Tutorial Code Sample. [Revised]
  20.  
  21. ----------------------------------------------------------------------------
  22.   This file is part of the Microsoft COM Tutorial Code Samples.
  23.  
  24.   Copyright (C) Microsoft Corporation, 1997.  All rights reserved.
  25.  
  26.   This source code is intended only as a supplement to Microsoft
  27.   Development Tools and/or on-line documentation.  See these other
  28.   materials for detailed information regarding Microsoft code samples.
  29.  
  30.   THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  31.   KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  32.   IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  33.   PARTICULAR PURPOSE.
  34. ==========================================================================+*/
  35.  
  36. #if !defined(DCDSERVE_H)
  37. #define DCDSERVE_H
  38.  
  39. #ifdef __cplusplus
  40.  
  41. /*C+C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C+++C
  42.   Class:    CMainWindow
  43.  
  44.   Summary:  Class to encapsulate the application's main window, menu, and
  45.             message dispatching behavior.
  46.  
  47.   Methods:  CMainWindow
  48.               Constructor.
  49.             InitInstance
  50.               Creates a new instance of the main window.
  51. C---C---C---C---C---C---C---C---C---C---C---C---C---C---C---C---C---C---C-C*/
  52. class CMainWindow: public CVirWindow
  53. {
  54.   public:
  55.     CMainWindow();
  56.     ~CMainWindow();
  57.     BOOL InitInstance(HINSTANCE, int);
  58.  
  59.     // Methods for registering and unregistering this server.
  60.     BOOL RegisterServer(void);
  61.     BOOL UnregisterServer(void);
  62.  
  63.     TCHAR m_szFileName[MAX_PATH];
  64.  
  65.   protected:
  66.     LRESULT WindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
  67.  
  68.   private:
  69.     LRESULT DoMenu(WPARAM wParam, LPARAM lParam);
  70. };
  71.  
  72. #endif // __cplusplus
  73.  
  74. // Window Class String Macros.
  75. #define MAIN_WINDOW_TITLE_STR       "DCDSERVE: Tutorial Code Sample"
  76. #define MAIN_WINDOW_CLASS_NAME_STR  "DCDSERVEWindow"
  77. #define MAIN_WINDOW_CLASS_MENU_STR  "DCDSERVEMenu"
  78.  
  79. // File Menu Command Identifiers.
  80. #define IDM_FILE_EXIT               1000
  81.  
  82. // Help Menu Command Identifiers.
  83. #define IDM_HELP_ABOUT              1905
  84.  
  85. // Error-related String Identifiers.
  86. #define IDS_COMINITFAILED           2000
  87. #define IDS_APPINITFAILED           2001
  88. #define IDS_OUTOFMEMORY             2002
  89. #define IDS_NOHELPFILE              2003
  90. #define IDS_NOUNICODE               2004
  91. #define IDS_NODCOM                  2005
  92. #define IDS_NOSERVER                2006
  93.  
  94. #define IDS_ASSERT_FAIL             2200
  95.  
  96. // Notice-related String Identifiers.
  97. #define IDS_NOTIMPLEMENTED          2301
  98.  
  99. #endif // DCDSERVE_H
  100.