Re: Easy way to have CButton handle its own ON_BN_CLICKED
- From: "bhu Boue vidya" <bhuvidya@xxxxxxxxxxxx>
- Date: 11 Aug 2006 10:49:19 -0700
in your button class use the following message map:
ON_CONTROL_REFLECT(BN_CLICKED, OnHandler)
for even more power see ON_CONTROL_REFLECT_EX()
hth
bhu
James B. wrote:
I'm trying to develop some generic controls for our App.
I want to subclass off of CButton, and then have this class handle it's own
ON_BN_CLICKED. I looked into mesesage reflection but that didnt' seem quite
right. I just want my new button class to handle button clicks not the parent
window.
I guess I could just handle the Left button down in my new button class and
assume this is a button click but figured there might be a more
straightforward way to have my class based on CButton get the ON_BN_CLICKED
or equiv.
Thanks much
James
.
- Prev by Date: Re: How to set up search path in MFC?
- Next by Date: Re: Easy way to have CButton handle its own ON_BN_CLICKED
- Previous by thread: How to set up search path in MFC?
- Next by thread: Re: Easy way to have CButton handle its own ON_BN_CLICKED
- Index(es):