SysDateTimePick32在Windows 7上不起作用 [英] SysDateTimePick32 is not working on Windows 7
问题描述
似乎右边的小按钮已消失.怎么了?我想念什么吗?
这是从resource.rc中获取的代码
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, ...);
在带有vs2005的Windows XP下,相同的代码可以正常工作.这个问题很有趣.当我在资源对话框中使用此控件时,它根本不会被创建.但是,如果我用代码创建它,则它确实会创建,但右侧没有下拉图标.
还有一件事值得注意.在资源编辑器"上,应该显示为可见的按钮显示为一些不同的图标.
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.
推荐答案
我相信您会发现Windows 7中的SysDateTimePicker控件已更改.看来它比Windows XP的要宽一些,因此,如果使用资源编辑器将框扩大一点,就可以了.
同样,在新控件中,用于确定给定年份中第1周的设置似乎无法正常工作,并且已进行了报告,但尚未修复.
希望对您有所帮助.
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.
//右侧的小按钮已消失
只需为控件添加DTS_UPDOWN
样式即可:)
// the tinny button on the right has been disappear
Just add theDTS_UPDOWN
style for the control :)
这篇关于SysDateTimePick32在Windows 7上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!