Dialog box pop-up - SDI vs. MDI apps 
Author Message
 Dialog box pop-up - SDI vs. MDI apps

I have a multiple document interface application where one child window
comes up.  I'm trying to implement a simple application where when I
left click in the child window a dialog box pops up.  I'm following a
mix of two examples.  One on dialog boxes and one on MDI's.  I create
the dialog resource and class and follow an example for a modeless dialog
box.  I create a function for the left mouse click and during debug the
program gets there but no dialog box pops-up.
The project is caled Multi, and the dialog class is CSSDialog.  Below are
some code fragments.
class CSSDialog : public CDialog
 CView* m_pView;
 CSSDialog(CView* pView);
 BOOL Create();
// Construction
 CSSDialog(CWnd* pParent = NULL);   // standard constructor
// Dialog Data
 enum { IDD = IDD_SS };
  // NOTE: the ClassWizard will add data members here

// Overrides
 // ClassWizard generated virtual function overrides
 virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
// Implementation
 // Generated message map functions
  // NOTE: the ClassWizard will add member functions here


// Microsoft Developer Studio will insert additional declarations
immediately before the previous line.
#endif //

CSSDialog::CSSDialog(CView* pView) {
 m_pView = pView;


CSSDialog::CSSDialog(CWnd* pParent /*=NULL*/)
 : CDialog(CSSDialog::IDD, pParent)
 m_pView = NULL;
  // NOTE: the ClassWizard will add member initialization here

BOOL CSSDialog::Create() {
 return CDialog::Create(CSSDialog::IDD);

class CSSDialog;
class CMultiView : public CView
 CSSDialog* m_pDlg;
protected: // create from serialization only
// Attributes
 CMultiDoc* GetDocument();
 // TODO: add construction code here
 m_pDlg = new CSSDialog(this);

 delete m_pDlg;

void CMultiView::OnLButtonDown(UINT nFlags, CPoint point)
 // TODO: Add your message handler code here and/or call default

 if (m_pDlg->GetSafeHwnd() == 0) {
 //CView::OnLButtonDown(nFlags, point);


My goal is to have a project window where I can have multiple dialog
boxes pop up from various pull down menu items.  These dialog boxes
will be modeless so I can move between them and enter values/click
buttons, etc.  Am I correct in assuming that I need an MDI for this????
Thank you.
Please also respond to

Mon, 18 Dec 2000 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

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

2. SDI vs. MDI apps

3. Help pop-ups in MFC App

4. Modeless dialog boxes in MDI app

5. How to remove certain doc types from the file|new dialog box in MDI apps

6. MDI app w/ modal-less dialog box (inter-view communication)

7. PBM: Message box not displayed after main dialog box is closed in MFC dialog-based app

8. MDF-SDI-App with popup-window ???

9. MFC-SDI-app with additional popup-window ???

10. MDI vs SDI Applications

11. MDI vs SDI

12. Help: CView with MDI vs. SDI


Powered by phpBB® Forum Software