Modeless Dialog box in a Modal Dialog Application... 
Author Message
 Modeless Dialog box in a Modal Dialog Application...

Hi,

I might need to show a modeless dialog box in my application. The
application itself is a dialog based app (the main window is a CDialog
derived class).

When I create the modeless dialog, the main application window loses focus,
but the modeless dialog is nowhere to be seen!!

Here's my code so far:

//handler to create modeless dialog:

 m_pDlg = new CDlgWhereTagWas;
 m_pDlg->Create(IDD_DIALOGPOPUPDUDE, NULL);
 m_pDlg->SetFocus();

Do I have to do some type of "PreTranslateMessage" somewhere?

Thanks.
-Chris



Tue, 13 Apr 2004 08:51:21 GMT  
 Modeless Dialog box in a Modal Dialog Application...
Try
        m_pDlg->Create(IDD_DIALOGPOPUPDUDE, this );

instead of

    m_pDlg->Create(IDD_DIALOGPOPUPDUDE, NULL);

Cheers
Check Abdoul
------------------


Quote:
> Hi,

> I might need to show a modeless dialog box in my application. The
> application itself is a dialog based app (the main window is a CDialog
> derived class).

> When I create the modeless dialog, the main application window loses
focus,
> but the modeless dialog is nowhere to be seen!!

> Here's my code so far:

> file://handler to create modeless dialog:

>  m_pDlg = new CDlgWhereTagWas;
>  m_pDlg->Create(IDD_DIALOGPOPUPDUDE, NULL);
>  m_pDlg->SetFocus();

> Do I have to do some type of "PreTranslateMessage" somewhere?

> Thanks.
> -Chris



Tue, 13 Apr 2004 09:45:10 GMT  
 Modeless Dialog box in a Modal Dialog Application...
Sorry Check,
That didn't help any. It still has the same symptoms.

-Chris


Quote:
> Try
>         m_pDlg->Create(IDD_DIALOGPOPUPDUDE, this );

> instead of

>     m_pDlg->Create(IDD_DIALOGPOPUPDUDE, NULL);

> Cheers
> Check Abdoul
> ------------------



> > Hi,

> > I might need to show a modeless dialog box in my application. The
> > application itself is a dialog based app (the main window is a CDialog
> > derived class).

> > When I create the modeless dialog, the main application window loses
> focus,
> > but the modeless dialog is nowhere to be seen!!

> > Here's my code so far:

> > file://handler to create modeless dialog:

> >  m_pDlg = new CDlgWhereTagWas;
> >  m_pDlg->Create(IDD_DIALOGPOPUPDUDE, NULL);
> >  m_pDlg->SetFocus();

> > Do I have to do some type of "PreTranslateMessage" somewhere?

> > Thanks.
> > -Chris



Tue, 13 Apr 2004 23:50:04 GMT  
 Modeless Dialog box in a Modal Dialog Application...

Quote:

> Hi,

> I might need to show a modeless dialog box in my application. The
> application itself is a dialog based app (the main window is a CDialog
> derived class).

> When I create the modeless dialog, the main application window loses focus,
> but the modeless dialog is nowhere to be seen!!

> Here's my code so far:

> file://handler to create modeless dialog:

>  m_pDlg = new CDlgWhereTagWas;
>  m_pDlg->Create(IDD_DIALOGPOPUPDUDE, NULL);

m_pDlg->ShowWindow(SW_SHOW);  // Is this it?

- Show quoted text -

Quote:
>  m_pDlg->SetFocus();

> Do I have to do some type of "PreTranslateMessage" somewhere?

> Thanks.
> -Chris



Tue, 13 Apr 2004 23:49:21 GMT  
 Modeless Dialog box in a Modal Dialog Application...
Yup,

That did it.

(Always turns out to be something simple doesn't it).

Thanks,
-Chris



Quote:
> m_pDlg->ShowWindow(SW_SHOW);  // Is this it?



Tue, 13 Apr 2004 23:59:27 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Modeless dialog box together with modal dialog box

2. Post message from modal dialog to modeless dialog box....urgent!!!!!!!!!!!!!!1

3. Showing a modal dialog in a modal dialog application

4. MAPI Modal Dialog Box instead of Modeless

5. Modal to Modeless dialog box

6. Modeless dialog called from Modal dialog woes.

7. Modeless Dialog from Modal Dialog question ?

8. Modeless dialog on top of Modal dialog

9. Modeless Child Dialog of Modal Dialog

10. Win32 specific: Calling modal dialog box from a console application

11. Executing modal tabbed dialog from a dialog-based application

12. Modeless dialog box application

 

 
Powered by phpBB® Forum Software