
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