BOOL CMFCToolBarsMenuPropertyPage::OnInitDialog(){ CPropertyPage::OnInitDialog(); if (m_iMenuAnimationType == (int) CMFCPopupMenu::SYSTEM_DEFAULT_ANIMATION) { m_iMenuAnimationType = m_wndMenuAnimations.GetCount() - 1; <---- using wndMenuAnimations.GetCount prior to populating the list! UpdateData(FALSE); }.... // Add menu animation values CString strAnimation; ENSURE(strAnimation.LoadString(IDS_AFXBARRES_MENU_ANIMATION_NONE)); m_wndMenuAnimations.InsertString(-1, strAnimation); ENSURE(strAnimation.LoadString(IDS_AFXBARRES_MENU_ANIMATION_UNFOLD)); m_wndMenuAnimations.InsertString(-1, strAnimation); ENSURE(strAnimation.LoadString(IDS_AFXBARRES_MENU_ANIMATION_SLIDE)); m_wndMenuAnimations.InsertString(-1, strAnimation); ENSURE(strAnimation.LoadString(IDS_AFXBARRES_MENU_ANIMATION_FADE)); m_wndMenuAnimations.InsertString(-1, strAnimation); ENSURE(strAnimation.LoadString(IDS_AFXBARRES_MENU_ANIMATION_DEFAULT)); m_wndMenuAnimations.InsertString(-1, strAnimation); UpdateData(FALSE); OnSelchangeMenuList(); }
Visual Studio/Team Foundation Server/.NET Framework Tooling version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results