GME  13
PanningViewDlg.cpp
Go to the documentation of this file.
00001 // PanningViewDlg.cpp : implementation file
00002 //
00003 
00004 #include "stdafx.h"
00005 #include "PanningViewDlg.h"
00006 
00007 #ifdef _DEBUG
00008 #define new DEBUG_NEW
00009 #undef THIS_FILE
00010 static char THIS_FILE[] = __FILE__;
00011 #endif
00012 
00014 // CPanningViewDlg dialog
00015 
00016 CPanningViewDlg::CPanningViewDlg(CWnd* pParent /*=NULL*/)
00017         : CDialog(CPanningViewDlg::IDD, pParent)
00018 {
00019         //{{AFX_DATA_INIT(CPanningViewDlg)
00020                 // NOTE: the ClassWizard will add member initialization here
00021         //}}AFX_DATA_INIT
00022 }
00023 
00024 
00025 void CPanningViewDlg::DoDataExchange(CDataExchange* pDX)
00026 {
00027         CDialog::DoDataExchange(pDX);
00028         //{{AFX_DATA_MAP(CPanningViewDlg)
00029         DDX_Control(pDX, IDC_PREVIEW, m_pvbutton);
00030         //}}AFX_DATA_MAP
00031 }
00032 
00033 BOOL CPanningViewDlg::OnInitDialog()
00034 {
00035         BOOL ret = CDialog::OnInitDialog();
00036         // TODO: Error checking
00037         m_pvbutton.Create();
00038         return ret;
00039 }
00040 
00041 void CPanningViewDlg::SetBitmapDC(HWND owner, HDC bdc, HBITMAP oldBmp, CRect& ori, CRect& rect, COLORREF& bkgrnd)
00042 {
00043         m_pvbutton.SetBitmapDC(owner, bdc, oldBmp, ori, rect, bkgrnd);
00044 }
00045 
00046 void CPanningViewDlg::SetViewRect(CRect& vrect)
00047 {
00048         m_pvbutton.SetViewRect(vrect);
00049 }
00050 
00051 
00052 BEGIN_MESSAGE_MAP(CPanningViewDlg, CDialog)
00053         //{{AFX_MSG_MAP(CPanningViewDlg)
00054         ON_WM_SIZE()
00055         //}}AFX_MSG_MAP
00056 END_MESSAGE_MAP()
00057 
00059 // CPanningViewDlg message handlers
00060 
00061 void CPanningViewDlg::OnSize(UINT nType, int cx, int cy)
00062 {
00063         CDialog::OnSize(nType, cx, cy);
00064         
00065         CRect rc;
00066         GetClientRect(rc);
00067 
00068         if (m_pvbutton.m_hWnd)
00069                 m_pvbutton.MoveWindow(rc);
00070 }
00071 
00072