Jump to content
  • Advertisement

Archived

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

Will O

1406 - Cannot create a top-level child window

This topic is 5538 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
What''s wrong is that you don''t post any useful information.

Are you getting a compile error? A link error? An execution error? What does it say? When does it happen? What happens when you plug that error text into the help system of your IDE? What does the debugger say about the values of your variables before the call? What does your code look like leading up to this call?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!