Jump to content

ccxw1983

Members
  • Posts

    3
  • Joined

  • Last visited

About ccxw1983

  • Birthday 01/26/1983

Profile Information

  • Location
    china
  • Interests
    java photography auotit ...

ccxw1983's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Manadar,Melba23, you are great, thank you very much!!!
  2. the function 'GUIRegisterMsg' do not work after the function 'GUICtrlSetStyle' is execute. #include <Date.au3> #include <Constants.au3> #include <GUIConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1); GUI OnEvent Global Const $STN_DBLCLK = 1 Local $win_main = GUICreate("", 450, 30, 450, 30) GUISetOnEvent($GUI_EVENT_CLOSE, "gui_win_tool") Local $Label = GUICtrlCreateLabel("", 0, 0, 450, 30) ;GUICtrlSetOnEvent($Label, "gui_win_tool") GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND") GUISetState(@SW_SHOW) Local $begin_ticks = _Date_Time_GetTickCount() Local $waitticks = 9000 / 1 While 1 If _Date_Time_GetTickCount() - $begin_ticks > $waitticks Then GUICtrlSetStyle($Label, $SS_CENTER) GUIRegisterMsg($WM_COMMAND, "MY_WM_COMMAND") GUICtrlSetData($Label, "double click me can not show TrayTip now! ") Else GUICtrlSetData($Label, "double click me to show TrayTip. " & @CRLF _ & "after " & Int(($waitticks - _Date_Time_GetTickCount() + $begin_ticks) / 1000) _ & " seconds, this will not work,is this a bug for GUIRegisterMsg?") EndIf Sleep(100) WEnd Func MY_WM_COMMAND($hWnd, $msg, $wParam, $lParam) ;ConsoleWrite("$hWnd=" & $hWnd & @CRLF) Local $nNotifyCode = BitShift($wParam, 16) Local $nID = BitAND($wParam, 0xFFFF) Local $hCtrl = $lParam Switch $nID Case $Label Switch $nNotifyCode Case $STN_DBLCLK TrayTip("", "dbclick at " & @HOUR & ":" & @MIN & ":" & @SEC, 1, 1) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>MY_WM_COMMAND Func gui_win_tool() Switch @GUI_CtrlId Case $GUI_EVENT_CLOSE Exit ;Case $Label ; TrayTip("", " some click at " & @HOUR & ":" & @MIN & ":" & @SEC, 1, 1) EndSwitch EndFunc ;==>gui_win_tool
  3. it seem to be difficult.
×
×
  • Create New...