How to add through program to QAT in mfc mdi ribbon project RRS feed

  • Question

  • Hello,
    I have mfc mdi project. It uses ribbon. The application when run displays the QAT. We can manually add elements to the QAT when the application is run. When we send the application to other users they have to manually add elements to the QAT.
    Is there a way I can add some elements to the QAT from in program or other than manual addition.
    I also want to know where exactly the QAT configuration is stored. Is it in the registry if so where in the registry.
    Hope I have been clear. Look forward to any thoughts or ideas.
    Thanks & Regards,

    What I have tried:

    Dont know what to try. I dont how and where the QAT information is stored for teh application
    Saturday, October 5, 2019 7:31 AM

All replies

  • You can customize the QAT programmatically by setting its defaults using CMFCRibbonBar::SetQuickAccessDefaultState.

    You can also add commands to the QAT (that will not be defaults in the customization dialog) by using CMFCRibbonBar::SetQuickAccessCommands.

    Typically, MFC will save the state of the QAT to the registry along with the applications other windows and toolbars in HKCU, but you should not need to tweak registry values.

    For example,

    Saturday, October 5, 2019 11:21 AM
  • Hello,

    If your issue is solved, please "Mark as answer" or "Vote as helpful" post to the appropriate answer , so that it will help other members to find solution quickly if they faces similar issue. If not, please feel free to contact us.

    Best Regards,

    Suarez Zhou

    Monday, October 14, 2019 8:23 AM