davidpcl1977
davidpcl1977

Reputation: 121

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.

Upvotes: 0

Views: 1290

Answers (1)

Adrian
Adrian

Reputation: 20078

Just try OnLButtonDown

Upvotes: 1

Related Questions