Hi. I've just started using VC++, and I'm trying to work out how to capture mouse / keybutton strokes. I have a simple dialog, and I'm capturing all the mouse stuff ok, but the windows message handler I've added for keystrokes just doesn't seem to do anything! Basically, if the user presses the c button on the keyboard, I want it to have the same effect as clicking the Clear button on the dialog, so I did this (mapped to a WM_CHAR message)

Code:
void CPaintORamaDlg::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) 
{
	if( nChar == 'c' )
		OnClearbtn();
}
I also tried mapping an identical function to a WM_KEYDOWN message, but when I run the program, and press c, nothing happens.

Can someone please explain what I'm missing?

Thanks.