E
Edward Mitchell
I have a number of DateTimePicker controls, some set to dates, some set to a
format of Time. The controls are all embedded in dialogs. I created the
controls by dragging the DateTime picker from the Toolbox and then set the
Format property appropriately.
I have noticed that sometimes the Time format will reset spontaneously to
Short Date. I looked at the .rc file and found that the usual form for a
Short Date is as follows:
CONTROL "DateTimePicker1",IDC_REGATTA_DATE,"SysDateTimePick32",
DTS_UPDOWN | WS_TABSTOP,116,77,64,14
The text for a format of Time is as follows:
CONTROL "DateTimePicker2",IDC_CREATE_START_TIME,
"SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN |
DTS_SHOWNONE | WS_TABSTOP | 0x8,8,131,70,14
so I deduced that the DateTimePicker1 indicates a date and DateTimePicker2
indicates a time.
However, when I edit a date control and change the format into a Time, the
..rc file then contains the following:
CONTROL "DateTimePicker1",IDC_REGATTA_DATE,"SysDateTimePick32",
DTS_UPDOWN | WS_TABSTOP | 0x8,116,77,64,14
and the only difference that I can see is the bar that separates the
WS_TABSTOP from the string of numbers.
I assume all the format info must be embedded into the .rc file text so I
can't see in this case what the real difference is between the Short Date
format and the Time format. However, when the resource editor reads the .rc
file it should be able to figure out the correct format. I wonder if this
difference between the use of the ...Picker2 and ...Picker1 can make the
editor make the wrong decision about which format to use when the properties
are displayed.
Is there a known problem with the format for the DateTimePicker or is there
anything I can do to keep the format the same?
I am running on XP using C++ from .NET 2003. I have an unmanaged project
that was converted from VS6.0.
Ed
--
Edward E.L. Mitchell
Web: www.racesail.org
Phone: (239)415-7039
6707 Daniel Court
Fort Myers, FL 33908
format of Time. The controls are all embedded in dialogs. I created the
controls by dragging the DateTime picker from the Toolbox and then set the
Format property appropriately.
I have noticed that sometimes the Time format will reset spontaneously to
Short Date. I looked at the .rc file and found that the usual form for a
Short Date is as follows:
CONTROL "DateTimePicker1",IDC_REGATTA_DATE,"SysDateTimePick32",
DTS_UPDOWN | WS_TABSTOP,116,77,64,14
The text for a format of Time is as follows:
CONTROL "DateTimePicker2",IDC_CREATE_START_TIME,
"SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN |
DTS_SHOWNONE | WS_TABSTOP | 0x8,8,131,70,14
so I deduced that the DateTimePicker1 indicates a date and DateTimePicker2
indicates a time.
However, when I edit a date control and change the format into a Time, the
..rc file then contains the following:
CONTROL "DateTimePicker1",IDC_REGATTA_DATE,"SysDateTimePick32",
DTS_UPDOWN | WS_TABSTOP | 0x8,116,77,64,14
and the only difference that I can see is the bar that separates the
WS_TABSTOP from the string of numbers.
I assume all the format info must be embedded into the .rc file text so I
can't see in this case what the real difference is between the Short Date
format and the Time format. However, when the resource editor reads the .rc
file it should be able to figure out the correct format. I wonder if this
difference between the use of the ...Picker2 and ...Picker1 can make the
editor make the wrong decision about which format to use when the properties
are displayed.
Is there a known problem with the format for the DateTimePicker or is there
anything I can do to keep the format the same?
I am running on XP using C++ from .NET 2003. I have an unmanaged project
that was converted from VS6.0.
Ed
--
Edward E.L. Mitchell
Web: www.racesail.org
Phone: (239)415-7039
6707 Daniel Court
Fort Myers, FL 33908