Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - How to remove control from QAT
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to remove control from QAT

 Post Reply Post Reply
Author
Message
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 867
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: How to remove control from QAT
    Posted: 02 October 2009 at 5:26pm
I have right-clicked on a group and added it to the QAT. Later I need to remove the commands that were part of that group. I get the CXTPRibbonQuickAccssControls collection and I have to call FindControl using the recursive flag passing in the command ID of the command I am currently removing. I get the control. How do I remove the control from the CXTPRibbonQuickAccessControls?
 
I tried calling the Remove method of the QA controls. But the remove does not recurse so it fails to find the control it just fed me. So I tried calling IndexOf. But IndexOf returns -1 (because it does not do the recursion either). So I cannot call the Remove( int Index ) method.
 
So how do I remove such a control that is in the ribbon group control popup that was added to the QAT?
 
I also need to remove the ribbon group control popup too because, as I posted earlier, when I programatically remove the group I originally added to the QAT, the QAT leaves the ribbon group popup in place and if the user touches it, CodeJock crashes our application because the popup stores, without addreffing, the original group pointer and that group was removed and deleted! I have looked extensively at the control the QA controls finds but no where do I see the group control popup pointer I see in the QA controls array. I found a pointer to an instance of that class, but the pointer value is not the same.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.