Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » OnPopupListBoxInitContent() not called. Collapse All
Subject Author Date
Robert Webb Nov 21, 2008 - 12:16 AM


Is there some trick to getting CMyRibbonBar::OnPopupListBoxInitContent() to be called back?  Although I can see that it is called in the ribbon MDI sample, it is not being called back in my own code, but I can’t spot the difference.

I add a drop-down to the ribbon bar like this:

    CExtCustomizeCmdTreeNode * node = new CExtRibbonNode(id);
    group->InsertNode(NULL, node);

Anything I should look for?



Technical Support Nov 21, 2008 - 10:38 AM

The thing which is absolutely number one any time and in any project too is to check the declaration of the virtual method which you are going to override:

   virtual bool OnPopupListBoxInitContent(
                        CExtBarButton * pTBB,
                        CExtCustomizeCmdTreeNode * pNode,
                        CListBox & wndListBox
The thing number two also happens very often: sometimes the compiler does not invoke virtual methods until you completely rebuild your project.

Robert Webb Nov 24, 2008 - 4:27 PM

Neither of these things were the problem, but I figured it out.  It was because I also had OnPopupListBoxInitContent() defined in the CMainFrame, and that one got called instead of the one in the ribbon bar.