News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

DateTime Control

Started by Loneguy, January 28, 2011, 10:55:08 AM

Previous topic - Next topic

Loneguy

Hello,

How do I set the date when using the DateTime control? I used this:

                                   Invoke SetDlgItemText, hDlg, DateTimeHandle, Addr Date

but it does not work...... :-(

Could anyone help me?

fearless

Using Date and Time Picker Controls: http://msdn.microsoft.com/en-us/library/bb761815%28VS.85%29.aspx

To set the date it must be be a valid SYSTEMTIME structure, which you can use with DTM_SETSYSTEMTIME message: http://msdn.microsoft.com/en-us/library/bb761782%28v=VS.85%29.aspx

Invoke SendMessage, DateTimeHandle, DTM_SETSYSTEMTIME, GDT_VALID, Addr DateValueToSet

DateValueToSet in example would need to be a SYSTEMTIME variable: http://msdn.microsoft.com/en-us/library/ms724950%28v=VS.85%29.aspx
Ć’earless

Loneguy

It works fine. Thank you very much.