Hello,All:

I am now getting in problem with a question that I cannot show my CDialog
object with function DoModal(), how come did I call the function failed?

I traced the function DoModal(), and found it failed at a
call-CreateDialogIndirect() function.

Is there anybody can tell me how I can deal with it?

Thanks in advance!

Re: How can I make my programe running ahead? by Rodrigo

Rodrigo
Mon May 09 01:31:21 CDT 2005

Maybe your are using a wrong resource id for your dialog resource, check it.


--
Un saludo
Rodrigo Corral González [MVP]

FAQ de microsoft.public.es.vc++
http://rcorral.mvps.org




Re: How can I make my programe running ahead? by Carl

Carl
Mon May 09 03:38:28 CDT 2005

No,I have checked it for ensuring.

I can use it some days ago, but I cannot use it today.



Re: How can I make my programe running ahead? by Mark

Mark
Mon May 09 07:05:36 CDT 2005

Have or overridden the IDD enum, or the OnDoModal handler?

--
- Mark Randall
http://zetech.swehli.com

"Carl" <carl8421@126.com> wrote in message
news:el$sBTDVFHA.4092@TK2MSFTNGP12.phx.gbl...
> Hello,All:
>
> I am now getting in problem with a question that I cannot show my CDialog
> object with function DoModal(), how come did I call the function failed?
>
> I traced the function DoModal(), and found it failed at a
> call-CreateDialogIndirect() function.
>
> Is there anybody can tell me how I can deal with it?
>
> Thanks in advance!
>
>



Re: How can I make my programe running ahead? by Carl

Carl
Mon May 09 20:06:49 CDT 2005

No, I haven't.

Well, I had tried overriding it too, but it's still in trouble.

:-(
Thanks for your question anyway.



Re: How can I make my programe running ahead? by Mark

Mark
Mon May 09 20:56:19 CDT 2005

Try using F11 to step into the CreateDlgIndirect, tell us what each of the
arguments reads on the first line from the tooltip.

--
- Mark Randall
http://zetech.swehli.com

"Carl" <carl8421@126.com> wrote in message
news:%23e7WNyPVFHA.628@tk2msftngp13.phx.gbl...
> No, I haven't.
>
> Well, I had tried overriding it too, but it's still in trouble.
>
> :-(
> Thanks for your question anyway.
>
>



Re: How can I make my programe running ahead? by Carl

Carl
Tue May 10 04:02:48 CDT 2005

This caller get into the kernel, and it notes me "File:wingdi.cpp" and
"line:1220", it was the first sub-function of ::CreateDlgIndirect()



Re: How can I make my programe running ahead? by Mark

Mark
Tue May 10 05:29:24 CDT 2005

Well, according to my source thats:

ASSERT(lpDialogTemplate != NULL);

Have to guess that means that somehow your resources are corrupted and it
cannot find the template handle you used (or it used, automatically),
despite it being defined (.. or you would get not defined).

Try remaking the dialog

--
- Mark Randall
http://zetech.swehli.com

"Carl" <carl8421@126.com> wrote in message
news:uyCuL8TVFHA.2664@TK2MSFTNGP15.phx.gbl...
> This caller get into the kernel, and it notes me "File:wingdi.cpp" and
> "line:1220", it was the first sub-function of ::CreateDlgIndirect()
>
>