I have a MFC application. I want to statistic every button click, including button ID and time. Can I do it in CWinApp::PreTranslateMessage(MSG* pMsg)
or CWnd::PreTranslateMessage(MSG* pMsg)
? And how?
Asked
Active
Viewed 45 times
0

Andrew Truckle
- 17,769
- 16
- 66
- 164
1 Answers
0
For your own app catching WM_CHAR should do the job, but if you are looking to catch key strokes for the entire system a hook dll, using SetWindowsHookEx, is what you need.

RonTLV
- 2,376
- 2
- 24
- 38
-
How will catching WM_CHAR help in counting BM_CLICK notification messages? – Michaël Roy Jul 20 '17 at 01:05