Jump to content

Search the Community

Showing results for tags 'guigetmsg(1)'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 1 result

  1. Issue: If either date picker controls receive focus, then use arrow keys to change date in edit portion, flags do not set to True until mouse move or mouse click. I have used this exact method in the past & it works perfectly. I just can't figure out what I am doing wrong here. The only thing different I can think of is I just updated my Autoit version to ;Autoit v3.3.14.0 & if it matters system I am using is running Win7 Pro x86. #include <WindowsConstants.au3> #include <GuiRichEdit.au3> #include <Date.au3> #include <DateTimeConstants.au3> #include <GUIConstantsEx.au3> ;If either date picker controls recieve focus, then use arrow keys to change date ; in edit portion, flags do not set to True until mouse move or mouse click. ;Flags set fine when drop down is closed Global $fdpLogChange = False, $fdpMainChange = False Global $hDailyLogGUI, $g_id_dpDailyLog Global $hMainGui = GUICreate("GardenBuddy", @DesktopWidth / 1.5, @DesktopHeight / 1.4, -1, -1) Global $g_id_dpMain = GUICtrlCreateDate(_NowDate(), 8, 20, 181, 25) Global $mView = GUICtrlCreateMenu("&View") Global $mPlantChart = GUICtrlCreateMenuItem("Plant Chart", $mView, 0) GUICtrlCreateMenuItem("", $mView, 1) Global $mDailyLog = GUICtrlCreateMenuItem("Daily Log", $mView, 2) GUISetState() GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") While 1 $Msg = GUIGetMsg(1) Switch $Msg[1] Case $hMainGui Switch $Msg[0] Case $GUI_EVENT_CLOSE GUIDelete($hMainGui) Exit Case $mDailyLog __CreateDailyLog() Case Else If $fdpMainChange = True Then __DateChangeMain() EndSwitch Case $hDailyLogGUI Switch $Msg[0] Case $GUI_EVENT_CLOSE GUIDelete($hDailyLogGUI) Case Else If $fdpLogChange = True Then __DateChangeDL() EndSwitch EndSwitch WEnd Func __CreateDailyLog() Local $iW = @DesktopWidth / 2, $iH = @DesktopHeight / 2 $hDailyLogGUI = GUICreate("Daily Log", $iW, $iH, -1, -1, $WS_OVERLAPPEDWINDOW) $g_reDailyLog = _GUICtrlRichEdit_Create($hDailyLogGUI, "", 0, 60, $iW, $iH - 110, _ BitOR($WS_VSCROLL, $ES_WANTRETURN, $ES_AUTOVSCROLL, $ES_MULTILINE)) _GUICtrlRichEdit_SetFont($g_reDailyLog, 12) $g_id_dpDailyLog = GUICtrlCreateDate(_NowDate(), 8, 20, 181, 25) GUISetState() EndFunc ;==>__CreateDailyLog Func __DateChangeDL();Would like to be instantly notified if user changes the date through any means. $fdpLogChange = False ConsoleWrite("Log Changed" & @CRLF) EndFunc ;==>__DateChangeDL Func __DateChangeMain() $fdpMainChange = False ConsoleWrite("Main Changed" & @CRLF) EndFunc ;==>__DateChangeMain Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) #forceref $hWnd, $iMsg, $iwParam Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $tInfo, $hWndDateDailyLog, $hWndDateMain $hWndDateDailyLog = GUICtrlGetHandle($g_id_dpDailyLog) $hWndDateMain = GUICtrlGetHandle($g_id_dpMain) $tNMHDR = DllStructCreate($tagNMHDR, $ilParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndDateDailyLog, $hWndDateMain Switch $iCode Case $DTN_DATETIMECHANGE If $iIDFrom = $g_id_dpDailyLog Then $fdpLogChange = True If $iIDFrom = $g_id_dpMain Then $fdpMainChange = True Return 0 Case $DTN_CLOSEUP ;no return value Case $DTN_USERSTRING Return 0 Case $DTN_WMKEYDOWN Return 0 EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY
×
×
  • Create New...