I am trying to create an application that is dialog-based. I use the dialog
editor to create a window. Then in my code I call DialogBox.

DialogBox ( hInstance, MAKEINTRESOURCE(main_menu), 0 , (DLGPROC)DlgMain);

GetLastError();

GetLastError returns 1408 - Invalid window; it belongs to other thread.
ERROR_WINDOW_OF_OTHER_THREAD

What is going on here? I want to use the Dialog box as a main window.

Thanks.

-FV

Re: DialogBox / GetLastError by Ilya

Ilya
Thu Nov 11 23:52:54 CST 2004

What is "main_menu" identifier ? You have to use resource identifier of your
dialog.

"Frank Vicious" <dontspame@lame.com> wrote in message
news:%23rDxRvEyEHA.3168@TK2MSFTNGP15.phx.gbl...
> I am trying to create an application that is dialog-based. I use the
dialog
> editor to create a window. Then in my code I call DialogBox.
>
> DialogBox ( hInstance, MAKEINTRESOURCE(main_menu), 0 , (DLGPROC)DlgMain);
>
> GetLastError();
>
> GetLastError returns 1408 - Invalid window; it belongs to other thread.
> ERROR_WINDOW_OF_OTHER_THREAD
>
> What is going on here? I want to use the Dialog box as a main window.
>
> Thanks.
>
> -FV
>
>



Re: DialogBox / GetLastError by Bruce

Bruce
Fri Nov 12 07:59:31 CST 2004

Does DialogBox actually set an error? GetLastError only returns the value
*last* set, which was not necessarily set in DialogBox.

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups



Re: DialogBox / GetLastError by Frank

Frank
Mon Nov 15 15:30:17 CST 2004

main_menu is the name of the dialog menu that I created. ( The name of the
resource )

-FV

"Ilya Manin" <IlyaM@softspb.com> wrote in message
news:%23rMgcvHyEHA.2572@tk2msftngp13.phx.gbl...
> What is "main_menu" identifier ? You have to use resource identifier of
your
> dialog.
>
> "Frank Vicious" <dontspame@lame.com> wrote in message
> news:%23rDxRvEyEHA.3168@TK2MSFTNGP15.phx.gbl...
> > I am trying to create an application that is dialog-based. I use the
> dialog
> > editor to create a window. Then in my code I call DialogBox.
> >
> > DialogBox ( hInstance, MAKEINTRESOURCE(main_menu), 0 ,
(DLGPROC)DlgMain);
> >
> > GetLastError();
> >
> > GetLastError returns 1408 - Invalid window; it belongs to other thread.
> > ERROR_WINDOW_OF_OTHER_THREAD
> >
> > What is going on here? I want to use the Dialog box as a main window.
> >
> > Thanks.
> >
> > -FV
> >
> >
>
>