Search the Community

Showing results for tags 'winproc'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Chat
    • 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

Categories

  • Forum
  • AutoIt

Calendars

  • Community Calendar

Found 1 result

  1. Hi all, I am playing with this script. It only responds to WM_PAINT message. And it is not quitting when i click the close button. Please look at the script. #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> Global $g_hProcOld, $g_hNewProc Local $hForm1, $g_bExit = False Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form= $hForm1 = GUICreate("Hello Program", 550, 306, 277, 153) Local $hLabel1 = GUICtrlCreateLabel("Hello from AutoIt", 200, 120, 136, 17) GUICtrlSetOnEvent(-1, "Label1Click") Local $hBtn = GUICtrlCreateButton("Click", 100, 100, 86, 57) GUICtrlSetOnEvent(-1, "BtClick") $g_hNewProc = DllCallbackRegister('_WndProc', 'LRESULT', 'hwnd;uint;wparam;lparam') $g_hProcOld = _WinAPI_SetWindowLong($hForm1, $GWL_WNDPROC,DllCallbackGetPtr($g_hNewProc)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(10) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd #Region ctrl funcs Func Label1Click() EndFunc Func BtClick() EndFunc #EndRegion ctrl funcs DllCallbackFree($g_hNewProc) Func _WndProc($hWnd, $iMsg, $wParam, $lParam) Switch $iMsg Case $WM_CLOSE _WinAPI_DestroyWindow($hForm1) Case $WM_CREATE ConsoleWrite("Just Created" & @CRLF) Case $WM_PAINT ConsoleWrite("Wondow Painted" & @CRLF) Case $WM_KEYDOWN ConsoleWrite("key pressed" & @CRLF) EndSwitch Return _WinAPI_CallWindowProc($g_hProcOld,$hWnd, $iMsg, $wParam, $lParam) EndFunc ;==>_WndProc