Jump to content
Sign in to follow this  
jorgev

GUICtrlSendMsg to a control in a childwindow

Recommended Posts

jorgev

Hello,

_WinAPI_DeleteObject(GUICtrlSendMsg($ID_PicControl, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBitmap))

The above line of pseudo code will modify the piccontrol image, only if the piccontrol resides on a main/parent gui window.

Is there a workaround so we can receive GUICtrlSendMsg messages on all, or on a specified, child window?

 

Share this post


Link to post
Share on other sites
jorgev

I have found my error. silly, the piccontrol on my childwindow was not receiving the message(bitmap) because i defined it as a label !!!

I was mislead in my search by info on https://msdn.microsoft.com/en-us/library/windows/desktop/ms644950%28v=vs.85%29.aspx

SendMessage function

Parameters
hWnd [in]
Type: HWND
A handle to the window whose window procedure will receive the message. 
If this parameter is HWND_BROADCAST ((HWND)0xffff), the message is sent to all top-level windows in the system, 
including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to child windows.
 
So i thought it had something to do with the fact that the standard sendmessage function does not send messages to child windows, but that is'nt the case for autoit's GUICtrlSendMsg.
 
Sorry for that

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.