Solved

How to cascade modal windows?

Posted on 2000-03-06
3
369 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
  • 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 100 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Different colored text in ComboBox without Subclassing 8 60
substring method in java 1 116
conditional code and condition difference 9 82
zeroMAx challenge 20 100
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

786 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