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.

51 lines
1.7 KiB

  1. // GifConv.h : Declaration of the CGifConv
  2. #ifndef __GIFCONV_H_
  3. #define __GIFCONV_H_
  4. #include <iimgctx.h>
  5. #define COLOR1 (RGB(0,0,255))
  6. #define COLOR2 (RGB(0,255,0))
  7. struct ThreadData
  8. {
  9. HANDLE hEvent;
  10. HANDLE hExitThreadEvent;
  11. IImgCtx * pImgCtx;
  12. LPCWSTR pszBuffer;
  13. HRESULT * pHr;
  14. };
  15. class CICWGifConvert : public IICWGifConvert
  16. {
  17. public:
  18. // IICWGifConvert
  19. virtual HRESULT STDMETHODCALLTYPE GifToIcon(TCHAR * pszFile, UINT nIconSize, HICON* phIcon);
  20. virtual HRESULT STDMETHODCALLTYPE GifToBitmap(TCHAR * pszFile, HBITMAP* phBitmap);
  21. // IUNKNOWN
  22. virtual HRESULT STDMETHODCALLTYPE QueryInterface( REFIID theGUID, void** retPtr );
  23. virtual ULONG STDMETHODCALLTYPE AddRef( void );
  24. virtual ULONG STDMETHODCALLTYPE Release( void );
  25. CICWGifConvert(CServer * pServer);
  26. ~CICWGifConvert() {};
  27. private:
  28. DWORD m_dwClrDepth;
  29. HRESULT SynchronousDownload (IImgCtx* pIImgCtx, BSTR bstrFile);
  30. HICON ExtractImageIcon (SIZE* pSize, IImgCtx* pIImgCtx);
  31. HRESULT CreateImageAndMask (IImgCtx* pIImgCtx, HDC hdcScreen, SIZE * pSize, HBITMAP * phbmImage, HBITMAP * phbmMask);
  32. HRESULT StretchBltImage (IImgCtx* pIImgCtx, const SIZE* pSize, HDC hdcDst);
  33. BOOL ColorFill (HDC hdc, const SIZE* pSize, COLORREF clr);
  34. HRESULT CreateMask (IImgCtx* pIImgCtx, HDC hdcScreen, HDC hdc1, const SIZE * pSize, HBITMAP * phbMask);
  35. // Class object stuff
  36. LONG m_lRefCount;
  37. // Pointer to this component server's control object.
  38. CServer* m_pServer;
  39. };
  40. #endif //__GIFCONV_H_