Click here to Skip to main content
12,353,377 members (71,247 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C++ Win32
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
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
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 30-Jun-12 0:52am
Edited 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
Richard MacCutchan 1-Jul-12 12:04pm
   
I just copied your resource definition into my own dialog box and it works fine. There must be something else different on your system - possibly the fact that you are using an older version of the compiler and SDK.
Mohibur Rashid 1-Jul-12 21:10pm
   
I guess so, because, When I was installing VS 2005, it gave me some kind of warning related with compatibility issue which I ignored. May be it has something to do with it
Richard MacCutchan 2-Jul-12 3:57am
   
It seems very strange that you can use this class to create the datetime window but the button is missing. Maybe a trawl through Google or MSDN will find some other suggestions.
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
Comments
Mohibur Rashid 1-Jul-12 9:44am
   
humm, that make sense. I will have to find other solution then :D
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

// the tinny button on the right has been disappear

Just add the DTS_UPDOWN style for the control Smile | :)
  Permalink  
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)



Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 1 Jul 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100