modeless dialog box in my DLL not working 
Author Message
 modeless dialog box in my DLL not working

Can you have a modeless dialog box in a Dynamic Link Library?
I have a DLL which contains a dialog box called CTestDiag (id:
IDD_TESTDIAG) and a function called InvokeTestDiag(). When the following
function is called by a program which links in the DLL a modeless dialog
box should be displayed to the user.

CTestDiag *test;

extern "C" void InvokeTestDiag()
{

 test = new CTestDiag;
 test->Create(IDD_TESTDIAG, NULL);

Quote:
}

Each time my VC++ Interface program calls InvokeTestDiag I get the fatal
error message ("Can't find dialog template with IDD 0x0084" - seen when
you run the de{*filter*}...) Its is as if the template name IDD_TESTDIAG is
not correct and yet it is.

Are modeless dialog boxes allowed in Dynamic Link Libraries. Any ideas
on what I need to do?

thanks,

Bob Connell

  rconnell.vcf
< 1K Download


Fri, 11 Jan 2002 03:00:00 GMT  
 modeless dialog box in my DLL not working
I have had a similar problem some time ago but I cannot exactly remember the
solution. Start by adding  AFX_MANAGE_STATE(AfxGetStaticModuleState()) in
your DLL just after InvokeTestDll. Secondly, just for fun put a copy of the
dialog in the calling application. If you like mail me direct with your
source and I'll see if it joggs my memory.

Good luck

--
John McTainsh
______________________________________________
If you have a comment regarding my answer , please mail

Just another solution from New Zealand.

Quote:

>Can you have a modeless dialog box in a Dynamic Link Library?
>I have a DLL which contains a dialog box called CTestDiag (id:
>IDD_TESTDIAG) and a function called InvokeTestDiag(). When the following
>function is called by a program which links in the DLL a modeless dialog
>box should be displayed to the user.

>CTestDiag *test;

>extern "C" void InvokeTestDiag()
>{

> test = new CTestDiag;
> test->Create(IDD_TESTDIAG, NULL);
>}

>Each time my VC++ Interface program calls InvokeTestDiag I get the fatal
>error message ("Can't find dialog template with IDD 0x0084" - seen when
>you run the de{*filter*}...) Its is as if the template name IDD_TESTDIAG is
>not correct and yet it is.

>Are modeless dialog boxes allowed in Dynamic Link Libraries. Any ideas
>on what I need to do?

>thanks,

>Bob Connell



Sat, 12 Jan 2002 03:00:00 GMT  
 modeless dialog box in my DLL not working

Thanks John!

The AFX_MANAGE_STATE(AfxGetStaticModuleState()) worked!

Also please note that I needed the following in order to display the
window:

  test->ShowWindow(SW_SHOW);

thanks,

Bob

Quote:

> I have had a similar problem some time ago but I cannot exactly remember the
> solution. Start by adding  AFX_MANAGE_STATE(AfxGetStaticModuleState()) in
> your DLL just after InvokeTestDll. Secondly, just for fun put a copy of the
> dialog in the calling application. If you like mail me direct with your
> source and I'll see if it joggs my memory.

> Good luck

> --
> John McTainsh
> ______________________________________________
> If you have a comment regarding my answer , please mail

> Just another solution from New Zealand.


> >Can you have a modeless dialog box in a Dynamic Link Library?
> >I have a DLL which contains a dialog box called CTestDiag (id:
> >IDD_TESTDIAG) and a function called InvokeTestDiag(). When the following
> >function is called by a program which links in the DLL a modeless dialog
> >box should be displayed to the user.

> >CTestDiag *test;

> >extern "C" void InvokeTestDiag()
> >{

> > test = new CTestDiag;
> > test->Create(IDD_TESTDIAG, NULL);
> >}

> >Each time my VC++ Interface program calls InvokeTestDiag I get the fatal
> >error message ("Can't find dialog template with IDD 0x0084" - seen when
> >you run the de{*filter*}...) Its is as if the template name IDD_TESTDIAG is
> >not correct and yet it is.

> >Are modeless dialog boxes allowed in Dynamic Link Libraries. Any ideas
> >on what I need to do?

> >thanks,

> >Bob Connell

  rconnell.vcf
< 1K Download


Sat, 12 Jan 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. modeless dialog box in my DLL not working

2. Dialog containing a CTabCtrl containing a modeless dialog box, shortcuts don't work

3. My dialog box DLL does not work well

4. Modeless dialog box together with modal dialog box

5. modeless dialog not working in CFormView (workspace enclosed)

6. modeless dialog box does not appear

7. CDialog: Service calling a MFC-linked DLL instanciating a modeless dialog box

8. Modeless dialog box in DLL

9. Modeless dialog boxes in dynamically linked dll

10. Tying a DLL and Modeless DIalog Box

11. Modeless dialog box in DLL using C

12. Modeless dialog boxes in an extension DLL

 

 
Powered by phpBB® Forum Software