c++ - Arranging Cascade the CDialogs in MFC with CascadeWindows function -


How can programmatically communicate arranged in Cascade format Mafsi am, just based on the SetWindowPos previously displayed window status?

dialog app is loaded from the registry in my app, so we use it:

  SetWindowPos (NULL, x, y, cx, cy, SWP_NOZORDER);  

For this dialog, if we use the Cascade Windows function then this does not work for this dialog, although it works for other dialogs in the same native window Does. It seems that there is no effect of the CascadeWindows function, which is called SetWindowPos ; Can anyone confirm?

If so, do we just have to use Set Window POS, or any other way, to arrange the cylinders of Dialog?

Post text "itemprop =" text ">

Check that window style dialog: WS_EX_TOOLWINDOW or WS_EX_TOPMOST . CascadeWindows will not arrange window with the styles.

I tried a sample MFC dialog-based application with the following code:

  void CTestCascadeDlg :: OnBnClickedOk () {this-> SetWindowPos (nULL, 100,100,500,500, SWP_NOZORDER); Kaskedvindo (zero, MDITILE_ZORDER, nULL, nULL, nULL);}  

and I could see that I communicate successfully Cascade key Was.


Comments