Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - SetCloseSubMenuOnClick - redraw problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

SetCloseSubMenuOnClick - redraw problem

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

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: SetCloseSubMenuOnClick - redraw problem
    Posted: 20 May 2009 at 7:53am
Here's a popup-gallery (SetCloseSubMenuOnClick = FALSE):
 
"Clear" has been pressed, but the list is not redrawn until I hover it with the mouse!
 

When I press "Clear" the following code is executed:
 
void CMainFrame::OnGalleryClear()
{
 for (int i = 0; i < m_pItems->GetItemCount(); ++i)
 {
  CControlGalleryItem *pItem = DYNAMIC_DOWNCAST(CControlGalleryItem, m_pItems->GetItem(i));
  ASSERT(pItem);
  if (pItem)
   pItem->SetChecked(FALSE);
 }
}

Q: How do I enforce a redraw of the list here?
PokerMemento - http://www.pokermemento.com/
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 21 May 2009 at 1:34am
Hi,
 
We don't have SetChecked method - so its part of your code - add pGallery->InvalidateItems(); after.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 21 May 2009 at 6:28am
Is there a nice way of getting the gallery pointer?
Do I have to use pRibbon->Find...?
PokerMemento - http://www.pokermemento.com/
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 21 May 2009 at 8:42am

hi,

think best way is pCommandBars->GetActions()->GetAction(Id)->RedrawControls();
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.267 seconds.