开发者

Cascading specific windows in a MFC MDI application

开发者 https://www.devze.com 2023-01-10 15:32 出处:网络
A MDIParent Wnd has many MDIchild Wnds, and also few child dialogs. Dialogs are created this way --- CAutoDlg *pDlg = new CAutoDlg;

A MDIParent Wnd has many MDIchild Wnds, and also few child dialogs.

Dialogs are created this way --- CAutoDlg *pDlg = new CAutoDlg; pDlg->Create(IDD_AUTOCARD,this);

I want to cascade only a specific type of dialogs, say dialogs of CAutoDlg type only.

If i give MDICascade() it cascades all the child开发者_Go百科 windows and dialogs under the MDIFrame. Is there any other un-conventional way other than calling SetWindowPos for each dialog, based on the position of the previous dialog?


There is no direct way to do this. You can have collection of CAutoDlg into some container. Using that container call appropriate function to cascade. You may use the CAutoDlg's constructor to add dialog object into that container, and use destructor to remove dialog reference from container.

0

精彩评论

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

关注公众号