leegold Posted July 6, 2013 Posted July 6, 2013 Hi, I want to have it look a little like example 3 in the function documentation, but slightly customize it. For GUICtrlCreateDate documentation example3 theres code I don't understand. So looking at example 3 theres "$DTM_SETFORMAT_ = 0x1032 ;" what is this doing? What the "0x1032" doing? Heres the function. Thanks very much: ; example3 Func Example3() Local $date, $DTM_SETFORMAT_, $style GUICreate("My GUI get date", 200, 200, 800, 200) $date = GUICtrlCreateDate("1953/04/25", 10, 10, 185, 20) ; to select a specific default format $DTM_SETFORMAT_ = 0x1032 ; $DTM_SETFORMATW $style = "yyyy/MM/dd HH:mm:ss" GUICtrlSendMsg($date, $DTM_SETFORMAT_, 0, $style) GUISetState() While GUIGetMsg() <> $GUI_EVENT_CLOSE WEnd MsgBox(0, "Time", GUICtrlRead($date)) EndFunc ;==>Example3
water Posted July 6, 2013 Posted July 6, 2013 According to the help file this is the message type being sent to the control: "type of message to be send to the control as defined in the Windows control documentation." My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
zaNergal Posted July 6, 2013 Posted July 6, 2013 Look in the file includesDateTimeConstants.au3 for a list of messages that can be passed to the DateTimePicker. Setting the Date Format in ASCII would be 0x1005, and setting the date in Unicode 0x1032 (0x1000 + 50) Global Const $DTM_FIRST = 0x1000 Global Const $DTM_SETFORMAT = $DTM_FIRST + 5 Global Const $DTM_SETFORMATW = $DTM_FIRST + 50 ; [Unicode] Other messages you can send include setting the color, setting the font and so forth.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now