Jump to content

API & Sendmessage


JohnD
 Share

Recommended Posts

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

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

Link to comment
Share on other sites

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...