Explanation of SendMessage message numbers? (C#, Winforms)
Posted
by John
on Stack Overflow
See other posts from Stack Overflow
or by John
Published on 2008-10-15T20:11:20Z
Indexed on
2010/03/22
18:11 UTC
Read the original article
Hit count: 1295
I've successfully used the Windows SendMessage method to help me do various things in my text editor, but each time I am just copying and pasting code suggested by others, and I don't really know what it means. There is always a cryptic message number that is a parameter. How do I know what these code numbers mean so that I can actually understand what is happening and (hopefully) be a little more self-sufficient in the future? Thanks.
Recent example:
using System.Runtime.InteropServices;
[DllImport("user32.dll")]
static extern int SendMessage(IntPtr hWnd, uint wMsg,UIntPtr wParam, IntPtr lParam);
SendMessage(myRichTextBox.Handle, (uint)0x00B6, (UIntPtr)0, (IntPtr)(-1));
© Stack Overflow or respective owner