0

How to go about implementing a user activity logger in MFC application.To get to know what are all the features are used most in an existing application.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
yesraaj
  • 46,370
  • 69
  • 194
  • 251

1 Answers1

0

You can override the windows procedure of your application window:

class CMyMainWindow {
    void LogUsageData(UINT message);
    virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam) {
          LogData(message);
          return CWnd::WindowProc(message, wParam, lParam); // route message to message map
     }
}

Note that the task is not so trivial: LogUsageData should discard most messages, focusing only on the ones defined in the message map.
However, this should be a good place to start.

rob
  • 36,896
  • 2
  • 55
  • 65