I'm coding in C++/MFC on a Windows platform (using MS VS2008.) I have this Edit control (which is basically a text box) that is set to be read-only. The control displays some basic information. I want to add an "Easter Egg" to my app, i.e. when a user Ctrl+Shift clicks on this edit control it must display some additional info. The question is how to trap such a click event using MFC/native WinAPIs?
The most straight forward way is to subclass the edit control using SetWindowLong
and catch WM_LBUTTONDOWN
event. You'd then want to call GetAsyncKeyState
or equivalent to check whether the specific key is being pressed or not, and show the message.