[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Tying an OnDraw to movement of a splitter bar

Posted on 1997-04-24
3
Medium Priority
?
436 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

656 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