Solved

CSplitterWnd and WM_SIZE

Posted on 1998-04-30
5
363 Views
Last Modified: 2013-11-19
I've got a static splitter with 2 views. I need to do some initialisation after the views have received all
the initial WM_SIZE messages. Is there a message or virtual function that is guaranteed to be called after all
the initial WM_SIZE messages?
(somebody suggested overriding CSplitterWnd::SplitRow earlier, but it only gets called for dynamic splitters)
0
Comment
Question by:roar
  • 3
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
gelbert earned 100 total points
Comment Utility
CView::OnInitialUpdate()
0
 
LVL 8

Expert Comment

by:gelbert
Comment Utility
Or OnUpdate()
0
 

Author Comment

by:roar
Comment Utility
That would be the obvious place to do it.
Unfortunately, the view's OnSize gets called after OnUpdate.
0
 

Author Comment

by:roar
Comment Utility
By setting breakpoints, I see the following order during creation.
CMyView::OnSize
CMyView::OnInitialUpdate
CMyView::OnUpdate
CMyView::OnSize

I looking for a place to do initialisation after the last OnSize.
0
 
LVL 8

Expert Comment

by:gelbert
Comment Utility
There is nothing to be called after last OnSize(). But you can create some flag to be turn from FALSE (default) to TRUE to allow initialization on specific condition (something like OnSize was called two times, etc..) or try to think of another place to put your initialization code (like set some values in OnInitialUpdate() and adjust them latter).
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
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.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

763 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now