1406 - Cannot create a top-level child window
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
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?
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?
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.
Please next time, write the error in the message again.
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?
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?
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?
Make sure that the controls have the WM_TABSTOP style set.
Qui fut tout, et qui ne fut rien
Invader''s Realm
Qui fut tout, et qui ne fut rien
Invader''s Realm
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement