mfc - CMFCRibbonBar: GetEditText() doesn't return the actual edit box text of a CMFCRibbonComboBox unless window loses the focus -


I have a VS-2008 project in which there is a 'Find' panel with an editable combo box, along with further Backward search button. When I press a search button, GetEditText () returns an old value.

  CMainFrame * pFrame = static_cast & lt; CMainFrame * & gt; (GetTopLevelFrame ()); CMFCRibbonBar * pRibbon = pFrame-> GetRibbonBar (); ASSERT_VALID (pRibbon); CMFCRibbonComboBox * pFindCombobox = DYNAMIC_DOWNCAST (CMFCRibbonComboBox, pribbon- & gt; FindByID (ID_MY_FIND_COMBOBOX)); // This combo box returns the final value before making the editing field: pFindCombobox- & gt; GetEditText ();  

Is there a standard way to 'flush' the value of editing field content from the 'code' value buffer? GetEditText () ?

I saw VS2010 in the SetFocused () member CMFCRibbonPanel class, which can be used to steal focus from combobox and possibly : Force GetEditText () to return the correct value, but this VS is missing in 2008.

I am currently running out of ideas how to handle it. Hope someone has a clue.

For now, I have SetFocus () GetEditText () Before calling on the MDI in the hair window. But this is not the best solution to make sure!


Comments

Popular posts from this blog

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -

python - Writing Greek in matplotlib labels, titles -