• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 423
  • 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

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

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