Dib.h
上传用户:kssdz899
上传日期:2007-01-08
资源大小:79k
文件大小:1k
- #ifndef _DIB_H_
- #define _DIB_H_
- //////////////////////////////////
- // Device independent bitmap manager
- //
- #include "vfw.h"
- class CDib : public CBitmap
- {
- DECLARE_DYNCREATE(CDib)
- public:
- CDib();
- ~CDib();
- BOOL Load(LPCTSTR szPathName);
- BOOL Load(CFile &file);
- BOOL Draw(CDC& dc, const CRect* rcDst, const CRect* rcSrc);
- BOOL Draw(CDC* pDC);
- protected:
- HPALETTE m_pal;
- BITMAPINFOHEADER *m_pbmih;
- HDRAWDIB m_hdd;
- void DeleteObject();
- UINT GetNumPaletteColors();
- LPBYTE GetBits();
- BOOL CreatePalette();
- };
- BOOL DrawBitmap(CDC& dc, CBitmap* pbm);
- #endif