Skip to main content
GameDev.net gamedev.net
🔒 Locked

1406 - Cannot create a top-level child window

Started by Will O May 21, 2003 at 9:57 PM 5 replies 10.7k views
Original Post
Will O
Will O
Hi, I''m trying to create a dialog box, and using GetLastError() and FormatMessage() I am getting that error after calling CreateDialog... any ideas on whats wrong or how to fix it? Thanks
Endurion
Endurion
if "1406 - Cannot create a top-level child window" is the error you''re getting, remove WS_CHILD from the window styles.

Please next time, write the error in the message again.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>
Will O
Will O
AP, if you actually read my message, you would notice that I said I got the error message after calling CreateDialog(). About looking in the "help system", if MSDN gave me any other useful information, I wouldn''t be posting here. Thanks Endurion, it works now (and sorry, I thought posting the error message once was enough...).

Anyways, I have one minor problem now - nothing happens when I press tab (should move from one control to another)... is there some sort of message I have to handle or something?
Will O
Will O
I managed to go from one control to another by keeping track of the current control, and then giving the next control focus when the user presses tab, but there''s got to be a better way, isn''t there?
Will O
Will O
Yeah, all of my controls have the WS_TABSTOP style set.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.