Solved

A Popping up multiple smaller windows on an SDI document

Posted on 2000-04-01
7
407 Views
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.
0
Comment
Question by:lamer
[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
7 Comments
 
LVL 1

Expert Comment

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

Author Comment

by:lamer
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
0
 
LVL 23

Expert Comment

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

 
LVL 10

Expert Comment

by:RONSLOW
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.

0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 2678629
That was supposed to be an answer
0
 

Author Comment

by:lamer
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!


0
 
LVL 10

Accepted Solution

by:
RONSLOW earned 100 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.

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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
Detect CR LF to each line 12 184
while loop over for loop 7 119
FizzBuzz challenge 9 87
Problem to event 3 121
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…
In this post we will learn different types of Android Layout and some basics of an Android App.
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 an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

737 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