Solved

How to cascade modal windows?

Posted on 2000-03-06
3
387 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 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows Drag & Drop Location 2 112
repeateFront java challenge 31 95
Process filename extension 3 208
Excel file not created as expected 7 92
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.

749 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