Jump to content

GUIRegisterMsg for _CreateWindowEx created windows


 Share

Recommended Posts

Hi,

I want to register a message from a GUI created with _WinAPI_CreateWindowEx().

Guiregistermsg only works for standard autoit GUIs.

I saw this function: _WinAPI_RegisterWindowMessage(), but I don't know how that works, and if it even does what I think it will do.

If anyone knows a answer,.. Please tell :)

Link to comment
Share on other sites

You have to use

$oldWindProc = _WinAPI_SetWindowLong($winhandle,$GWL_WNDPROC,DllCallBackGetPtr($MyWndProc))

The MyWndProc like this:

Func MyWinProc($hwnd,$Msg,$wParam,$lParam)
    Switch $Msg
        Case ...
        Case Else
            Return _WinAPI_CallWindowProc($oldWindProc,$hwnd,$Msg,$wParam,$lParam)
    EndSwitch
EndFunc

http://msdn.microsoft.com/en-us/library/ms633591.aspx

http://msdn.microsoft.com/en-us/library/ms633571(VS.85).aspx

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Right. The Nitifications from http://msdn.microsoft.com/en-us/library/ms632595(VS.85).aspx

And the control-specific messages, like the $LVM_ Events, too :) Possibly, you have to call the _WinAPI_CallWindowProc for Messages you handle, too if you want the original processing, too

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...