日期里面设置的那种复选框用复选框方法怎么没有效果?
本帖最后由 qsy666888 于 2018-4-27 21:50 编辑日期里面有一个可以加复选框,判断是否要选择日期,用复选框的方法,好像不能用了,不知道还有其它什么方法?
#include <DateTimeConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 350, 160, 192, 124)
$Date1 = GUICtrlCreateDate("2018/04/08", 72, 48, 186, 21,$DTS_LONGDATEFORMAT +$DTS_SHOWNONE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Date1
If BitAND(GUICtrlRead($Date1), $GUI_CHECKED) Then
MsgBox(0,'','已选中')
Else
MsgBox(0,'',$DTS_SHOWNONE)
EndIf
EndSwitch
WEnd 回复 1# qsy666888
#include <DateTimeConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 350, 160, 192, 124)
$Date1 = GUICtrlCreateDate("2018/04/08", 72, 48, 186, 21,$DTS_LONGDATEFORMAT +$DTS_SHOWNONE)
$Datum_hwnd = GUICtrlGetHandle($Date1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Date1
$lParam = GUICtrlRecvMsg ($Date1, $DTM_GETSYSTEMTIME, 0, 1)
If Asc (StringMid ($lParam, 1, 1))=48 Then
$state = 'checked'
Else
$state = 'unchecked'
EndIf
MsgBox(0, "", $state)
EndSwitch
WEnd 回复 2# kk_lee69
感谢 kk-lee69,我还在研究准备用消息模式呢
页:
[1]