Voici le code de ma classe CMainFrame :
code: --------------------------------------------------------------------- // MainFrm.cpp //
#include "stdafx.h" #include "Focus3.h"
#include "MainFrm.h" #include ".\mainfrm.h"
#ifdef _DEBUG #define new DEBUG_NEW #endif
// CMainFrame
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd) ON_WM_CREATE() ON_WM_CHAR() ON_WM_KILLFOCUS() END_MESSAGE_MAP()
static UINT indicators[] = { ID_SEPARATOR, ID_INDICATOR_CAPS, ID_INDICATOR_NUM, ID_INDICATOR_SCRL, };
.....
void CMainFrame::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) { AfxMessageBox ("OnChar");
CFrameWnd::OnChar(nChar, nRepCnt, nFlags); }
... ----------------------------------------------------------------------
et de ma classe CView :
code: ----------------------------------------------------------------------
// Focus3View.cpp //
#include "stdafx.h" #include "Focus3.h"
#include "Focus3Doc.h" #include "Focus3View.h" #include ".\focus3view.h"
#ifdef _DEBUG #define new DEBUG_NEW #endif
// CFocus3View
IMPLEMENT_DYNCREATE(CFocus3View, CHtmlEditView)
BEGIN_MESSAGE_MAP(CFocus3View, CHtmlEditView) // Commandes d'impression standard ON_COMMAND(ID_FILE_PRINT, CHtmlEditView::OnFilePrint) ON_WM_SETFOCUS() ON_WM_KILLFOCUS() ON_WM_CHAR() END_MESSAGE_MAP()
BEGIN_DHTMLEDITING_CMDMAP(CFocus3View) DHTMLEDITING_CMD_ENTRY(ID_EDIT_COPY, IDM_COPY) DHTMLEDITING_CMD_ENTRY(ID_EDIT_CUT, IDM_CUT) DHTMLEDITING_CMD_ENTRY(ID_EDIT_PASTE, IDM_PASTE) DHTMLEDITING_CMD_ENTRY(ID_EDIT_UNDO, IDM_UNDO) END_DHTMLEDITING_CMDMAP()
......
void CFocus3View::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) { AfxMessageBox ("OnChar");
CHtmlEditView::OnChar(nChar, nRepCnt, nFlags); }
----------------------------------------------------------------------
|