mdi vs sdi display problems 
Author Message
 mdi vs sdi display problems

Two conflicting problems.

I have a working mdi application that for user friendliness should be an sdi.
Problem #1 is that the mdi application has buttons on the toolbar that invoke
various windows that float on top of the application.  When I convert the
application to sdi, the windows don't display properly.  The person I talked to at
MSDN technical support couldn't figure out how to do it and said I should either
try resizeable dialog windows or make the mdi act like an sdi.  Trying the second
route leads to problem #2, the reason I wanted to go to sdi in the first place.
How do I make the document appear maximized and remove the min, max, and close
buttons for the document?

Alternatively, in a sdi, how do I create non-modal windows that can float on top
of the application?



Thu, 21 Aug 2003 12:43:38 GMT  
 mdi vs sdi display problems

Refer to the following steps:

1) Create a CDialog* variable in CView class named m_testdlg;

2) In CView construction method:
  m_testdlg = new CDialog;

3) In CView destruction method:
  delete m_testdlg;

4) In any other message command handlers that you want to show a dialog:
  m_testdlg.Create( IDD_***, this);
  m_testdlg.ShowWindow(SH_SHOW);



Fri, 22 Aug 2003 15:07:01 GMT  
 mdi vs sdi display problems
This is a bit old but I hope it is okay for me to comment anyway. I am
assuming that these instructions are for creating a modeless dialog.

I think that if the dialog is going to be allocated in the constructor and
deleted in the destructor, then it is easier to combine steps 1 to 3 and
just put something such as the following in the CView class:

    CDialog m_testdlg;

I have done things like that and it works for me.

Also for modeless dialogs, "you must override" OnOk and OnCancel as
specified in the documentation for CDialog::OnCancel and CDialog::OnOk
respectively.

I have some notes at:

http://www.cpp.atfreeweb.com/ModelessDialogs.html

If anyone has any fixes, suggestions or any other comments about my notes,
let me know.


Quote:

> Refer to the following steps:

> 1) Create a CDialog* variable in CView class named m_testdlg;

> 2) In CView construction method:
>   m_testdlg = new CDialog;

> 3) In CView destruction method:
>   delete m_testdlg;

> 4) In any other message command handlers that you want to show a dialog:
>   m_testdlg.Create( IDD_***, this);
>   m_testdlg.ShowWindow(SH_SHOW);



Wed, 17 Sep 2003 03:51:22 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Dialog box pop-up - SDI vs. MDI apps

2. MDI vs SDI Applications

3. MDI vs SDI

4. Help: CView with MDI vs. SDI

5. SDI vs. MDI apps

6. SDI vs MDI or multithreading?

7. Dialog box pop-ups - SDI vs. MDI apps

8. MDI vs SDI

9. SDI vs. MDI memory

10. SDI vs MDI, or mulththreading?

11. displaying an initial screen in an SDI program before the main sdi

12. Annoying problem displaying SDI MainFrame window with splash screen

 

 
Powered by phpBB® Forum Software