From: boca4711 <boc...@us...> - 2004-11-21 14:13:14
|
Update of /cvsroot/anyedit/AnyEditToolkit/GuiLib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22408/GuiLib Added Files: MyDialogBar.cpp MyDialogBar.h Log Message: Dialog bar class for print preview --- NEW FILE: MyDialogBar.h --- #if !defined(AFX_MYDIALOGBAR_H__496315A1_5B64_11D6_AD8C_00B0D0652E95__INCLUDED_) #define AFX_MYDIALOGBAR_H__496315A1_5B64_11D6_AD8C_00B0D0652E95__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // MyDialogBar.h : header file // ///////////////////////////////////////////////////////////////////////////// // CMyDialogBar window class CMyDialogBar : public CDialogBar { // Construction public: CMyDialogBar(); // Attributes public: void SetViewPointer(CView* pView) { ASSERT(pView) ; ASSERT(pView->IsKindOf(RUNTIME_CLASS(CView))) ; m_pView = pView ; } ; private: CView *m_pView ; // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMyDialogBar) //}}AFX_VIRTUAL // Implementation public: virtual ~CMyDialogBar(); // Generated message map functions protected: //{{AFX_MSG(CMyDialogBar) // NOTE - the ClassWizard will add and remove member functions here. //}}AFX_MSG afx_msg void OnRegisteredMouseWheel(WPARAM wParam, LPARAM lParam) ; DECLARE_MESSAGE_MAP() }; ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_MYDIALOGBAR_H__496315A1_5B64_11D6_AD8C_00B0D0652E95__INCLUDED_) --- NEW FILE: MyDialogBar.cpp --- // MyDialogBar.cpp : implementation file // #include "stdafx.h" #include "MyDialogBar.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // CMyDialogBar CMyDialogBar::CMyDialogBar() { } CMyDialogBar::~CMyDialogBar() { } BEGIN_MESSAGE_MAP(CMyDialogBar, CDialogBar) //{{AFX_MSG_MAP(CMyDialogBar) // NOTE - the ClassWizard will add and remove mapping macros here. //}}AFX_MSG_MAP ON_MESSAGE(WM_MOUSEWHEEL, OnRegisteredMouseWheel) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CMyDialogBar message handlers void CMyDialogBar::OnRegisteredMouseWheel(WPARAM wParam, LPARAM lParam) { // just forward these onto the defined view if (m_pView != NULL) { m_pView->SendMessage(WM_MOUSEWHEEL, wParam, lParam) ; } } |