Archived

This topic is now archived and is closed to further replies.

Gyannea

Does anyone know what this error msg means?

Recommended Posts

I am trying to create a modeless (or modal) dialog box. I get the following error from ''GetLastError()'' "1407 Cannot find window class" Cannot find window class?!? Well, I can''t find it for windows because Windows calls all the necessary setups internally. At least, I thought that was the idea. The function call is hsetup = CreateDialogParam(m_hInst, MAKEINTRESOURCE(IDD_CHANNELSETUP), hwnd, (DLGPROC)ChannelSetup_Dialog, (LPARAM)dialoginfo); ''hsetup'' is set to 0 from the failure, however, using the debugger messages are still sent to the dialog function. I don''t know what the messages mean (they are just numbers) or how many are sent. I have this problem only in Visual C++ 6.0 introductory version. There is no problem with the WATCOM compiler. The dialog appears as it is supposed to. However, I can''t use the WATCOM compiler with Direct X. Damned if you do damned if you don''t. Been locked on this problem since yesterday noon. Would love to solve it so I could get back to programming again!!! Thanks...a dead Brian Brian Reinhold

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
this situation can be caused by a dialog which has "newer" controls on it, e.g., any control other than the standard controls that are listed in the CreateWindow docs.

to solve the problem, call InitCommonControlsEx before the dialog is loaded. you''ll have to provide it with a parm that tells it which set of controls to register.

Share this post


Link to post
Share on other sites
Bless you anonymous, it worked. I do not understand why, I did not need to do that before in the Watcom compiler. Other routines that use dialog boxes didn''t use them either.

All I have is a list box and two buttons. But maybe microsoft has put more things in there than I know with its dialog editor.

I''ve been fighting with this for 24 hours now!

Now all I need to do is understand why I had to do this in this case.

Brian

Brian Reinhold

Share this post


Link to post
Share on other sites