|
// MDIAppView.h : interface of the CMDIAppView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MDIAPPVIEW_H__0514391B_EC2D_41A4_A163_C62BA0BA84A8__INCLUDED_)
#define AFX_MDIAPPVIEW_H__0514391B_EC2D_41A4_A163_C62BA0BA84A8__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include "MyDoc.h"
#include "DocView\View.h"
class CMDIAppView : public CWindowImpl<CMDIAppView>, public CView
{
public:
DECLARE_WND_CLASS(NULL)
BOOL PreTranslateMessage(MSG* pMsg);
BEGIN_MSG_MAP(CMDIAppView)
MESSAGE_HANDLER(WM_PAINT, OnPaint)
MESSAGE_HANDLER(WM_SETFOCUS, OnSetFocus)
MESSAGE_HANDLER(WM_KILLFOCUS, OnKillFocus)
CHAIN_MSG_MAP_DYNAMIC (1)
END_MSG_MAP()
// Handler prototypes (uncomment arguments if needed):
// LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
// LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
// LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/)
LRESULT OnPaint(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
LRESULT OnSetFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
CMyDoc* pDoc = (CMyDoc*) GetDocument ();
if (pDoc)
{
pDoc->SetButtons ();
pDoc->UpdateButtons ();
}
bHandled = FALSE;
return 1;
}
LRESULT OnKillFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
CMyDoc* pDoc = (CMyDoc*) GetDocument ();
if (pDoc)
{
SetUpdateUI (pDoc->GetUpdateUI ());
m_pUpdateUI->UIEnable(ID_BLACK, FALSE);
m_pUpdateUI->UIEnable(ID_RED, FALSE);
m_pUpdateUI->UISetCheck(ID_BLACK, FALSE);
m_pUpdateUI->UISetCheck(ID_RED, FALSE);
}
bHandled = FALSE;
return 1;
}
void OnUpdate () {Invalidate();}
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MDIAPPVIEW_H__0514391B_EC2D_41A4_A163_C62BA0BA84A8__INCLUDED_)
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.