GME  13
PreviewWnd.h
Go to the documentation of this file.
00001 #if !defined(AFX_PREVIEWWND_H__C6E81D92_54EA_4673_B02F_6507CA7F76DD__INCLUDED_)
00002 #define AFX_PREVIEWWND_H__C6E81D92_54EA_4673_B02F_6507CA7F76DD__INCLUDED_
00003 
00004 #if _MSC_VER > 1000
00005 #pragma once
00006 #endif // _MSC_VER > 1000
00007 // PreviewWnd.h : header file
00008 //
00009 
00011 // CPreviewBtn window
00012 
00013 class CPreviewBtn : public CButton
00014 {
00015 // Construction
00016 public:
00017         CPreviewBtn();
00018 
00019 // Attributes
00020 public:
00021         void SetDC(CDC *bitmapDC) 
00022         {
00023                 if (m_bitmapDC) 
00024                 {
00025                         CBitmap *bmp = m_bitmapDC->GetCurrentBitmap();
00026                         delete m_bitmapDC; 
00027                         if (bmp)
00028                                 delete bmp;
00029                 }
00030                 m_bitmapDC = bitmapDC;
00031         }
00032         void DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct );
00033 
00034 private:
00035         CDC *   m_bitmapDC;
00036 
00037 // Operations
00038 public:
00039 
00040 // Overrides
00041         // ClassWizard generated virtual function overrides
00042         //{{AFX_VIRTUAL(CPreviewBtn)
00043         //}}AFX_VIRTUAL
00044 
00045 // Implementation
00046 public:
00047         virtual ~CPreviewBtn();
00048 
00049         // Generated message map functions
00050 protected:
00051         //{{AFX_MSG(CPreviewBtn)
00052 //      afx_msg void OnPaint();
00053 //      afx_msg BOOL OnEraseBkgnd(CDC* pDC);
00054         //}}AFX_MSG
00055         DECLARE_MESSAGE_MAP()
00056 };
00057 
00059 
00060 //{{AFX_INSERT_LOCATION}}
00061 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00062 
00063 #endif // !defined(AFX_PREVIEWWND_H__C6E81D92_54EA_4673_B02F_6507CA7F76DD__INCLUDED_)