Source code of Windows XP (NT5)
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.

42 lines
1.3 KiB

  1. // --------------------------------------------------------------------------
  2. // Module Name: NineGrid2.h
  3. //
  4. // Copyright (c) 2000, 2001 Microsoft Corporation
  5. //
  6. // Interface to the DrawNineGrid2 function
  7. //
  8. // History: 2000-12-20 justmann created
  9. // --------------------------------------------------------------------------
  10. #ifndef _NINEGRID2_
  11. #define _NINEGRID2_
  12. #define NGI_ALPHA 0x00000001
  13. #define NGI_TRANS 0x00000002
  14. #define NGI_BORDERONLY 0x00000004
  15. typedef struct NGIMAGEtag
  16. {
  17. HBITMAP hbm;
  18. ULONG* pvBits;
  19. int iWidth;
  20. int iBufWidth;
  21. int iHeight;
  22. MARGINS margin;
  23. SIZINGTYPE eSize;
  24. DWORD dwFlags;
  25. COLORREF crTrans;
  26. } NGIMAGE, *PNGIMAGE;
  27. //---- these 2 functions should be called at PROCESS_ATTACH/DETACH ----
  28. BOOL NineGrid2StartUp();
  29. void NineGrid2ShutDown();
  30. HRESULT BitmapToNGImage(HDC hdc, HBITMAP hbm, int left, int top, int right, int bottom, MARGINS margin, SIZINGTYPE eSize, DWORD dwFlags, COLORREF crTrans, PNGIMAGE pngi);
  31. HRESULT FreeNGImage(PNGIMAGE pngi);
  32. #define DNG_MUSTFLIP 0x00000004
  33. #define DNG_FREE 0x00000008
  34. #define DNG_SOURCEFLIPPED 0x00000010
  35. HRESULT DrawNineGrid2(HDC hdc, PNGIMAGE pngiSrc, RECT* pRect, const RECT *prcClip, DWORD dwFlags);
  36. #endif //_NINEGRID2_