Mercurial > vba-clojure
diff src/win32/BitmapControl.h @ 1:f9f4f1b99eed
importing src directory
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:31:27 -0600 |
parents | |
children |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/win32/BitmapControl.h Sat Mar 03 10:31:27 2012 -0600 1.3 @@ -0,0 +1,75 @@ 1.4 +#if !defined(AFX_BITMAPCONTROL_H__2434AADB_B6A5_4E43_AA16_7B65B6F7FA26__INCLUDED_) 1.5 +#define AFX_BITMAPCONTROL_H__2434AADB_B6A5_4E43_AA16_7B65B6F7FA26__INCLUDED_ 1.6 + 1.7 +#if _MSC_VER > 1000 1.8 +#pragma once 1.9 +#endif // _MSC_VER > 1000 1.10 +// BitmapControl.h : header file 1.11 +// 1.12 +#ifndef WM_MAPINFO 1.13 +#define WM_MAPINFO WM_APP+101 1.14 +#endif 1.15 + 1.16 +///////////////////////////////////////////////////////////////////////////// 1.17 +// BitmapControl view 1.18 + 1.19 +class BitmapControl : public CScrollView 1.20 +{ 1.21 +public: 1.22 + BitmapControl(); // protected constructor used by dynamic creation 1.23 +protected: 1.24 + DECLARE_DYNCREATE(BitmapControl) 1.25 + 1.26 + // Attributes 1.27 +public: 1.28 + // Operations 1.29 +public: 1.30 + void setStretch(bool b); 1.31 + void refresh(); 1.32 + void setSize(int w1, int h1); 1.33 + void setData(u8 *d); 1.34 + void setBmpInfo(BITMAPINFO *info); 1.35 + static bool isRegistered; 1.36 + 1.37 + // Overrides 1.38 + // ClassWizard generated virtual function overrides 1.39 + //{{AFX_VIRTUAL(BitmapControl) 1.40 +protected: 1.41 + virtual void OnDraw(CDC*pDC); // overridden to draw this view 1.42 + virtual void OnInitialUpdate(); // first time after construct 1.43 + virtual void PostNcDestroy(); 1.44 + //}}AFX_VIRTUAL 1.45 + 1.46 + // Implementation 1.47 +public: 1.48 + bool getStretch(); 1.49 + virtual ~BitmapControl(); 1.50 +protected: 1.51 +#ifdef _DEBUG 1.52 + virtual void AssertValid() const; 1.53 + virtual void Dump(CDumpContext& dc) const; 1.54 +#endif 1.55 + 1.56 + // Generated message map functions 1.57 + //{{AFX_MSG(BitmapControl) 1.58 + afx_msg BOOL OnEraseBkgnd(CDC*pDC); 1.59 + afx_msg void OnSize(UINT nType, int cx, int cy); 1.60 + afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 1.61 + //}}AFX_MSG 1.62 + DECLARE_MESSAGE_MAP() 1.63 +private: 1.64 + void registerClass(); 1.65 + bool stretch; 1.66 + u8 colors[3*64]; 1.67 + BITMAPINFO *bmpInfo; 1.68 + u8 * data; 1.69 + int h; 1.70 + int w; 1.71 +}; 1.72 + 1.73 +///////////////////////////////////////////////////////////////////////////// 1.74 + 1.75 +//{{AFX_INSERT_LOCATION}} 1.76 +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 1.77 + 1.78 +#endif // !defined(AFX_BITMAPCONTROL_H__2434AADB_B6A5_4E43_AA16_7B65B6F7FA26__INCLUDED_)