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


A Popping up multiple smaller windows on an SDI document

Posted on 2000-04-01
Medium Priority
Last Modified: 2013-11-20
I have an SDI document and a ListCtrl. When i right click on the listctrl i want to have a window to pop up showing information on the selected item. Ive been reading up on CFrameWnd and CMiniFrameWnd but there seems to be no examples on how to use them...

anyway, inside the  PopUp window shud also contain other controls. The window should be modeless as i want to pop up as many windows dynamically until the user closes the these window...

any sample projects on how i can achieve this???

ok thanks a bundle.
Question by:lamer
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

Expert Comment

ID: 2677072
Why do you want to use CFrameWnd or CMiniFrameWnd for such purpose? You probably should use CDialog.

Author Comment

ID: 2677168
1) I dun want the taskbar to have the new window that i will pop up becoz the user can create multiple windows - dynamically

2) I need to check that the user does not pop up the same window twice.

3) The window must not be modal and as the program gets minimize all the windows shud be minimized as well and when it gets maximized the windows will still be in the same position as it was previously

Using CDialog would be an incredible hassle to achive the 3 tasks above
LVL 23

Expert Comment

ID: 2677205
Use a modeless dialog box with the WS_EX_TOOLWINDOW extended style.
Technology Partners: 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!

LVL 10

Expert Comment

ID: 2678628
1) WS_EX_TOOLWINDOW gives a smaller border and stops the dialog from appearing in the task bar .. if you remove the WS_EX_APPWINDOW style.  See MS KB article HOWTO: Prevent a Window from Appearing on the Taskbar ID: Q205158

2) simply kill the previous one and pop up a new one (or see what I do below)

3) make the dialog modeless

Cannot see any great problem with that.

I do something very similar, and use a modeless property sheet.  I actually create this at the start of the program and tell it what item to 'look at' (ie when I get a right-click i tell the property sheet to update itself with the info for that item).  I also make the sheet initially invisible, and simply make it visibble when the user wants to see it.  I make the close [x] button hide the window rather than kill it so that it doesn't need to be re-created and so it can reappear at the same position and with the same page showing when I bring it up again.

NOTE: If all you wanted was info, an not other controls, I'd suggest a tooltip.

LVL 10

Expert Comment

ID: 2678629
That was supposed to be an answer

Author Comment

ID: 2682651
well... the dialog box needs to be dynamically created and destroyed... coz there can be more than 1 at any one time...

the reason why i use CFrameWnd is becoz of this.. i need to keep the pointers to the dynamically created windows...

i can't use tool tip coz the information is updated on a real time basis.. hence i need to have a CListCtrl inside the Window... if it was only 1 window I would definately use a dialog rather than a CFrameWnd

Creating it with CFrameWnd is quite a pain but do able non the less... ive sorta figured it out... but if u can give me the codes to a modeless dialog box that can be dynamically created then that will be great!

LVL 10

Accepted Solution

RONSLOW earned 200 total points
ID: 2682653
if you want more than one, then that is fine .. just create as many as you want.  If you don't, then delete old ones when new ones are wanted.

you simply need a modeless dialog.  Nothing special.  You just use Create instead of DoModal (basically).

But do you mean that the dialog content itself is dynamic (ie you cannot have adialog resource?).

This is also easy to do, just add controls to the dialog when it is created (in the OnInitDialog is good).

If there is lots of info, or a number of different dialog loayouts depending on the type of object, use a modeless property sheet, and add pages dynamically based on the type of object you are looking at.


Featured Post

Independent Software Vendors: 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: 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…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
Loops Section Overview
Suggested Courses

610 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