开发者

CButton encapsulate button press event handling

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜