I am using a MFC link control in my dialog based application,and I add an event handler of BN_CLICKED for it, hoping that it could do something for me, however, when i click on it, it just does nothing at all(when i don’t set the url of it, when i set the url, it will jump to that url), my event handler is not triggered. So, how to disable its default “jump” behaviour and trigger my handler?
Share
Subclassing
CMFCLinkCtrland adding anON_WM_LBUTTONDOWNevent handler seems to work.You can then choose whether or not to call
CMFCLinkCtrl::OnLButtonDown.