Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 426
  • Last Modified:

CSplitterWnd and WM_SIZE

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
roar
Asked:
roar
  • 3
  • 2
1 Solution
 
gelbertCommented:
CView::OnInitialUpdate()
0
 
gelbertCommented:
Or OnUpdate()
0
 
roarAuthor Commented:
That would be the obvious place to do it.
Unfortunately, the view's OnSize gets called after OnUpdate.
0
 
roarAuthor Commented:
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
 
gelbertCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

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.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now