Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Task Panel
  New Posts New Posts RSS Feed - Task panel group display updates
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Task panel group display updates

 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: 886
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: Task panel group display updates
    Posted: 04 September 2007 at 2:50pm
I have a task panel that I add multiple groups to. I am adding a dialog box as the item in each group. I have one group expanded.
 
I have noticed that as I move the mouse over one of the group captions (expanded group or unexpanded) everything in the panel's dialogs "flickers".
 
I set a break in one of my dialog's OnCtlColor and when I move the cursor over any caption, the entire dialog box appears to be asked to redisplay by Windows. That is, by examining the call stack I note no codejock calls on the stack and the display seems to be the result of windows simply handling an update request.
 
How do I stop a mouse event occurring over one group caption from causing items in another group from being redisplayed?
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 886
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Posted: 04 September 2007 at 4:02pm
Progres ...
 
I am actually experiencing a number of issues with flickering/flashing windows. For the task panel, I have tracked the problem to CXTPTaskPanel::SetHotItem. When the hot item changes, the method makes this call that invalidates the entire client area:

Invalidate(FALSE);

Likewise I have the same issue with XTPPopupControl. When the HitTest call returns an item, CXTPPopupControl calls RedrawControl and RedrawControl does an Invalidate(FALSE).

So now I know the immediate cause of everything updating all the time. But this forced update of everything seems unnecessary.

What is the reason for invalidating the entire panel (and popup?) In the very least it seems reasonable to get the hit item's rectangle and invalidate only the rectangle.

Actually, for the task panel, why would the contents of a group (the items) need to be redrawn simply because I moved the group's caption?
 
Likewise, for a popup control, why would a mouse hit on one item result in the need to update all the items?
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.188 seconds.