Archived

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

Craazer

CreateDialog() problem

Recommended Posts

Craazer    122
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? :/

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites