Skip to main content
gamedev.net
🔒 Locked

CreateDialog() problem

Started by Craazer 4 replies 450+ views
Original Post
Craazer
Craazer
why doesnt this work:
  
htool_dialog = CreateDialog(main_instance,MAKEINTRESOURCE(IDD_DIALOG1),hwnd,(DLGPROC) ToolDialogProc);
  
main_instance is the instance of the main window and hwnd is the HWND of the main window. IDD_DIALOG1 is my dialog in resource, and ToolDialogProc is name of my dialogproc. but it just doesnt work, it gives a NULL to htool_dialog. oh yeah and getlast() error returns 0 wich means no error.. any ideas why? :/
Craazer
Craazer
quote:
Original post by siaspete
Do you handle WM_INITDIALOG and WM_COMMAND in your dialog proc?


Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions




Yes im afraid...
Craazer
Craazer
One thing i forgot, im using direct-x and direct draw could this cause it? i doubt it but what do u think?
LessBread
LessBread
You might need to all InitCommonControlsEx depending on the types of controls used by your dialog. Here''s a list of the initialization flags and the controls that require initialization:

ICC_ANIMATE_CLASS Load animate control class.
ICC_BAR_CLASSES Load toolbar, status bar, trackbar, and ToolTip control classes.
ICC_COOL_CLASSES Load rebar control class.
ICC_DATE_CLASSES Load date and time picker control class.
ICC_HOTKEY_CLASS Load hot key control class.
ICC_INTERNET_CLASSES Load IP address class.
ICC_LISTVIEW_CLASSES Load list-view and header control classes.
ICC_PAGESCROLLER_CLASS Load pager control class.
ICC_PROGRESS_CLASS Load progress bar control class.
ICC_TAB_CLASSES Load tab and ToolTip control classes.
ICC_TREEVIEW_CLASSES Load tree-view and ToolTip control classes.
ICC_UPDOWN_CLASS Load up-down control class.
ICC_USEREX_CLASSES Load ComboBoxEx class.
ICC_WIN95_CLASSES Load animate control, header, hot key, list-view, progress bar, status bar, tab, ToolTip, toolbar, trackbar, tree-view, and up-down control classes.




"Beautiful maiden," answered Candide, "when a man is in love, is jealous, and has been flogged by the Inquisition, he becomes lost to all reflection."
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Craazer
Craazer
quote:
Original post by LessBread
You might need to all InitCommonControlsEx depending on the types of controls used by your dialog.



Thats it! thank you so much

Topic Locked

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

Sign in to reply to this topic.