![]() |
Removing Toolbar button focus |
Post Reply
|
| Author | |
g_j_a_i_n
Groupie
Joined: 27 August 2005 Status: Offline Points: 94 |
Post Options
Thanks(0)
Quote Reply
Topic: Removing Toolbar button focusPosted: 07 September 2005 at 3:00am |
|
Hello, I have an application where each toolbar button shows a menu. When i click on each button consecutively, the buttons do not lose focus. It remains highlighted (orange color) See the attached image. Please let me know how the focus can be removed when the user moves from one button to another. Another related problem is that if a dialog is shown on clicking the toolbar button, the focus is not gone until the dialog box is closed. Please let me know the solution for this problem. Regards, Gautam Jain 2005-09-07_030032_ToolbarButtons.zip |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 September 2005 at 3:51am |
|
As you can see DialogSample code, you must add ON_MESSAGE(WM_KICKIDLE, OnKickIdle) LRESULT CDialogSampleDlg::OnKickIdle(WPARAM, LPARAM)
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
g_j_a_i_n
Groupie
Joined: 27 August 2005 Status: Offline Points: 94 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 September 2005 at 4:24am |
|
Oleg, I tried what you suggested, but it did not work. Mine is a MainFrame, so WM_KICKIDLE is not kicked by default. So I used SendMessage in my CWinApp::OnIdle function to send WM_KICKIDLE message Still the toolbar button remains focused. In my first post I attached a GIF file. Please have a look at it. It is very urgent. Regards, Gautam Jain |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 September 2005 at 6:37am |
|
This sceenshot give m nothing, I need project to see what you do, to debug/test. Create new simple application, copy logic from your one and attach here. |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
g_j_a_i_n
Groupie
Joined: 27 August 2005 Status: Offline Points: 94 |
Post Options
Thanks(0)
Quote Reply
Posted: 08 September 2005 at 11:39pm |
|
Oleg. I fixed the problem by calling pControl->SetPressed(FALSE) immediately after TrackPopupMenu. So once the menu is closed, the button (pControl) is set back to normal state. Thanks for your care. Regards, Gautam Jain |
|
![]() |
|
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 |