Sign in to follow this  
Followers 0
Kip

GUIRegisterMsg for _CreateWindowEx created windows

6 posts in this topic

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 :)

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  
Followers 0