开发者

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

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 se开发者_开发问答e an event that indicates that the slide out has finished.

Any advice?


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜