home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / com / inole2 / chap06 / objuser3 / objuser3.h < prev    next >
C/C++ Source or Header  |  1995-05-03  |  2KB  |  79 lines

  1. /*
  2.  * OBJUSER3.H
  3.  * Koala Client #3 Chapter 6
  4.  *
  5.  * Definitions and structures.
  6.  *
  7.  * Copyright (c)1993-1995 Microsoft Corporation, All Rights Reserved
  8.  *
  9.  * Kraig Brockschmidt, Microsoft
  10.  * Internet  :  kraigb@microsoft.com
  11.  * Compuserve:  >INTERNET:kraigb@microsoft.com
  12.  */
  13.  
  14.  
  15. #ifndef _OBJUSER3_H_
  16. #define _OBJUSER3_H_
  17.  
  18. #define CHAPTER6
  19. #include <inole.h>
  20. #ifdef WIN32
  21. #include <ianimal.h>
  22. #include <ikoala.h>
  23. #else
  24. //Non-MIDL generated versions
  25. #include <ianim16.h>
  26. #include <ikoala16.h>
  27. #endif
  28.  
  29. //Menu Resource ID and Commands
  30. #define IDR_MENU                    1
  31.  
  32.  
  33. #define IDM_OBJECTCREATE            100
  34. #define IDM_OBJECTRELEASE           101
  35. #define IDM_ANIMALEAT               102
  36. #define IDM_ANIMALSLEEP             103
  37. #define IDM_ANIMALPROCREATE         104
  38. #define IDM_ANIMALWHATKIND          105
  39. #define IDM_KOALACLIMB              106
  40. #define IDM_KOALAPOUCH              107
  41. #define IDM_KOALASLEEP              108
  42. #define IDM_OBJECTEXIT              109
  43.  
  44.  
  45.  
  46. //OBJUSER.CPP
  47. LRESULT APIENTRY ObjectUserWndProc(HWND, UINT, WPARAM, LPARAM);
  48.  
  49. class CApp
  50.     {
  51.     friend LRESULT APIENTRY ObjectUserWndProc(HWND, UINT, WPARAM
  52.         , LPARAM);
  53.  
  54.     protected:
  55.         HINSTANCE       m_hInst;            //WinMain parameters
  56.         HINSTANCE       m_hInstPrev;
  57.         UINT            m_nCmdShow;
  58.  
  59.         HWND            m_hWnd;             //Main window handle
  60.  
  61.         LPUNKNOWN       m_pIUnknown;        //IUnknown interface
  62.         BOOL            m_fInitialized;     //Did CoInitialize work?
  63.  
  64.     public:
  65.         CApp(HINSTANCE, HINSTANCE, UINT);
  66.         ~CApp(void);
  67.  
  68.         BOOL Init(void);
  69.         void Message(LPTSTR);
  70.     };
  71.  
  72. typedef CApp *PAPP;
  73.  
  74. #define CBWNDEXTRA              sizeof(PAPP)
  75. #define OBJUSERWL_STRUCTURE     0
  76.  
  77.  
  78. #endif //_OBJUSER3_H_
  79.