Skip to main content
GameDev.net gamedev.net
🔒 Locked

WIN32 DateTimePicker

Started by DefCom Dec 20, 2003 at 10:33 AM 8 replies 3.5k views
Original Post
DefCom
DefCom
Hi, I have added a date time picker to my gui using Visual C++ 6 resource editor, this ran fine on my PC with XP, but when i tested it on WinMe, the entire window did not display. I found that when i remove the date time picker it displays as expected. I installed VC++ on my me machine to re-compile it in the hope it magically started working, but it didn''t. If anyone can assist in this problem it would be much appriciated, Thanks.
Colin Jeanne
Colin Jeanne
Have you checked all your functions for proper return values? If so, what function fails? What are its parameters? Are they valid? If not, where are they set to invalid data? etc.


Colin Jeanne | Invader''s Realm
DefCom
DefCom
Hi, Thanks for the responce.

To test the problem, i have created a new application completely void of function. I created a dialog in the resource editor and all is fine with just the two default buttons, i then added a list box, still all is well. Then i add the date time picker and nothing, no dialog displays. Again this all works when i run it from VC++, but as soon as i run it on a different PC, nothing.

Thanks again.
SiCrane
SiCrane
What version of comctl32.dll is on the machine that you''re having problems with?
DefCom
DefCom

version 5.81.4134.100

I had not considered a dll problem, thanks for pointing that out.
DefCom
DefCom
I have copied the newer dll accross to the ''problem'' pc and still no dialog with date time picker.
DefCom
DefCom
I have just created a simple hello world application using VC++ 6 in WinME and added a few different controls to the about box.
The basic ones such as combo box, list, buttons etc are all fine, but as soon as i add one of the following; date time picker, slider, rich edit, month calender the dialog just does not display.

..any further advise? Please.
Puffy_Taco
Puffy_Taco
Have you called InitCommonControls? If you haven''t, they for sure won''t show. And for RichEdits, you must load the DLL yourself. If you need help with that, ask away, but please look at MSDN first, as they have sample code and can easily tell you what functions do. If MSDN has a sample program (which they might) test out that program and see how it works. (there''s another function, InitCommonControlsEx that you can look at).
DefCom
DefCom
Hi, thanks for pointing that out, no i have not being initialising the common controls, however...


INITCOMMONCONTROLSEX icex;

// Load the window class.

icex.dwSize = sizeof(icex);
icex.dwICC = ICC_DATE_CLASSES;
InitCommonControlsEx(&icex);


At first i get INITCOMMONCONTROLSEX unknown, so i added
#include <Commctrl.h>

which the msdn is not particularly forth coming with information about, but i get linker errors.

If you could help i little further i would much appriciate it, Thankyou.
DefCom
DefCom
Ok, forget the last one, i must be over tired, i was not including the comctl32.lib in the settings.

Thanks again everyone, Merry Christmas .

Topic Locked

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

Sign in to reply to this topic.