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 / util.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-03-27  |  2.0 KB  |  57 lines

  1. // util.h
  2.  
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1998 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #ifndef _UTIL_H_
  14. #define _UTIL_H_
  15.  
  16. /// Utilities
  17. #define RCF_NORMAL      0x0000
  18. #define RCF_ITALIC      0x0001
  19. #define RCF_UNDERLINE   0x0002
  20. #define RCF_STRIKEOUT   0x0004
  21. #define RCF_BOLD        0x0008
  22. #define RCF_NODEFAULT   0x0010
  23. #define RCF_TRUETYPEONLY 0x0011
  24.  
  25. void ErrorMessage( const CString& str, HRESULT hr ) ;
  26.  
  27. CFont *ReallyCreateFont( HDC hDC, LPTSTR lpszFace, LPTSTR lpszStyle, UINT nPointSize, UINT uiFlags ) ;
  28.  
  29. LPTSTR FAR PASCAL PointerToNthField(LPTSTR lpszString, int nField, TCHAR chDelimiter) ;
  30.  
  31. LONG WINAPI ParseOffNumber( LPTSTR FAR *lplp, LPINT lpConv ) ;
  32.  
  33. void WINAPI DlgCenter( HWND hwndCenter, HWND hwndWithin, BOOL fClient ) ;
  34. void bmColorTranslateDC( CDC* pdcMem, BITMAP *pBM, COLORREF rgbOld,  COLORREF rgbNew ) ;
  35. void bmColorTranslate( CBitmap* pbmSrc, COLORREF rgbNew ) ;
  36. CBitmap* bmLoadAndTranslate( UINT id, COLORREF rgb );
  37. void DrawListBoxBitmap( CDC* pdc, CBitmap *pbmt, int x,  int y ) ;
  38. int WINAPI GetTextMetricsCorrectly( HDC hDC, LPTEXTMETRIC lpTM ) ;
  39.  
  40. typedef struct FAR tagCOLUMNSTRUCT
  41. {
  42.    int   nLeft ;       // starting x position of the column
  43.    int   nRight ;      // ending x position of the column
  44.    UINT  uiFlags ;      // format flags
  45.  
  46. } COLUMNSTRUCT, *PCOLUMNSTRUCT, FAR *LPCOLUMNSTRUCT ;
  47.  
  48. void WINAPI ColumnTextOut( CDC* pDC, int nX, int nY, CString* pStr,
  49.                             int cColumns, LPCOLUMNSTRUCT rgColumns ) ;
  50. LPTSTR HRtoString( HRESULT hr ) ;
  51. LPTSTR VTtoString( VARTYPE vt ) ;
  52.  
  53. VOID WINAPI StripFilespec( LPTSTR lpszPath ) ;
  54. VOID WINAPI AddBackslash( LPTSTR lpszPath ) ;
  55.  
  56. #endif
  57.