|
-
December 15th, 2010, 02:50 AM
#1
SendMessage
[DllImport("user32.dll", CharSet = CharSet.Auto)]
internal static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, Int32 wParam, [MarshalAs(UnmanagedType.LPStr)] StringBuilder lParam);
public const int WM_GETTEXT = 0x000D;
In the function I'd like to get the text in an edit box
I call it like this
SendMessage(p, Win32System.WM_GETTEXT, wtxt.Capacity, wtxt);
where p is the handle to the editbox, wtxt is a stringbuilder instance
But the string value I get finally always the first character of the editbox 
Could someone please help me ?
Thank you
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|