home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / audio / acmapp / tlb.h < prev    next >
C/C++ Source or Header  |  1997-10-05  |  4KB  |  161 lines

  1. //==========================================================================;
  2. //
  3. //  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4. //  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5. //  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6. //  PURPOSE.
  7. //
  8. //  Copyright (C) 1992 - 1997 Microsoft Corporation.  All Rights Reserved.
  9. //--------------------------------------------------------------------------;
  10. //
  11. //  tlb.h
  12. //
  13. //  Description:
  14. //      Contains function prototypes for the tabbed listbox functions in
  15. //      tlb.c.  Also contains Win16/Win32 portability definitions.
  16. //
  17. //
  18. //==========================================================================;
  19.  
  20. #ifndef _INC_TLB
  21. #define _INC_TLB                    // #defined if file has been included
  22.  
  23. #ifndef RC_INVOKED
  24. #pragma pack(1)                     // assume byte packing throughout
  25. #endif
  26.  
  27. #ifndef EXTERN_C
  28. #ifdef __cplusplus
  29.     #define EXTERN_C extern "C"
  30. #else
  31.     #define EXTERN_C extern 
  32. #endif
  33. #endif
  34.  
  35. #ifdef __cplusplus
  36. extern "C"                          // assume C declarations for C++
  37. {
  38. #endif
  39.  
  40. #ifdef WIN32
  41.     //
  42.     //  for compiling Unicode
  43.     //
  44.     #ifndef SIZEOF
  45.     #ifdef UNICODE
  46.         #define SIZEOF(x)       (sizeof(x)/sizeof(WCHAR))
  47.     #else
  48.         #define SIZEOF(x)       sizeof(x)
  49.     #endif
  50.     #endif
  51. #else
  52.     //
  53.     //  stuff for Unicode in Win 32--make it a noop in Win 16
  54.     //
  55.     #ifndef TEXT
  56.     #define TEXT(a)             a
  57.     #endif
  58.  
  59.     #ifndef SIZEOF
  60.     #define SIZEOF(x)           sizeof(x)
  61.     #endif
  62.  
  63.     #ifndef _TCHAR_DEFINED
  64.         #define _TCHAR_DEFINED
  65.         typedef char            TCHAR, *PTCHAR;
  66.         typedef unsigned char   TBYTE, *PTUCHAR;
  67.  
  68.         typedef PSTR            PTSTR, PTCH;
  69.         typedef LPSTR           LPTSTR, LPTCH;
  70.         typedef LPCSTR          LPCTSTR;
  71.     #endif
  72. #endif
  73.  
  74.  
  75. //
  76. //
  77. //
  78. //
  79. typedef struct tTABBEDLISTBOX
  80. {
  81.     HWND            hlb;
  82.  
  83.     int             nFontHeight;
  84.     RECT            rc;
  85.  
  86.     UINT            uTabStops;
  87.     PINT            panTabs;
  88.     PINT            panTitleTabs;
  89.  
  90.     UINT            cchTitleText;
  91.     PTSTR           pszTitleText;
  92.  
  93. } TABBEDLISTBOX, *PTABBEDLISTBOX;
  94.  
  95.  
  96. #define TLB_MAX_TAB_STOPS           20      // max number of columns
  97. #define TLB_MAX_TITLE_CHARS         512
  98.  
  99.  
  100. //
  101. //
  102. //
  103. //
  104. //
  105. BOOL FAR PASCAL TlbPaint
  106. (
  107.     PTABBEDLISTBOX          ptlb,
  108.     HWND                    hwnd,
  109.     HDC                     hdc
  110. );
  111.  
  112. BOOL FAR PASCAL TlbMove
  113. (
  114.     PTABBEDLISTBOX          ptlb,
  115.     PRECT                   prc,
  116.     BOOL                    fRedraw
  117. );
  118.  
  119. HFONT FAR PASCAL TlbSetFont
  120. (
  121.     PTABBEDLISTBOX          ptlb,
  122.     HFONT                   hfont,
  123.     BOOL                    fRedraw
  124. );
  125.  
  126. BOOL FAR PASCAL TlbSetTitleAndTabs
  127. (
  128.     PTABBEDLISTBOX          ptlb,
  129.     PTSTR                   pszTitleFormat,
  130.     BOOL                    fRedraw
  131. );
  132.  
  133. PTABBEDLISTBOX FAR PASCAL TlbDestroy
  134. (
  135.     PTABBEDLISTBOX          ptlb
  136. );
  137.  
  138. PTABBEDLISTBOX FAR PASCAL TlbCreate
  139. (
  140.     HWND                    hwnd,
  141.     int                     nId,
  142.     PRECT                   prc
  143. );
  144.  
  145.  
  146. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; 
  147. //
  148. //
  149. //
  150. //- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; 
  151.  
  152. #ifndef RC_INVOKED
  153. #pragma pack()                      // revert to default packing
  154. #endif
  155.  
  156. #ifdef __cplusplus
  157. }                                   // end of extern "C" { 
  158. #endif
  159.  
  160. #endif // _INC_TLB
  161.