rlm@1: #if !defined(AFX_BITMAPCONTROL_H__2434AADB_B6A5_4E43_AA16_7B65B6F7FA26__INCLUDED_) rlm@1: #define AFX_BITMAPCONTROL_H__2434AADB_B6A5_4E43_AA16_7B65B6F7FA26__INCLUDED_ rlm@1: rlm@1: #if _MSC_VER > 1000 rlm@1: #pragma once rlm@1: #endif // _MSC_VER > 1000 rlm@1: // BitmapControl.h : header file rlm@1: // rlm@1: #ifndef WM_MAPINFO rlm@1: #define WM_MAPINFO WM_APP+101 rlm@1: #endif rlm@1: rlm@1: ///////////////////////////////////////////////////////////////////////////// rlm@1: // BitmapControl view rlm@1: rlm@1: class BitmapControl : public CScrollView rlm@1: { rlm@1: public: rlm@1: BitmapControl(); // protected constructor used by dynamic creation rlm@1: protected: rlm@1: DECLARE_DYNCREATE(BitmapControl) rlm@1: rlm@1: // Attributes rlm@1: public: rlm@1: // Operations rlm@1: public: rlm@1: void setStretch(bool b); rlm@1: void refresh(); rlm@1: void setSize(int w1, int h1); rlm@1: void setData(u8 *d); rlm@1: void setBmpInfo(BITMAPINFO *info); rlm@1: static bool isRegistered; rlm@1: rlm@1: // Overrides rlm@1: // ClassWizard generated virtual function overrides rlm@1: //{{AFX_VIRTUAL(BitmapControl) rlm@1: protected: rlm@1: virtual void OnDraw(CDC*pDC); // overridden to draw this view rlm@1: virtual void OnInitialUpdate(); // first time after construct rlm@1: virtual void PostNcDestroy(); rlm@1: //}}AFX_VIRTUAL rlm@1: rlm@1: // Implementation rlm@1: public: rlm@1: bool getStretch(); rlm@1: virtual ~BitmapControl(); rlm@1: protected: rlm@1: #ifdef _DEBUG rlm@1: virtual void AssertValid() const; rlm@1: virtual void Dump(CDumpContext& dc) const; rlm@1: #endif rlm@1: rlm@1: // Generated message map functions rlm@1: //{{AFX_MSG(BitmapControl) rlm@1: afx_msg BOOL OnEraseBkgnd(CDC*pDC); rlm@1: afx_msg void OnSize(UINT nType, int cx, int cy); rlm@1: afx_msg void OnLButtonDown(UINT nFlags, CPoint point); rlm@1: //}}AFX_MSG rlm@1: DECLARE_MESSAGE_MAP() rlm@1: private: rlm@1: void registerClass(); rlm@1: bool stretch; rlm@1: u8 colors[3*64]; rlm@1: BITMAPINFO *bmpInfo; rlm@1: u8 * data; rlm@1: int h; rlm@1: int w; rlm@1: }; rlm@1: rlm@1: ///////////////////////////////////////////////////////////////////////////// rlm@1: rlm@1: //{{AFX_INSERT_LOCATION}} rlm@1: // Microsoft Visual C++ will insert additional declarations immediately before the previous line. rlm@1: rlm@1: #endif // !defined(AFX_BITMAPCONTROL_H__2434AADB_B6A5_4E43_AA16_7B65B6F7FA26__INCLUDED_)