?
Solved

Tying an OnDraw to movement of a splitter bar

Posted on 1997-04-24
3
Medium Priority
?
432 Views
Last Modified: 2013-11-20
I want to know how to force an OnDraw() call for a view in a splitter window for when the splitter bar is being dragged over (covering up) a view.  OnDraw() is not called when the view is being covered up, but rather only when the view is being uncovered.  I also don't want to do this by using UpdateAllViews().  Basically my question is : Is there a way I can force a call to OnDraw for one of the child views in the splitter window when the splitter bar is dragged over that view, and where can I place this call to OnDraw?
This is in a MDI application.
0
Comment
Question by:David Gray
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
rhgaracci earned 50 total points
ID: 1301186
Instead of using a CSplitterWnd object, use an object of a derived CSplitterWnd class, say CMySplitterWnd.  Provide an override of the protected virtual member function as follows

void CMySplitterWnd::StopTracking(BOOL bAccept)
{
   CSplitterWnd(bAccept);
   
   if (bAccept)
   {
      // for each pane that you want to redraw, invalidate
      // to force WM_PAINT which causes the framework to call
      // OnDraw()
      //
      GetPane(iRow, iCol)->Invalidate();
   }
}






0
 
LVL 1

Expert Comment

by:rhgaracci
ID: 1301187
Did this not work as you expected.  I am curious because of the low grade (C = x2 points).  Please let me know how I could serve you better.
0
 

Author Comment

by:David Gray
ID: 1301188
I think that your solution is pretty good, I just found a better way to solve my problem that is less complicated.  I just had to put an Invalidate() call inside of OnSize() for the view.  Thanks for your help anyways.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Suggested Courses
Course of the Month9 days, 19 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question