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 / inole / statint.h < prev    next >
C/C++ Source or Header  |  1995-05-03  |  2KB  |  94 lines

  1. /*
  2.  * STATINT.H
  3.  *
  4.  * Internal definitions and function prototypes for the StatStrip
  5.  * control.
  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 _STATINT_H_
  16. #define _STATINT_H_
  17.  
  18. #ifdef __cplusplus
  19. extern "C"
  20.     {
  21. #endif
  22.  
  23.  
  24.  
  25. //For loading the RCDATA mapping menu item IDs to string IDs
  26. typedef struct tagSTATMESSAGEMAP
  27.     {
  28.     USHORT      uID;
  29.     USHORT      idsMsg;
  30.     } STATMESSAGEMAP, *PSTATMESSAGEMAP;
  31.  
  32. //Array mapping menu handles to menu item IDs
  33. typedef struct tagPOPUPMENUMAP
  34.     {
  35.     HMENU       hMenu;
  36.     USHORT      uID;
  37.     } POPUPMENUMAP, * PPOPUPMENUMAP;
  38.  
  39.  
  40.  
  41.  
  42. typedef struct tagSTATSTRIP
  43.     {
  44.     HFONT               hFont;      //Current control font
  45.     BOOL                fMyFont;
  46.  
  47.     BOOL                fMapped;    //StatStripMessageMap called?
  48.     HWND                hWndOwner;
  49.  
  50.     USHORT              cMessages;  //Total number of messages
  51.     UINT                idsMin;     //Starting string ID
  52.     UINT                idsMax;
  53.  
  54.     USHORT              uIDStatic;  //Quiescent message ID
  55.     USHORT              uIDBlank;   //Blank message ID
  56.     USHORT              uIDSysMenu; //System menu message ID
  57.  
  58.     HGLOBAL             hMemSMM;    //Handle to STATMESSAGEMAP data
  59.     PSTATMESSAGEMAP     pSMM;       //Memory holding STATMESSAGEMAP
  60.  
  61.     HGLOBAL             hMemSzStat; //Memory for Stat strings
  62.     LPTSTR *            ppsz;       //Stat string pointers
  63.  
  64.     USHORT              cPopups;
  65.     USHORT              uIDPopupMin;
  66.     USHORT              uIDPopupMax;
  67.     PPOPUPMENUMAP       pPMM;
  68.     } STATSTRIP, *PSTATSTRIP;
  69.  
  70.  
  71. #define CBSTATSTRIP             sizeof(STATSTRIP)
  72.  
  73. #define CBEXTRASTATSTRIP        sizeof(PSTATSTRIP)
  74. #define STATWL_STRUCTURE        0
  75.  
  76.  
  77. //STASTRIP.C
  78. LRESULT APIENTRY StatStripWndProc(HWND, UINT, WPARAM, LPARAM);
  79. void             StatStripPaint(HWND, PSTATSTRIP);
  80. USHORT           IDFromHMenu(PSTATSTRIP, HMENU);
  81. UINT             IStringFromID(PSTATMESSAGEMAP, USHORT, USHORT);
  82.  
  83. void             StatStripClean(PSTATSTRIP, BOOL);
  84. HGLOBAL          HStringCache(HINSTANCE, UINT, UINT, UINT, LPTSTR *);
  85. void             HStringCacheFree(HGLOBAL);
  86. void             StatMessageMapSort(PSTATMESSAGEMAP, USHORT);
  87.  
  88. #ifdef __cplusplus
  89.     }
  90. #endif
  91.  
  92.  
  93. #endif //_STATINT_H_
  94.