Jump to content

Search the Community

Showing results for tags '$wm_create'.

  • 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


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi all, i am playing with some gui code. I am trying to do some stuff in WM_CREATE. This is my code. But this is not working. Somebody please guide me. #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <WinAPI.au3> Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form= Local $hForm1 = GUICreate("Hello Program", 550, 306, 277, 153) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close") Local $hLabel1 = GUICtrlCreateLabel("Hello from AutoIt", 200, 120, 136, 17) Local $hBtn = GUICtrlCreateButton("Click", 100, 100, 86, 57) GUICtrlSetOnEvent(-1, "BtClick") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### ;~ GUIRegisterMsg($WM_CREATE, "WM_Create") Local $idMsg = 0 $whHook = DllCallbackRegister('_WinProc', 'ptr', 'hwnd;uint;wparam;lparam') $wpHook = DllCallbackGetPtr($whHook) While 1 Sleep(50) ;~ $idMsg = GUIGetMsg() ;~ Select ;~ Case $idMsg = $WM_CREATE ;~ SoundPlay("C:\Users\Vinod\Desktop\ProgWin5\Chap03\HelloWin\HelloWin.wav",1) ;~ ;ConsoleWrite("Created" & @CRLF) ;~ Case $WM_PAINT ;~ GUICtrlSetData($hLabel1,"Label After Painted") ;~ ;ConsoleWrite("Painted" & @CRLF) ;~ Case $WM_DESTROY ;~ Exit ;~ EndSelect WEnd Func Form1Close() Exit EndFunc Func BtClick() ;$imsg = GUIGetMsg(1) ;_ArrayDisplay($imsg) SoundPlay("C:\Users\Vinod\Desktop\ProgWin5\Chap03\HelloWin\HelloWin.wav",1) EndFunc Func WM_Create($hWnd, $iMsg, $wParam, $lParam) #forceref $Hwnd, $iMsg SoundPlay("C:\Users\Vinod\Desktop\ProgWin5\Chap03\HelloWin\HelloWin.wav",1) Return 0 EndFunc Func _WinProc($hWnd, $iMsg, $wParam, $lParam) Local $hDC, $hSv, $oldMsg ConsoleWrite('_winProc $lParam: ' & $lParam / 255 & @CRLF) Switch $iMsg Case $WM_CREATE SoundPlay("C:\Users\Vinod\Desktop\ProgWin5\Chap03\HelloWin\HelloWin.wav",1) ConsoleWrite('WM_CREATE:' & @CRLF) Return 0 EndSwitch Return _WinAPI_DefWindowProc($hWnd, $iMsg, $wParam, $lParam) EndFunc ;==>_WinProc
×
×
  • Create New...