Sign in to follow this  
Followers 0
JohnD

API & Sendmessage

4 posts in this topic

Hey everyone. I could use some help with the correct usage of this API call. As I mentioned in my previous post I am just experimenting on my own GUI using API calls. That being said, I know I can do the same thing using the following:

GUICtrlSendMsg($Edit1 , $WM_SETTEXT, 0, "Hello World.")

But I will be eventually using this call on other application windows so I need to use the API. Here is what I have.

$result = DllCall("user32.dll", "int", "Sendmessage", "hwnd", GUICtrlGetHandle($Edit1), "ULONG", $WM_SETTEXT, "WPARAM", 0, "LPARAM", "Hello World.")

I have a valid handle being returned for edit1.

Any help is appreciated.

Thanks.

-John

Share this post


Link to post
Share on other sites



Hey everyone. I could use some help with the correct usage of this API call. As I mentioned in my previous post I am just experimenting on my own GUI using API calls. That being said, I know I can do the same thing using the following:

GUICtrlSendMsg($Edit1 , $WM_SETTEXT, 0, "Hello World.")

But I will be eventually using this call on other application windows so I need to use the API. Here is what I have.

$result = DllCall("user32.dll", "int", "Sendmessage", "hwnd", GUICtrlGetHandle($Edit1), "ULONG", $WM_SETTEXT, "WPARAM", 0, "LPARAM", "Hello World.")

I have a valid handle being returned for edit1.

Any help is appreciated.

Thanks.

-John

I know I can use the native function, but like i said I am eventually going to use this with controls outside of my application. Does anyone know what may be wrong with the above dllcall? thanks

Share this post


Link to post
Share on other sites

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