Originally posted by: Sandip Shahane
Hi,
I am using CDateTimeCtrl.cpp a wrapper class over date time picker control in VC 6.0. While moving my code base to VC 7.1 it gives me following errors in the message map section. How can i fix this.
DateTimeCtrl.cpp(121) : error C2440: 'static_cast' : cannot convert from 'BOOL (__thiscall CDateTimeCtrl::* )(NMDATETIMEFORMATW *,LRESULT *)' to 'BOOL (__thiscall CCmdTarget::* )(NMHDR *,LRESULT *)'
None of the functions with this name in scope match the target type
the code piece is as follows:
BEGIN_MESSAGE_MAP(CDateTimeCtrl, CWnd)
//{{AFX_MSG_MAP(CDateTimeCtrl)
//}}AFX_MSG_MAP
ON_NOTIFY_REFLECT(DTN_DATETIMECHANGE, OnDateTimeChangeNotify)
ON_NOTIFY_REFLECT_EX(DTN_DROPDOWN, OnDropDown)
ON_NOTIFY_REFLECT_EX(DTN_CLOSEUP, OnCloseUp)
ON_NOTIFY_REFLECT_EX(DTN_FORMAT, OnFormat)
ON_NOTIFY_REFLECT_EX(DTN_FORMATQUERY, OnFormatQuery)
ON_NOTIFY_REFLECT_EX(DTN_USERSTRING, OnUserString)
ON_NOTIFY_REFLECT_EX(DTN_WMKEYDOWN, OnKeyDown)
ON_NOTIFY_REFLECT_EX(NM_SETFOCUS, OnDateTimeChangeNotify)
END_MESSAGE_MAP()
Thanks in advance.
In the message handler, change the parameter from NMDATETIMEFORMATW* back to NMHDR*, add a variable of type NMDATETIMEFORMATW* and assign the value of parameter to the variable by casting it from NMDATETIMEFORMATW* to NMHDR*. Use the variable instead of the parameter in the handler
ReplyOriginally posted by: Dmitry
How disappear arrows the DTP control to modify date values?
I need that DTP control was in time mode and without arrows.
DTS_UPDOWN style is not aid. Please, help me.
Originally posted by: Tammam de Dragonfly
if I choose the DTS_SHOWNONE style how can i get a notification if the user disable the DateTimeCtrl by unchecking the small checkbox that appears inside the control
thanx
Originally posted by: Chris
The calandar font size changes randomly when I use cdatetimectrl. Sometimes the calendar will display very large diagonal font making the calendar very large on the display. Has anyone seen this problem or have a fix?
Reply
Originally posted by: ben
hi...
i want to access a cdatetimectrl-element in the browser window of a mfc application. is there any possibility to create such a ctrl through html code?
(it is realized this way in the "start->search->search files->search options/date" function in win2000)
thanks for any help...
ReplyOriginally posted by: Ruthy
Will appreciate if someone could send an example of using the CDateTimeCtrl with a modified format.
I need to get Milliseconds in the time format.
Thax
Originally posted by: Mike Philips
Regards,
If you would like to check, please feel free to download a nice calendar here
http://www.exontrol.com/sg.jsp?content=products/excalendar
Mike
Originally posted by: Patricia
Can you tell me if it is possible to change the color of the text appearing in the edit? The WM_CTCOLOR seems to not work...It is quite easy to change the background color but for the text it seems impossible!
Is it possible to display the date time control as edit only without spin?
Originally posted by: Ralf Hartmann
I have changed DTS_APPCANPARSE to true in your example and know i have the problem, that some changes (full replace, character delete or insert) in the edit field are revoked after leaving the field. Maybe this is an knwon bug in my environment (NT 4.0 SP6, VC++ 6.0, SP4). Or is there any additional message which have to be handled?
Originally posted by: seowontae
Hi...
I want to display like "2001-08-02" using DateTimepicker control
Reply