home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / mfc / ole / oleview / oleview.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  2.3 KB  |  95 lines

  1. // oleview.h : main header file for the Ole2View application
  2. //
  3.  
  4. // This is a part of the Microsoft Foundation Classes C++ library.
  5. // Copyright (C) 1992-1998 Microsoft Corporation
  6. // All rights reserved.
  7. //
  8. // This source code is only intended as a supplement to the
  9. // Microsoft Foundation Classes Reference and related
  10. // electronic documentation provided with the library.
  11. // See these sources for detailed information regarding the
  12. // Microsoft Foundation Classes product.
  13.  
  14. #ifndef __AFXWIN_H__
  15.     #error include 'stdafx.h' before including this file for PCH
  16. #endif
  17.  
  18. #ifndef _Ole2View_H_
  19. #define _Ole2View_H_
  20.  
  21. #include "iviewers\\iviewers.h"
  22.  
  23. #include "resource.h"       // main symbols
  24. #include "util.h"
  25. #include "mainfrm.h"
  26. #include "doc.h"
  27.  
  28. #ifdef WIN32
  29.     #define GETCLASSUINT(hwnd, index)       (UINT)GetClassLong(hwnd, index)
  30.     #define GETCLASSBRBACKGROUND(hwnd)      (HBRUSH)GETCLASSUINT(hwnd, GCL_HBRBACKGROUND)
  31.     #define MGetModuleUsage(h)                  ((h), 2)
  32. #else
  33.     #define GETCLASSUINT(hwnd, index)       (UINT)GetClassWord(hwnd, index)
  34.     #define GETCLASSBRBACKGROUND(hwnd)      (HBRUSH)GETCLASSUINT(hwnd, GCW_HBRBACKGROUND)
  35.     #define MGetModuleUsage          GetModuleUsage
  36. #endif
  37.  
  38. // override CListBox so we pass WM_COMMANDHELP on
  39. //
  40. class CMyListBox : public CListBox
  41. {
  42. public:
  43.     DECLARE_DYNCREATE(CMyListBox)
  44.  
  45. protected:
  46.     afx_msg LRESULT OnCommandHelp(WPARAM, LPARAM lParam) ;
  47.  
  48.     DECLARE_MESSAGE_MAP()
  49. } ;
  50.  
  51. #include "regview.h"
  52. #include "obj_vw.h"
  53.  
  54. #define IDB_FIRST       IDB_QUESTION
  55. #define BMINDEX(x)      (x - IDB_FIRST)
  56.  
  57. /////////////////////////////////////////////////////////////////////////////
  58. // COle2ViewApp:
  59. // See Ole2View.cpp for the implementation of this class
  60. //
  61.  
  62. class COle2ViewApp : public CWinApp
  63. {
  64. public:
  65.     COle2ViewApp();
  66.  
  67.     CFont*   m_pFont ;
  68.     CFont*   m_pFontBold ;
  69.     UINT     m_cyFont ;
  70.  
  71.     CImageList    m_images ;
  72.  
  73.     CString     m_szStatusText ;
  74.  
  75.     void        LoadBitmaps(BOOL fFree);
  76.     void        FreeBitmaps();
  77. // Overrides
  78.     virtual BOOL InitInstance();
  79.     virtual int ExitInstance();
  80. // Implementation
  81.  
  82.     //{{AFX_MSG(COle2ViewApp)
  83.     afx_msg void OnAppAbout();
  84.     //}}AFX_MSG
  85.     DECLARE_MESSAGE_MAP()
  86. };
  87.  
  88. extern COle2ViewApp theApp ;
  89. #if _MFC_VER >= 0x0300
  90. extern OSVERSIONINFO  g_osvi ;
  91. #endif
  92.  
  93.  
  94. #endif // _Ole2View_H_
  95.