Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to cascade modal windows?

Posted on 2000-03-06
3
Medium Priority
?
423 Views
Last Modified: 2013-11-20
I have modal window that can open another modal window of the same class, and it is "nested" one in the other (you can nest many levels). I would like it to show cascaded, and use CascadeWindows in the child:
*the parent send its handle before the DoModal and the child, in OnInitDialog calls:

int result = CascadeWindows(_hParentHandle, 0, NULL, 0, NULL);
it doesn't work with the child's handle pointer either:
HWND* pHandles;
pHandles = &m_hWnd;
int result = CascadeWindows(_hParentHandle, 0, NULL, 1, pHandles);

Thanks!
0
Comment
Question by:talia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 31

Expert Comment

by:Zoppo
ID: 2587002
Hi talia,

since you say you're using DoModal I assume your 'child' windows do not have thw WS_CHILD style set.

Unforunately I think CascadeWindows() only affect windows with the WS_CHILD style set (I even do not exactly know if it only works for MDI child windows).

ZOPPO
0
 
LVL 31

Accepted Solution

by:
Zoppo earned 300 total points
ID: 2587052
BTW, you can try to use CWnd::GetWindow() to get the sibling windows to your first dialog and CWnd::MoveWindow() to position them where you want. This way you could simulate CascadeWindows()

hope that helps,

ZOPPO
0
 

Author Comment

by:talia
ID: 2594846
Thanks , It works.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question