modeless dialog not showing 
Author Message
 modeless dialog not showing

I have a modeless dialog that I am trying to show from another dialog.  For
some reason the dialog will not show on creation.  Oddly enough, I have
another modeless dialog that does work and I don't see any differences.  Is
there something that I am missing?  Any help would be appreciated.  Michael
Fox

//Host code from the dialog that instantiates the modeless dialog

if(m_pDlg->GetSafeHwnd() == 0)

{

    m_pDlg->Create();

Quote:
}

else

{

    m_pDlg->PostMessage(WM_DLG_FRONT);

Quote:
}

//Create function from the modelss dialog

BOOL CProcessBlobDlg::Create()

{

    BOOL bRetValue = CDialog::Create(CProcessBlobDlg::IDD);

return bRetValue;

Quote:
}



Sun, 30 Jan 2005 15:29:07 GMT  
 modeless dialog not showing

Quote:

> I have a modeless dialog that I am trying to show from another dialog.  For
> some reason the dialog will not show on creation.  Oddly enough, I have
> another modeless dialog that does work and I don't see any differences.  Is
> there something that I am missing?  Any help would be appreciated.  Michael
> Fox

> //Host code from the dialog that instantiates the modeless dialog

> if(m_pDlg->GetSafeHwnd() == 0)

> {

>     m_pDlg->Create();

> }

> else

> {

>     m_pDlg->PostMessage(WM_DLG_FRONT);

> }

> //Create function from the modelss dialog

> BOOL CProcessBlobDlg::Create()

> {

>     BOOL bRetValue = CDialog::Create(CProcessBlobDlg::IDD);

> return bRetValue;

> }

Hi Michael,

Either call ShowWindow(SW_SHOW) on the modeless dialog after Create() or
set the visible property.

Regards,
Ruben.



Sun, 30 Jan 2005 15:59:09 GMT  
 modeless dialog not showing
I like this better

if (::IsWindow(m_pDlg->m_hWnd))
    m_pDlg->PostMessage(WM_DLG_FRONT);
else
    m_pDlg->Create();

After
  BOOL bRetValue = CDialog::Create(CProcessBlobDlg::IDD);
shouldn't you call
  if (bRetValue)
    ShowWindow(SW_SHOW);
??

--
Bjarne Nielsen



Quote:
> I have a modeless dialog that I am trying to show from another dialog.
For
> some reason the dialog will not show on creation.  Oddly enough, I have
> another modeless dialog that does work and I don't see any differences.
Is
> there something that I am missing?  Any help would be appreciated.
Michael
> Fox

> //Host code from the dialog that instantiates the modeless dialog

> if(m_pDlg->GetSafeHwnd() == 0)

> {

>     m_pDlg->Create();

> }

> else

> {

>     m_pDlg->PostMessage(WM_DLG_FRONT);

> }

> //Create function from the modelss dialog

> BOOL CProcessBlobDlg::Create()

> {

>     BOOL bRetValue = CDialog::Create(CProcessBlobDlg::IDD);

> return bRetValue;

> }



Sun, 30 Jan 2005 15:42:42 GMT  
 modeless dialog not showing
Sorry for such a question, but where is WM_DLG_FRONT declared and what is it
declared as?

todd


<snip>

Quote:
>     m_pDlg->PostMessage(WM_DLG_FRONT);



Mon, 31 Jan 2005 20:15:19 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Modal vs. Modeless dialog and controls not showing

2. Modeless dialog shall not be modeless !

3. Q: tabbing not possible in modeless propertysheet / modeless dialog

4. App fails when creating/showing Modeless Dialog

5. Modeless dialogs in dlls showing help

6. Showing a modeless progress dialog while opening document with MFC

7. App fails when creating/showing Modeless Dialog

8. Showing common dialogs modeless???

9. Showing icon in taskbar for a modeless dialog.

10. UserControl does not show on running form and properies do not show

11. Help me in showing a dialog immediately when main dialog shows

12. modeless dialog box in my DLL not working

 

 
Powered by phpBB® Forum Software