How to pass WM_CTLCOLORBTN to a ActiveX Control
Posted on 1998-08-05
I'm trying to send a WM_CTLCOLORBTN message to a Active Control. That control has been created by the MFC Control Wizard.
Using other application, I'm calling the PostMessage to send WM_CTLCOLORBTN msg to the ActiveX Control, but it isn't receiving the msg.
I've put the ON_MESSAGE( WM_CTLCOLORBTN, OnColorBtn ) statement inside the Control and implemented the OnColorBtn() method.
I've seen that no message arrived in OnColorBtn.
Important: I did the following test:
I replaced WM_CTLCOLORBTN by a WM_USER + xxx and it worked. So, it seems that there's some trick to MFC ActiveX work with WM_CTLCOLORBTN.