MFC: Is there an event to detect when a CDockablePane derived window has been opened either by sliding out or showing?

StackOverflow https://stackoverflow.com/questions/4453410

Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top