开发者

CButton encapsulate button press event handling

开发者 https://www.devze.com 2023-03-13 08:13 出处:网络
I have a problem that I imagine is fairly easy to solve but is one of those things you probably know or you don\'t - and I don\'t!

I have a problem that I imagine is fairly easy to solve but is one of those things you probably know or you don't - and I don't!

I have created a class inherited from a CButton, and as part of the construction of this new class I pass in a pointer to a callback function which I need to trigger when the button is pressed.

The trouble is that I can't find an appropriate event to use 开发者_如何转开发within the inheritied CButton class itself as even such as BN_CLICKED only seem to work if trapped on the inherited CButton class' parent window.

Any help massively appreciated. Thanks, Dave.


Just try OnLButtonDown

0

精彩评论

暂无评论...
验证码 换一张
取 消