Advertisement

Trouble with Dialog Boxes

Started by February 09, 2001 02:42 PM
3 comments, last by Nazmir 23 years, 11 months ago
I need help with my dialog boxes in my program. I can get the dialog box to open using the DialogBox() function, but as soon as I add a slider to it, I can''t get it to open anymore. Is there something that I have to do in order to get it working with sliders??? Justin
Make sure your slider has an id i.e. IDS_MYSLIDER. One of the dialog box functions will fail if the control doesn''t have an id (i''m not sure which one though). check msdn. hope that helps.

#define ignite_software 1
Advertisement
Make sure your slider has an id i.e. IDS_MYSLIDER. One of the dialog box functions will fail if the control doesn''t have an id (i''m not sure which one though). check msdn. hope that helps.

#define ignite_software 1
Make sure to call InitCommonControls() in your program before creating dialog boxes that use controls from the common controls library. Calling it once at the top of your WinMain should suffice. The function (along with a lot of other stuff related to common controls, including stuff for sliders) is defined in commctrl.h (which you should #include). You''ll also need to add comctl32.lib to your link settings.
Thanks Chris, that seems to have got it working.

Justin

This topic is closed to new replies.

Advertisement