0

I want to delay initialization of a CDockablePane derived window until the window is actually shown. If the window is simply docked then WM_SHOWWINDOW is pretty effective but when the window is in AutoHideMode WM_SHOWWINDOW is unpredictable and I can't see an event that indicates that the slide out has finished.

Any advice?

snowdude
  • 3,854
  • 1
  • 18
  • 27

2 Answers2

1

The solution I've chosen is to override the virtual methods CDockablePane::ShowPane for when IsAutoHideMode() is FALSE and CDockablePane::OnSlide for when it's not.

snowdude
  • 3,854
  • 1
  • 18
  • 27
0

Try override CDockablePane::CheckStopSlideCondition, save bSlideDirection and the return value of the base class implementation somewhere

override CDockablePane::OnTimer and check the saved values after the base class implementation when nIDEvent is AFX_AUTO_HIDE_SLIDE_OUT_EVENT:

Note: AFX_AUTO_HIDE_SLIDE_OUT_EVENT is not documented and may be unavailable in future versions of MFC

Sheng Jiang 蒋晟
  • 15,125
  • 2
  • 28
  • 46
  • Thanks for the time, although I don't think this is quite the right solution. I've added an answer. – snowdude Dec 16 '10 at 10:48