home *** CD-ROM | disk | FTP | other *** search
- // OcrFrame.cpp : implementation of the COcrDemoFrame class
- //
-
- #include "stdafx.h"
- #include "Ocrdemo.h"
- #include "OcrFrame.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // COcrDemoFrame
-
- IMPLEMENT_DYNCREATE(COcrDemoFrame, CFrameWnd)
-
- BEGIN_MESSAGE_MAP(COcrDemoFrame, CFrameWnd)
- //{{AFX_MSG_MAP(COcrDemoFrame)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code !
- ON_WM_QUERYNEWPALETTE()
- ON_WM_PALETTECHANGED()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // COcrDemoFrame construction/destruction
-
- COcrDemoFrame::COcrDemoFrame()
- {
- // TODO: add member initialization code here
-
- }
-
- COcrDemoFrame::~COcrDemoFrame()
- {
- }
-
- BOOL COcrDemoFrame::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
-
- return CFrameWnd::PreCreateWindow(cs);
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // COcrDemoFrame diagnostics
-
- #ifdef _DEBUG
- void COcrDemoFrame::AssertValid() const
- {
- CFrameWnd::AssertValid();
- }
-
- void COcrDemoFrame::Dump(CDumpContext& dc) const
- {
- CFrameWnd::Dump(dc);
- }
-
- #endif //_DEBUG
-
- /////////////////////////////////////////////////////////////////////////////
- // COcrDemoFrame message handlers
-
- BOOL COcrDemoFrame::OnQueryNewPalette()
- {
- if (GetActiveFrame() != this)
- {
- return FALSE;
- }
-
- CView* pView = GetActiveView();
-
- return (BOOL)pView->SendMessage(WM_DOREALIZE, (WPARAM)m_hWnd, (LPARAM)FALSE);
- }
-
- void COcrDemoFrame::OnPaletteChanged(CWnd* pFocusWnd)
- {
- CFrameWnd::OnPaletteChanged(pFocusWnd);
-
- if (GetActiveFrame() != this)
- {
- return;
- }
-
- SendMessageToDescendants(WM_DOREALIZE, (WPARAM)pFocusWnd->m_hWnd, (LPARAM)TRUE);
- }
-
- /////////////////////////////////////////////////////////////////////////////
-