Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
3.7 KiB

  1. //
  2. // cuituil.h
  3. // = UI object library - util functions =
  4. //
  5. #ifndef CUIUTIL_H
  6. #define CUIUTIL_H
  7. //
  8. // user32 definition
  9. //
  10. #if (_WIN32_WINNT < 0x0500)
  11. // Window style
  12. #define WS_EX_LAYERED 0x00080000
  13. // UpdateLayeredWindow()
  14. #define LWA_COLORKEY 0x00000001
  15. #define LWA_ALPHA 0x00000002
  16. #define ULW_COLORKEY 0x00000001
  17. #define ULW_ALPHA 0x00000002
  18. #define ULW_OPAQUE 0x00000004
  19. #endif /* _WIN32_WINNT < 0x0500 */
  20. #if (WINVER < 0x0500)
  21. // AnimateWindow()
  22. #define AW_HOR_POSITIVE 0x00000001
  23. #define AW_HOR_NEGATIVE 0x00000002
  24. #define AW_VER_POSITIVE 0x00000004
  25. #define AW_VER_NEGATIVE 0x00000008
  26. #define AW_CENTER 0x00000010
  27. #define AW_HIDE 0x00010000
  28. #define AW_ACTIVATE 0x00020000
  29. #define AW_SLIDE 0x00040000
  30. #define AW_BLEND 0x00080000
  31. // minitor functions
  32. typedef struct tagMONITORINFO
  33. {
  34. DWORD cbSize;
  35. RECT rcMonitor;
  36. RECT rcWork;
  37. DWORD dwFlags;
  38. } MONITORINFO, *LPMONITORINFO;
  39. DECLARE_HANDLE(HMONITOR);
  40. #define MONITOR_DEFAULTTONULL 0x00000000
  41. #define MONITOR_DEFAULTTOPRIMARY 0x00000001
  42. #define MONITOR_DEFAULTTONEAREST 0x00000002
  43. #define MONITORINFOF_PRIMARY 0x00000001
  44. #endif /* WINVER < 0x0500 */
  45. //
  46. // user32 functions
  47. //
  48. extern BOOL CUIIsUpdateLayeredWindowAvail( void );
  49. extern BOOL CUIUpdateLayeredWindow( HWND hWnd, HDC hdcDst, POINT *pptDst, SIZE *psize, HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pblend, DWORD dwFlags );
  50. extern BOOL CUIIsMonitorAPIAvail( void );
  51. extern BOOL CUIGetMonitorInfo( HMONITOR hMonitor, LPMONITORINFO lpmi );
  52. extern HMONITOR CUIMonitorFromWindow( HWND hwnd, DWORD dwFlags );
  53. extern HMONITOR CUIMonitorFromRect( LPRECT prc, DWORD dwFlags );
  54. extern HMONITOR CUIMonitorFromPoint( POINT pt, DWORD dwFlags );
  55. extern void CUIGetScreenRect(POINT pt, RECT *prc);
  56. extern void CUIGetWorkAreaRect(POINT pt, RECT *prc);
  57. extern BOOL CUIIsAnimateWindowAvail( void );
  58. extern BOOL CUIAnimateWindow( HWND hwnd, DWORD dwTime, DWORD dwFlag );
  59. //
  60. // drawing functions
  61. //
  62. extern void InitUIFUtil();
  63. extern void DoneUIFUtil();
  64. extern int CUIDrawText( HDC hDC, LPCWSTR pwch, int cwch, RECT *prc, UINT uFormat );
  65. extern BOOL CUIExtTextOut( HDC hDC, int x, int y, UINT fuOptions, const RECT *prc, LPCWSTR pwch, UINT cwch, const int *lpDs );
  66. extern BOOL CUIGetTextExtentPoint32( HDC hDC, LPCWSTR pwch, int cwch, SIZE *psize );
  67. extern HBITMAP CreateMaskBmp(const RECT *prc, HBITMAP hbmp, HBITMAP hbmpMask, HBRUSH hbrBk, COLORREF colText, COLORREF colBk);
  68. extern HBITMAP CreateShadowMaskBmp(RECT *prc, HBITMAP hbmp, HBITMAP hbmpMask, HBRUSH hbrBk, HBRUSH hbrShadow);
  69. extern HBITMAP CreateDisabledBitmap(const RECT *prc, HBITMAP hbmpMask, HBRUSH hbrBk, HBRUSH hbrShadow, BOOL fShadow);
  70. extern HBRUSH CreateDitherBrush( void );
  71. extern void DrawMaskBmpOnDC(HDC hdc, const RECT *prc, HBITMAP hbmp, HBITMAP hbmpMask);
  72. extern BOOL CUIDrawState(HDC hdc, HBRUSH hbr, DRAWSTATEPROC lpOutputFunc, LPARAM lData, WPARAM wData, int x, int y, int cx, int cy, UINT fuFlags);
  73. extern BOOL CUIGetIconSize( HICON hIcon, SIZE *psize );
  74. extern BOOL CUIGetBitmapSize( HBITMAP hBmp, SIZE *psize );
  75. extern BOOL CUIGetIconBitmaps(HICON hIcon, HBITMAP *phbmp, HBITMAP *phbmpMask, SIZE *psize);
  76. extern DWORD CUIProcessDefaultLayout();
  77. extern DWORD CUISetLayout(HDC hdc, DWORD dw);
  78. extern HBITMAP CUIMirrorBitmap(HBITMAP hbmOrig, HBRUSH hbrBk);
  79. extern HMODULE CUIGetSystemModuleHandle(LPCTSTR lpModuleName);
  80. #endif /* CUIUTIL_H */