![]() |
clicking disabled button in toolbar? |
Post Reply
|
| Author | |
Ashok
Senior Member
Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
Quote Reply
Topic: clicking disabled button in toolbar?Posted: 08 June 2007 at 4:07am |
|
Hi,
I have a problem when I am clicking the toolbar button. When I am going to click the disabled toolbar button I need to do the below code. But the commandbar doesn't supporting the code which is in red color (please see the below code). Is there is any alternate way in the commandbar code.
Note: Whenever I am going to click the disabled button it should not do anything.
The below code is in OnLButtonDown(...)
TOOLINFO ti = { 0 }; int nHit = OnToolHitTest( point, &ti ); int nDex = CommandToIndex( nHit ); if ( -1 < nDex && ( TBBS_DISABLED & GetButtonStyle( nDex ))) return; |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 June 2007 at 6:02am |
|
Hi,
with CommandBars you need somthing like
CXTPControl* pControl = GetControls()->HitTest(point);
if (pControl && !pControl->GetEnabled()) return;
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Ashok
Senior Member
Joined: 02 May 2007 Status: Offline Points: 164 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 June 2007 at 6:19am |
|
Hi Oleg,
Many Thanks. It works.
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |