Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

CMFCButton does not receive WM_TOUCH events

$
0
0

I am writing an MFC desktop app using Visual Studio 2013. I derived a class from CMFCButton. I have overridden the OnTouchInput() function in this class. I have overridden the PreSubclassWindow() function and call the RegisterTouchWindow() there. However, OnTouchInput() never gets called. Using Spy++ I never see any WM_TOUCH messages even generated for this MFC button control. If I do the exact same thing but derive my button class from CButton instead instead of CMFCButton it works just like I want. I would rather use the CMFCButton as the base class because of the visual appearance it gives to the buttons. What is MFC doing to the WM_TOUCH messages and how do I work around this?

The reason I ask is because of the delay before receiving the WM_LBUTTONDOWN message when using the touchscreen to click on the MFC button. I want to receive the WM_LBUTTONDOWN as soon as the user presses a MFC button using the touchscreen.



Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>