![]() |
CXTPControlComboBox execute in OnKillFocus problem |
Post Reply ![]() |
Author | |
xafier ![]() Newbie ![]() Joined: 02 April 2008 Status: Offline Points: 7 |
![]() ![]() ![]() ![]() ![]() Posted: 12 May 2009 at 11:15am |
We have a CXTPControlComboBox on our ribbon that needs to perform an execute when it loses focus.
To do this I tried the following (RegionNameComboBox inherits from CXTPControlComboBox) void RegionNameComboBox::OnKillFocus() { OnExecute(); CXTPControlComboBox::OnKillFocus(); } The message fired by OnExecute is handled in our View class so this would now handle if the user presses enter or clicks off. Unfortunately this has undesirable effects, as if the user clicks off the combobox edit onto the "Ribbon Home button" (the circle button) then the ribbon home button then gets stuck and locked and no longer works. I am wondering what is the best way of implementing forcing an execute when losing focus which will not break the ribbon? |
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
What happens if you swap the two calls? E.g. CXTPControlComboBox::OnKillFocus() before OnExecute().
Another solution would be this:
void RegionNameComboBox::OnKillFocus()
{ CXTPControlComboBox::OnKillFocus(); PostMessage(WM_COMMAND, ID_EXECUTE);
} That should do it.
|
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
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 |