Click here to Skip to main content
15,886,067 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Here is your count down timer hasani2007 Pin
Software_Developer18-May-10 7:31
Software_Developer18-May-10 7:31 
GeneralRe: Here is your count down timer hasani2007 Pin
Stephen Hewitt18-May-10 14:04
Stephen Hewitt18-May-10 14:04 
AnswerRe: make a timer Pin
Aescleal19-May-10 5:49
Aescleal19-May-10 5:49 
Questionrecursive function Pin
hasani200717-May-10 22:26
hasani200717-May-10 22:26 
AnswerRe: recursive function Pin
CPallini17-May-10 22:45
mveCPallini17-May-10 22:45 
QuestionRe: recursive function Pin
David Crow19-May-10 3:52
David Crow19-May-10 3:52 
Questionsingel document app cannot recieve WM_KEYDOWN event Pin
dnqhung17-May-10 21:00
dnqhung17-May-10 21:00 
AnswerRe: singel document app cannot recieve WM_KEYDOWN event Pin
Aescleal18-May-10 5:12
Aescleal18-May-10 5:12 
Hi,

Somewhere in your implementation file for your view class you should see a horrific looking block of macros. It'll look something like:

BEGIN_MESSAGE_MAP(CMFC_testView, CView)
	ON_COMMAND(ID_FILE_PRINT, &CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, &CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, &CView::OnFilePrintPreview)
	ON_WM_KEYDOWN()
END_MESSAGE_MAP()


Has your block of macros got the line ON_WM_KEYDOWN() in it? If it hasn't then try sticking it in and seeing if the code starts magically working.

If it doesn't work then perhaps a session of delving into how MFC routes messages might be in order. Paul DiLascia wrote a decent article on it years ago for MSJ ("Meandering Through the Maze of MFC Message and Command Routing" http://www.microsoft.com/msj/0795/dilascia/dilascia.aspx[^]) about it and tells you why you need all those funky macros and why message handlers aren't virtual.

Hope that helps,

Cheers,

Ash
GeneralRe: singel document app cannot recieve WM_KEYDOWN event Pin
dnqhung18-May-10 15:33
dnqhung18-May-10 15:33 
GeneralRe: singel document app cannot recieve WM_KEYDOWN event Pin
Aescleal18-May-10 22:38
Aescleal18-May-10 22:38 
GeneralRe: singel document app cannot recieve WM_KEYDOWN event Pin
dnqhung21-May-10 15:57
dnqhung21-May-10 15:57 
QuestionObtaining the version info of external app [solved] Pin
PaulowniaK17-May-10 19:43
PaulowniaK17-May-10 19:43 
AnswerRe: Obtaining the version info of external app Pin
Stephen Hewitt17-May-10 20:42
Stephen Hewitt17-May-10 20:42 
GeneralRe: Obtaining the version info of external app Pin
PaulowniaK17-May-10 20:50
PaulowniaK17-May-10 20:50 
QuestionProblem with CreateFileMapping() window7/Vista. Pin
janaswamy uday17-May-10 19:41
janaswamy uday17-May-10 19:41 
AnswerRe: Problem with CreateFileMapping() window7/Vista. Pin
hanq_3891013017-May-10 20:59
hanq_3891013017-May-10 20:59 
AnswerRe: Problem with CreateFileMapping() window7/Vista. Pin
Richard MacCutchan17-May-10 21:37
mveRichard MacCutchan17-May-10 21:37 
Questionaudio chat Pin
69917-May-10 17:24
69917-May-10 17:24 
AnswerRe: audio chat Pin
Stephen Hewitt17-May-10 17:33
Stephen Hewitt17-May-10 17:33 
AnswerRe: audio chat Pin
Cedric Moonen17-May-10 20:20
Cedric Moonen17-May-10 20:20 
AnswerRe: audio chat Pin
CPallini17-May-10 23:23
mveCPallini17-May-10 23:23 
QuestionVisual Studio C++ Object Oriented Pin
RobNO17-May-10 12:26
professionalRobNO17-May-10 12:26 
AnswerRe: Visual Studio C++ Object Oriented Pin
chaau17-May-10 13:42
chaau17-May-10 13:42 
GeneralRe: Visual Studio C++ Object Oriented Pin
RobNO18-May-10 11:01
professionalRobNO18-May-10 11:01 
GeneralRe: Visual Studio C++ Object Oriented Pin
RobNO18-May-10 11:25
professionalRobNO18-May-10 11:25 

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.