1
0
mirror of https://github.com/chylex/Brotli-Builder.git synced 2024-12-21 13:42:48 +01:00
Brotli-Builder/BrotliBuilder/Utils/NativeMethods.cs

18 lines
548 B
C#

using System;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace BrotliBuilder.Utils{
static class NativeMethods{
public const int EM_SETTEXTMODE = 0x459;
public const int TM_PLAINTEXT = 1;
[DllImport("user32.dll")]
public static extern IntPtr SendMessage(IntPtr hWnd, int wMsg, IntPtr wParam, IntPtr lParam);
public static void SetPlainTextMode(this RichTextBox tb){
SendMessage(tb.Handle, EM_SETTEXTMODE, (IntPtr)TM_PLAINTEXT, IntPtr.Zero);
}
}
}