Jump to content

Search the Community

Showing results for tags 'peekmessage'.

  • 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 guys, I need to send a message (WM_APP message) to my thread and return immediatly, I tried to do it using PostMessage (a no-blocking function) with hWnd param = Null (it posts the message to the thread message queue). I tried to get the message from the queue using PeekMessage (another function that returns immediatly) but it can't try the message. I'm able to post and retrieve a message from a window message queue (using GUIRegisterMsg, it would be useful to know its source code) but it would be better if I could use the thread message queue. I really don't understand why PeekMessage doesn't retrieve the message posted. $iMsg = 0x8000 $tagPOINT = "struct; long x; long y; endstruct" $tagMSG = "hwnd Hwnd;uint message;wparam wParam;lparam lParam;dword time;" & $tagPOINT $tMSG = DllStructCreate($tagMSG) $pMSG = DllStructGetPtr($tMSG) $hwnd = GUICreate("GUI") $aResult = DllCall("user32.dll", "bool", "PostMessage", "hwnd", Null, "uint", $iMsg, "wparam", "some", "lparam", "thing") ;$aResult[0] = 1 -----> the message is posted to the thread message queue $aResult = DllCall("user32.dll", "bool", "PeekMessage", "ptr", $pMSG, "hwnd", Null, "uint", $iMsg, "uint", $iMsg, "uint", 1) ;@error = 0 -----> DllCall doesn't fail ;$aResult[0] = 0 ----> PeekMessage doesn't retrieve the message If $aResult[0] <> 0 Then ConsoleWrite(DllStructGetData($tMSG, "wParam") & @CRLF) Exit Else For $i = 1 To 4 Beep(800, 250) Next EndIf
×
×
  • Create New...