Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
It seems the tinny button on the right has been disappear. whats wrong? am I missing something?
this is the code taken from resource.rc
SQL
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,305,7,50,14
    PUSHBUTTON      "Cancel",IDCANCEL,305,24,50,14
    CONTROL         "",IDC_DATETIMEPICKER1,"SysDateTimePick32",DTS_RIGHTALIGN | WS_TABSTOP,65,65,100,15
END


and in code
C++
CreateWindowEx(0, L"SysDateTimePick32",L"", DTS_RIGHTALIGN | WS_TABSTOP, ...);


same code work fine under windows XP with vs2005. The problem is interesting. When I use this control in resource dialog box it does not get created at all. But if I create it in code it does get created but without drop down icon on the right.

also one thing noticeable. On Resource Editor the button that was suppose to be visible it shows as some different icon. that is it cannot create the icon.
Posted
Updated 1-Jul-12 3:11am
v3
Comments
Richard MacCutchan 30-Jun-12 12:22pm    
am I missing something?

Yes, a proper description of your problem; SysListview32 works perfectly well under Windows 7. Please explain exactly what you are doing and what results you expect, and what results you actually get.
Mohibur Rashid 30-Jun-12 13:00pm    
I wrote the question wrong. it was suppose to be SysDateTimePick32
Mohibur Rashid 30-Jun-12 13:01pm    
Hi Richard, I always use SysListview32 in my small applications. But the problem occurs when I tried to do it on windows 7. with vs 2005, when I ran the app for the first time, it seems like it is not working properly. the tiny button that was suppose to be visible was not there. then I created a dialog box. i created a Date Time picker. Then I saw the same issue the button is missing there too. While I was writing this message I tried that in other machine same thing. Is there any issue with 7 and VS 2005?
Richard MacCutchan 1-Jul-12 7:32am    
I have no idea why this does not work. I have just tested this under Windows 7 (although I am using VS 2010) and it is fine. Perhaps you could edit your question and show the code you are using, so we can see if anything stands out.
Mohibur Rashid 1-Jul-12 9:11am    
Question Updated

I believe you'll find that the SysDateTimePicker control in Windows 7 has changed. It appears that it is slightly wider than the one for Windows XP, so if you widen the box a bit using your resource editor, you should be OK.

It also appears that the settings for determining week 1 in a given year are not working properly in the new control, and it's been reported, but no fix yet.

Hope this helps.
 
Share this answer
 
Comments
Mohibur Rashid 1-Jul-12 9:44am    
humm, that make sense. I will have to find other solution then :D
// the tinny button on the right has been disappear

Just add the DTS_UPDOWN style for the control :)
 
Share this answer
 
Comments
Mohibur Rashid 1-Jul-12 21:11pm    
Sorry mate, I wrote wrong question, the problem was with Date control not list control. and If I add DTS_UPDOWN in style it just add a scroll bar, I need the pop up window to select date :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900