Solved

CSplitterWnd and WM_SIZE

Posted on 1998-04-30
5
395 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
ID: 1304562
CView::OnInitialUpdate()
0
 
LVL 8

Expert Comment

by:gelbert
ID: 1304563
Or OnUpdate()
0
 

Author Comment

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

Author Comment

by:roar
ID: 1304565
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
ID: 1304566
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Host to IP 7 80
Prevent this page from creating additional dialogs. 3 619
sumHeights2  challenge 7 117
Bartender label printing - switch on and off graphics 3 54
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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. …
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.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

828 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