Click here to Skip to main content
15,895,084 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralUnexpted termination of Service. Pin
Prakash Nadar26-Dec-03 0:57
Prakash Nadar26-Dec-03 0:57 
GeneralCallback function Pin
Shah Shehpori26-Dec-03 0:46
sussShah Shehpori26-Dec-03 0:46 
GeneralRe: Callback function Pin
Gary R. Wheeler26-Dec-03 2:25
Gary R. Wheeler26-Dec-03 2:25 
GeneralCObList Pin
Ananya Kaul25-Dec-03 23:43
Ananya Kaul25-Dec-03 23:43 
GeneralRe: CObList Pin
Monty226-Dec-03 23:31
Monty226-Dec-03 23:31 
GeneralMessages problems Pin
Atlence25-Dec-03 22:20
Atlence25-Dec-03 22:20 
GeneralRe: Messages problems Pin
valikac26-Dec-03 5:38
valikac26-Dec-03 5:38 
GeneralRe: Messages problems Pin
Atlence26-Dec-03 14:06
Atlence26-Dec-03 14:06 
Thks! But with the code added in both the view and the main frame, I don't receive the WM_CHAR message.

Here is my code from my CView and CMainFrame classes:

<br />
// MainFrm.cpp <br />
//<br />
<br />
#include "stdafx.h"<br />
#include "Focus3.h"<br />
<br />
#include "MainFrm.h"<br />
#include ".\mainfrm.h"<br />
<br />
#ifdef _DEBUG<br />
#define new DEBUG_NEW<br />
#endif<br />
<br />
<br />
// CMainFrame<br />
<br />
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)<br />
<br />
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)<br />
	ON_WM_CREATE()<br />
	ON_WM_CHAR()<br />
	ON_WM_KILLFOCUS()<br />
END_MESSAGE_MAP()<br />
<br />
static UINT indicators[] =<br />
{<br />
	ID_SEPARATOR,          <br />
	ID_INDICATOR_CAPS,<br />
	ID_INDICATOR_NUM,<br />
	ID_INDICATOR_SCRL,<br />
};<br />
<br />
<br />
.....<br />
<br />
void CMainFrame::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)<br />
{<br />
	AfxMessageBox ("OnChar");<br />
<br />
	CFrameWnd::OnChar(nChar, nRepCnt, nFlags);<br />
}<br />
<br />
...<br />


and my CView class:
<br />
// Focus3View.cpp <br />
//<br />
<br />
#include "stdafx.h"<br />
#include "Focus3.h"<br />
<br />
#include "Focus3Doc.h"<br />
#include "Focus3View.h"<br />
#include ".\focus3view.h"<br />
<br />
#ifdef _DEBUG<br />
#define new DEBUG_NEW<br />
#endif<br />
<br />
<br />
// CFocus3View<br />
<br />
IMPLEMENT_DYNCREATE(CFocus3View, CHtmlEditView)<br />
<br />
BEGIN_MESSAGE_MAP(CFocus3View, CHtmlEditView)<br />
	// Commandes d'impression standard<br />
	ON_COMMAND(ID_FILE_PRINT, CHtmlEditView::OnFilePrint)<br />
	ON_WM_SETFOCUS()<br />
	ON_WM_KILLFOCUS()<br />
	ON_WM_CHAR()<br />
END_MESSAGE_MAP()<br />
<br />
BEGIN_DHTMLEDITING_CMDMAP(CFocus3View)<br />
	DHTMLEDITING_CMD_ENTRY(ID_EDIT_COPY, IDM_COPY)<br />
	DHTMLEDITING_CMD_ENTRY(ID_EDIT_CUT, IDM_CUT)<br />
	DHTMLEDITING_CMD_ENTRY(ID_EDIT_PASTE, IDM_PASTE)<br />
	DHTMLEDITING_CMD_ENTRY(ID_EDIT_UNDO, IDM_UNDO)<br />
END_DHTMLEDITING_CMDMAP()<br />
<br />
<br />
......<br />
<br />
void CFocus3View::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)<br />
{<br />
	AfxMessageBox ("OnChar");<br />
<br />
	CHtmlEditView::OnChar(nChar, nRepCnt, nFlags);<br />
}<br />



Thks in advance!
Appstmd
http://www.appstmd.com
Generalabout ScrollBar... Pin
Grrrr25-Dec-03 20:56
Grrrr25-Dec-03 20:56 
GeneralRe: about ScrollBar... Pin
Monty225-Dec-03 21:23
Monty225-Dec-03 21:23 
Questionhow to enumerate Input/Output devices ??? Pin
skpanda25-Dec-03 20:43
skpanda25-Dec-03 20:43 
AnswerRe: how to enumerate Input/Output devices ??? Pin
skpanda26-Dec-03 18:36
skpanda26-Dec-03 18:36 
GeneralRe: how to enumerate Input/Output devices ??? Pin
skpanda26-Dec-03 21:22
skpanda26-Dec-03 21:22 
AnswerRe: how to enumerate Input/Output devices ??? Pin
Monty226-Dec-03 23:35
Monty226-Dec-03 23:35 
GeneralRe: how to enumerate Input/Output devices ??? Pin
skpanda28-Dec-03 18:31
skpanda28-Dec-03 18:31 
GeneralRe: how to enumerate Input/Output devices ??? Pin
Monty228-Dec-03 21:01
Monty228-Dec-03 21:01 
GeneralRe: how to enumerate Input/Output devices ??? Pin
skpanda1-Jan-04 23:08
skpanda1-Jan-04 23:08 
QuestionHow to get all desktop icons? Pin
ioat25-Dec-03 19:16
ioat25-Dec-03 19:16 
GeneralRegarding drw_dxf.h Pin
cithu25-Dec-03 18:22
cithu25-Dec-03 18:22 
Questionhow to write and save ini files like some apps do with their ini's Pin
ELY M.25-Dec-03 18:04
ELY M.25-Dec-03 18:04 
AnswerRe: how to write and save ini files like some apps do with their ini's Pin
Michael Dunn25-Dec-03 19:12
sitebuilderMichael Dunn25-Dec-03 19:12 
GeneralRe: how to write and save ini files like some apps do with their ini's Pin
ELY M.25-Dec-03 21:24
ELY M.25-Dec-03 21:24 
GeneralRe: how to write and save ini files like some apps do with their ini's Pin
shultas26-Dec-03 4:27
shultas26-Dec-03 4:27 
AnswerRe: how to write and save ini files like some apps do with their ini's Pin
ELY M.26-Dec-03 12:49
ELY M.26-Dec-03 12:49 
GeneralRe: how to write and save ini files like some apps do with their ini's Pin
shultas26-Dec-03 14:01
shultas26-Dec-03 14:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.