Does anyone know what this error msg means?

Started by
1 comment, last by Gyannea 20 years, 6 months ago
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
Brian Reinhold
Advertisement
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.
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
Brian Reinhold

This topic is closed to new replies.

Advertisement