mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
RichTextBox updated to RICHEDIT50W
This commit is contained in:
parent
e14f35b51e
commit
9776aaf3e9
1 changed files with 15 additions and 2 deletions
|
|
@ -35,6 +35,19 @@ protected override void WndProc(ref Message m)
|
|||
|
||||
base.WndProc(ref m);
|
||||
}
|
||||
[DllImport("kernel32.dll", EntryPoint = "LoadLibraryW",
|
||||
CharSet = CharSet.Unicode, SetLastError = true)]
|
||||
private static extern IntPtr LoadLibraryW(string s_File);
|
||||
protected override CreateParams CreateParams
|
||||
{
|
||||
get
|
||||
{
|
||||
var cp = base.CreateParams;
|
||||
LoadLibraryW("MsftEdit.dll");
|
||||
cp.ClassName = "RichEdit50W";
|
||||
return cp;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnHandleCreated(EventArgs e)
|
||||
{
|
||||
|
|
@ -44,8 +57,9 @@ protected override void OnHandleCreated(EventArgs e)
|
|||
AutoWordSelection = true;
|
||||
AutoWordSelection = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class RichTextBoxPadding
|
||||
{
|
||||
public static void SetInnerMargins(this TextBoxBase textBox, int left, int top, int right, int bottom)
|
||||
|
|
@ -117,6 +131,5 @@ public static void ResumeDrawing(this RichTextBox richTextBox)
|
|||
richTextBox.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue