зеркало из https://github.com/dotnet/winforms.git
Add EM enum in Interop Richedit (#3495)
This commit is contained in:
Родитель
c7e371c86b
Коммит
5ce6498688
|
@ -1,116 +0,0 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using static Interop.User32;
|
||||
|
||||
internal static partial class Interop
|
||||
{
|
||||
/// <summary>
|
||||
/// RichTextBox Control Messages. Note that some messages have the same name but different value compared to normal Edit Control Messages.
|
||||
/// Copied form richedit.h
|
||||
/// </summary>
|
||||
public static class RichEditMessages
|
||||
{
|
||||
public const int EM_CANPASTE = (int)WM.USER + 50;
|
||||
public const int EM_DISPLAYBAND = (int)WM.USER + 51;
|
||||
public const int EM_EXGETSEL = (int)WM.USER + 52;
|
||||
public const int EM_EXLIMITTEXT = (int)WM.USER + 53;
|
||||
public const int EM_EXLINEFROMCHAR = (int)WM.USER + 54;
|
||||
public const int EM_EXSETSEL = (int)WM.USER + 55;
|
||||
public const int EM_FINDTEXT = (int)WM.USER + 56;
|
||||
public const int EM_FORMATRANGE = (int)WM.USER + 57;
|
||||
public const int EM_GETCHARFORMAT = (int)WM.USER + 58;
|
||||
public const int EM_GETEVENTMASK = (int)WM.USER + 59;
|
||||
public const int EM_GETOLEINTERFACE = (int)WM.USER + 60;
|
||||
public const int EM_GETPARAFORMAT = (int)WM.USER + 61;
|
||||
public const int EM_GETSELTEXT = (int)WM.USER + 62;
|
||||
public const int EM_HIDESELECTION = (int)WM.USER + 63;
|
||||
public const int EM_PASTESPECIAL = (int)WM.USER + 64;
|
||||
public const int EM_REQUESTRESIZE = (int)WM.USER + 65;
|
||||
public const int EM_SELECTIONTYPE = (int)WM.USER + 66;
|
||||
public const int EM_SETBKGNDCOLOR = (int)WM.USER + 67;
|
||||
public const int EM_SETCHARFORMAT = (int)WM.USER + 68;
|
||||
public const int EM_SETEVENTMASK = (int)WM.USER + 69;
|
||||
public const int EM_SETOLECALLBACK = (int)WM.USER + 70;
|
||||
public const int EM_SETPARAFORMAT = (int)WM.USER + 71;
|
||||
public const int EM_SETTARGETDEVICE = (int)WM.USER + 72;
|
||||
public const int EM_STREAMIN = (int)WM.USER + 73;
|
||||
public const int EM_STREAMOUT = (int)WM.USER + 74;
|
||||
public const int EM_GETTEXTRANGE = (int)WM.USER + 75;
|
||||
public const int EM_FINDWORDBREAK = (int)WM.USER + 76;
|
||||
public const int EM_SETOPTIONS = (int)WM.USER + 77;
|
||||
public const int EM_GETOPTIONS = (int)WM.USER + 78;
|
||||
public const int EM_FINDTEXTEX = (int)WM.USER + 79;
|
||||
public const int EM_GETWORDBREAKPROCEX = (int)WM.USER + 80;
|
||||
public const int EM_SETWORDBREAKPROCEX = (int)WM.USER + 81;
|
||||
|
||||
// Richedit v2.0 messages
|
||||
public const int EM_SETUNDOLIMIT = (int)WM.USER + 82;
|
||||
public const int EM_REDO = (int)WM.USER + 84;
|
||||
public const int EM_CANREDO = (int)WM.USER + 85;
|
||||
public const int EM_GETUNDONAME = (int)WM.USER + 86;
|
||||
public const int EM_GETREDONAME = (int)WM.USER + 87;
|
||||
public const int EM_STOPGROUPTYPING = (int)WM.USER + 88;
|
||||
|
||||
public const int EM_SETTEXTMODE = (int)WM.USER + 89;
|
||||
public const int EM_GETTEXTMODE = (int)WM.USER + 90;
|
||||
|
||||
public const int EM_AUTOURLDETECT = (int)WM.USER + 91;
|
||||
public const int EM_GETAUTOURLDETECT = (int)WM.USER + 92;
|
||||
public const int EM_SETPALETTE = (int)WM.USER + 93;
|
||||
public const int EM_GETTEXTEX = (int)WM.USER + 94;
|
||||
public const int EM_GETTEXTLENGTHEX = (int)WM.USER + 95;
|
||||
|
||||
// Asia specific messages
|
||||
public const int EM_SETPUNCTUATION = (int)WM.USER + 100;
|
||||
public const int EM_GETPUNCTUATION = (int)WM.USER + 101;
|
||||
public const int EM_SETWORDWRAPMODE = (int)WM.USER + 102;
|
||||
public const int EM_GETWORDWRAPMODE = (int)WM.USER + 103;
|
||||
public const int EM_SETIMECOLOR = (int)WM.USER + 104;
|
||||
public const int EM_GETIMECOLOR = (int)WM.USER + 105;
|
||||
public const int EM_SETIMEOPTIONS = (int)WM.USER + 106;
|
||||
public const int EM_GETIMEOPTIONS = (int)WM.USER + 107;
|
||||
public const int EM_CONVPOSITION = (int)WM.USER + 108;
|
||||
|
||||
public const int EM_SETLANGOPTIONS = (int)WM.USER + 120;
|
||||
public const int EM_GETLANGOPTIONS = (int)WM.USER + 121;
|
||||
public const int EM_GETIMECOMPMODE = (int)WM.USER + 122;
|
||||
|
||||
public const int EM_FINDTEXTW = (int)WM.USER + 123;
|
||||
public const int EM_FINDTEXTEXW = (int)WM.USER + 124;
|
||||
|
||||
// Rich TextBox 3.0 Asia msgs
|
||||
public const int EM_RECONVERSION = (int)WM.USER + 125;
|
||||
public const int EM_SETIMEMODEBIAS = (int)WM.USER + 126;
|
||||
public const int EM_GETIMEMODEBIAS = (int)WM.USER + 127;
|
||||
|
||||
// BiDi Specific messages
|
||||
public const int EM_SETBIDIOPTIONS = (int)WM.USER + 200;
|
||||
public const int EM_GETBIDIOPTIONS = (int)WM.USER + 201;
|
||||
|
||||
public const int EM_SETTYPOGRAPHYOPTIONS = (int)WM.USER + 202;
|
||||
public const int EM_GETTYPOGRAPHYOPTIONS = (int)WM.USER + 203;
|
||||
|
||||
// Extended TextBox style specific messages
|
||||
public const int EM_SETEDITSTYLE = (int)WM.USER + 204;
|
||||
public const int EM_GETEDITSTYLE = (int)WM.USER + 205;
|
||||
|
||||
// Ole Objects Disabling message
|
||||
public const int EM_SETQUERYRTFOBJ = (int)WM.USER + 270;
|
||||
|
||||
// Pegasus outline mode messages (RE 3.0)
|
||||
|
||||
// Outline mode message
|
||||
public const int EM_OUTLINE = (int)WM.USER + 220;
|
||||
|
||||
// Message for getting and restoring scroll pos
|
||||
public const int EM_GETSCROLLPOS = (int)WM.USER + 221;
|
||||
public const int EM_SETSCROLLPOS = (int)WM.USER + 222;
|
||||
|
||||
// Change fontsize in current selection by wparam
|
||||
public const int EM_SETFONTSIZE = (int)WM.USER + 223;
|
||||
public const int EM_GETZOOM = (int)WM.USER + 224;
|
||||
public const int EM_SETZOOM = (int)WM.USER + 225;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using static Interop.User32;
|
||||
|
||||
internal partial class Interop
|
||||
{
|
||||
internal static partial class Richedit
|
||||
{
|
||||
public enum EM
|
||||
{
|
||||
CANPASTE = (int)WM.USER + 50,
|
||||
DISPLAYBAND = (int)WM.USER + 51,
|
||||
EXGETSEL = (int)WM.USER + 52,
|
||||
EXLIMITTEXT = (int)WM.USER + 53,
|
||||
EXLINEFROMCHAR = (int)WM.USER + 54,
|
||||
EXSETSEL = (int)WM.USER + 55,
|
||||
FINDTEXT = (int)WM.USER + 56,
|
||||
FORMATRANGE = (int)WM.USER + 57,
|
||||
GETCHARFORMAT = (int)WM.USER + 58,
|
||||
GETEVENTMASK = (int)WM.USER + 59,
|
||||
GETOLEINTERFACE = (int)WM.USER + 60,
|
||||
GETPARAFORMAT = (int)WM.USER + 61,
|
||||
GETSELTEXT = (int)WM.USER + 62,
|
||||
HIDESELECTION = (int)WM.USER + 63,
|
||||
PASTESPECIAL = (int)WM.USER + 64,
|
||||
REQUESTRESIZE = (int)WM.USER + 65,
|
||||
SELECTIONTYPE = (int)WM.USER + 66,
|
||||
SETBKGNDCOLOR = (int)WM.USER + 67,
|
||||
SETCHARFORMAT = (int)WM.USER + 68,
|
||||
SETEVENTMASK = (int)WM.USER + 69,
|
||||
SETOLECALLBACK = (int)WM.USER + 70,
|
||||
SETPARAFORMAT = (int)WM.USER + 71,
|
||||
SETTARGETDEVICE = (int)WM.USER + 72,
|
||||
STREAMIN = (int)WM.USER + 73,
|
||||
STREAMOUT = (int)WM.USER + 74,
|
||||
GETTEXTRANGE = (int)WM.USER + 75,
|
||||
FINDWORDBREAK = (int)WM.USER + 76,
|
||||
SETOPTIONS = (int)WM.USER + 77,
|
||||
GETOPTIONS = (int)WM.USER + 78,
|
||||
FINDTEXTEX = (int)WM.USER + 79,
|
||||
GETWORDBREAKPROCEX = (int)WM.USER + 80,
|
||||
SETWORDBREAKPROCEX = (int)WM.USER + 81,
|
||||
|
||||
// Richedit v2.0 messages
|
||||
SETUNDOLIMIT = (int)WM.USER + 82,
|
||||
REDO = (int)WM.USER + 84,
|
||||
CANREDO = (int)WM.USER + 85,
|
||||
GETUNDONAME = (int)WM.USER + 86,
|
||||
GETREDONAME = (int)WM.USER + 87,
|
||||
STOPGROUPTYPING = (int)WM.USER + 88,
|
||||
|
||||
SETTEXTMODE = (int)WM.USER + 89,
|
||||
GETTEXTMODE = (int)WM.USER + 90,
|
||||
|
||||
AUTOURLDETECT = (int)WM.USER + 91,
|
||||
GETAUTOURLDETECT = (int)WM.USER + 92,
|
||||
SETPALETTE = (int)WM.USER + 93,
|
||||
GETTEXTEX = (int)WM.USER + 94,
|
||||
GETTEXTLENGTHEX = (int)WM.USER + 95,
|
||||
|
||||
// Asia specific messages
|
||||
SETPUNCTUATION = (int)WM.USER + 100,
|
||||
GETPUNCTUATION = (int)WM.USER + 101,
|
||||
SETWORDWRAPMODE = (int)WM.USER + 102,
|
||||
GETWORDWRAPMODE = (int)WM.USER + 103,
|
||||
SETIMECOLOR = (int)WM.USER + 104,
|
||||
GETIMECOLOR = (int)WM.USER + 105,
|
||||
SETIMEOPTIONS = (int)WM.USER + 106,
|
||||
GETIMEOPTIONS = (int)WM.USER + 107,
|
||||
CONVPOSITION = (int)WM.USER + 108,
|
||||
|
||||
SETLANGOPTIONS = (int)WM.USER + 120,
|
||||
GETLANGOPTIONS = (int)WM.USER + 121,
|
||||
GETIMECOMPMODE = (int)WM.USER + 122,
|
||||
|
||||
FINDTEXTW = (int)WM.USER + 123,
|
||||
FINDTEXTEXW = (int)WM.USER + 124,
|
||||
|
||||
// Rich TextBox 3.0 Asia msgs
|
||||
RECONVERSION = (int)WM.USER + 125,
|
||||
SETIMEMODEBIAS = (int)WM.USER + 126,
|
||||
GETIMEMODEBIAS = (int)WM.USER + 127,
|
||||
|
||||
// BiDi Specific messages
|
||||
SETBIDIOPTIONS = (int)WM.USER + 200,
|
||||
GETBIDIOPTIONS = (int)WM.USER + 201,
|
||||
|
||||
SETTYPOGRAPHYOPTIONS = (int)WM.USER + 202,
|
||||
GETTYPOGRAPHYOPTIONS = (int)WM.USER + 203,
|
||||
|
||||
// Extended TextBox style specific messages
|
||||
SETEDITSTYLE = (int)WM.USER + 204,
|
||||
GETEDITSTYLE = (int)WM.USER + 205,
|
||||
|
||||
// Ole Objects Disabling message
|
||||
SETQUERYRTFOBJ = (int)WM.USER + 270,
|
||||
|
||||
// Pegasus outline mode messages (RE 3.0)
|
||||
|
||||
// Outline mode message
|
||||
OUTLINE = (int)WM.USER + 220,
|
||||
|
||||
// Message for getting and restoring scroll pos
|
||||
GETSCROLLPOS = (int)WM.USER + 221,
|
||||
SETSCROLLPOS = (int)WM.USER + 222,
|
||||
|
||||
// Change fontsize in current selection by wparam
|
||||
SETFONTSIZE = (int)WM.USER + 223,
|
||||
GETZOOM = (int)WM.USER + 224,
|
||||
SETZOOM = (int)WM.USER + 225,
|
||||
}
|
||||
}
|
||||
}
|
|
@ -609,218 +609,218 @@ namespace System.Windows.Forms
|
|||
case (int)User32.EM.SCROLLCARET:
|
||||
text = "EM_SCROLLCARET";
|
||||
break;
|
||||
case RichEditMessages.EM_CANPASTE:
|
||||
case (int)Richedit.EM.CANPASTE:
|
||||
text = "EM_CANPASTE";
|
||||
break;
|
||||
case RichEditMessages.EM_DISPLAYBAND:
|
||||
case (int)Richedit.EM.DISPLAYBAND:
|
||||
text = "EM_DISPLAYBAND";
|
||||
break;
|
||||
case RichEditMessages.EM_EXGETSEL:
|
||||
case (int)Richedit.EM.EXGETSEL:
|
||||
text = "EM_EXGETSEL";
|
||||
break;
|
||||
case RichEditMessages.EM_EXLIMITTEXT:
|
||||
case (int)Richedit.EM.EXLIMITTEXT:
|
||||
text = "EM_EXLIMITTEXT";
|
||||
break;
|
||||
case RichEditMessages.EM_EXLINEFROMCHAR:
|
||||
case (int)Richedit.EM.EXLINEFROMCHAR:
|
||||
text = "EM_EXLINEFROMCHAR";
|
||||
break;
|
||||
case RichEditMessages.EM_EXSETSEL:
|
||||
case (int)Richedit.EM.EXSETSEL:
|
||||
text = "EM_EXSETSEL";
|
||||
break;
|
||||
case RichEditMessages.EM_FINDTEXT:
|
||||
case (int)Richedit.EM.FINDTEXT:
|
||||
text = "EM_FINDTEXT";
|
||||
break;
|
||||
case RichEditMessages.EM_FORMATRANGE:
|
||||
case (int)Richedit.EM.FORMATRANGE:
|
||||
text = "EM_FORMATRANGE";
|
||||
break;
|
||||
case RichEditMessages.EM_GETCHARFORMAT:
|
||||
case (int)Richedit.EM.GETCHARFORMAT:
|
||||
text = "EM_GETCHARFORMAT";
|
||||
break;
|
||||
case RichEditMessages.EM_GETEVENTMASK:
|
||||
case (int)Richedit.EM.GETEVENTMASK:
|
||||
text = "EM_GETEVENTMASK";
|
||||
break;
|
||||
case RichEditMessages.EM_GETOLEINTERFACE:
|
||||
case (int)Richedit.EM.GETOLEINTERFACE:
|
||||
text = "EM_GETOLEINTERFACE";
|
||||
break;
|
||||
case RichEditMessages.EM_GETPARAFORMAT:
|
||||
case (int)Richedit.EM.GETPARAFORMAT:
|
||||
text = "EM_GETPARAFORMAT";
|
||||
break;
|
||||
case RichEditMessages.EM_GETSELTEXT:
|
||||
case (int)Richedit.EM.GETSELTEXT:
|
||||
text = "EM_GETSELTEXT";
|
||||
break;
|
||||
case RichEditMessages.EM_HIDESELECTION:
|
||||
case (int)Richedit.EM.HIDESELECTION:
|
||||
text = "EM_HIDESELECTION";
|
||||
break;
|
||||
case RichEditMessages.EM_PASTESPECIAL:
|
||||
case (int)Richedit.EM.PASTESPECIAL:
|
||||
text = "EM_PASTESPECIAL";
|
||||
break;
|
||||
case RichEditMessages.EM_REQUESTRESIZE:
|
||||
case (int)Richedit.EM.REQUESTRESIZE:
|
||||
text = "EM_REQUESTRESIZE";
|
||||
break;
|
||||
case RichEditMessages.EM_SELECTIONTYPE:
|
||||
case (int)Richedit.EM.SELECTIONTYPE:
|
||||
text = "EM_SELECTIONTYPE";
|
||||
break;
|
||||
case RichEditMessages.EM_SETBKGNDCOLOR:
|
||||
case (int)Richedit.EM.SETBKGNDCOLOR:
|
||||
text = "EM_SETBKGNDCOLOR";
|
||||
break;
|
||||
case RichEditMessages.EM_SETCHARFORMAT:
|
||||
case (int)Richedit.EM.SETCHARFORMAT:
|
||||
text = "EM_SETCHARFORMAT";
|
||||
break;
|
||||
case RichEditMessages.EM_SETEVENTMASK:
|
||||
case (int)Richedit.EM.SETEVENTMASK:
|
||||
text = "EM_SETEVENTMASK";
|
||||
break;
|
||||
case RichEditMessages.EM_SETOLECALLBACK:
|
||||
case (int)Richedit.EM.SETOLECALLBACK:
|
||||
text = "EM_SETOLECALLBACK";
|
||||
break;
|
||||
case RichEditMessages.EM_SETPARAFORMAT:
|
||||
case (int)Richedit.EM.SETPARAFORMAT:
|
||||
text = "EM_SETPARAFORMAT";
|
||||
break;
|
||||
case RichEditMessages.EM_SETTARGETDEVICE:
|
||||
case (int)Richedit.EM.SETTARGETDEVICE:
|
||||
text = "EM_SETTARGETDEVICE";
|
||||
break;
|
||||
case RichEditMessages.EM_STREAMIN:
|
||||
case (int)Richedit.EM.STREAMIN:
|
||||
text = "EM_STREAMIN";
|
||||
break;
|
||||
case RichEditMessages.EM_STREAMOUT:
|
||||
case (int)Richedit.EM.STREAMOUT:
|
||||
text = "EM_STREAMOUT";
|
||||
break;
|
||||
case RichEditMessages.EM_GETTEXTRANGE:
|
||||
case (int)Richedit.EM.GETTEXTRANGE:
|
||||
text = "EM_GETTEXTRANGE";
|
||||
break;
|
||||
case RichEditMessages.EM_FINDWORDBREAK:
|
||||
case (int)Richedit.EM.FINDWORDBREAK:
|
||||
text = "EM_FINDWORDBREAK";
|
||||
break;
|
||||
case RichEditMessages.EM_SETOPTIONS:
|
||||
case (int)Richedit.EM.SETOPTIONS:
|
||||
text = "EM_SETOPTIONS";
|
||||
break;
|
||||
case RichEditMessages.EM_GETOPTIONS:
|
||||
case (int)Richedit.EM.GETOPTIONS:
|
||||
text = "EM_GETOPTIONS";
|
||||
break;
|
||||
case RichEditMessages.EM_FINDTEXTEX:
|
||||
case (int)Richedit.EM.FINDTEXTEX:
|
||||
text = "EM_FINDTEXTEX";
|
||||
break;
|
||||
case RichEditMessages.EM_GETWORDBREAKPROCEX:
|
||||
case (int)Richedit.EM.GETWORDBREAKPROCEX:
|
||||
text = "EM_GETWORDBREAKPROCEX";
|
||||
break;
|
||||
case RichEditMessages.EM_SETWORDBREAKPROCEX:
|
||||
case (int)Richedit.EM.SETWORDBREAKPROCEX:
|
||||
text = "EM_SETWORDBREAKPROCEX";
|
||||
break;
|
||||
|
||||
// Richedit v2.0 messages
|
||||
case RichEditMessages.EM_SETUNDOLIMIT:
|
||||
case (int)Richedit.EM.SETUNDOLIMIT:
|
||||
text = "EM_SETUNDOLIMIT";
|
||||
break;
|
||||
case RichEditMessages.EM_REDO:
|
||||
case (int)Richedit.EM.REDO:
|
||||
text = "EM_REDO";
|
||||
break;
|
||||
case RichEditMessages.EM_CANREDO:
|
||||
case (int)Richedit.EM.CANREDO:
|
||||
text = "EM_CANREDO";
|
||||
break;
|
||||
case RichEditMessages.EM_GETUNDONAME:
|
||||
case (int)Richedit.EM.GETUNDONAME:
|
||||
text = "EM_GETUNDONAME";
|
||||
break;
|
||||
case RichEditMessages.EM_GETREDONAME:
|
||||
case (int)Richedit.EM.GETREDONAME:
|
||||
text = "EM_GETREDONAME";
|
||||
break;
|
||||
case RichEditMessages.EM_STOPGROUPTYPING:
|
||||
case (int)Richedit.EM.STOPGROUPTYPING:
|
||||
text = "EM_STOPGROUPTYPING";
|
||||
break;
|
||||
case RichEditMessages.EM_SETTEXTMODE:
|
||||
case (int)Richedit.EM.SETTEXTMODE:
|
||||
text = "EM_SETTEXTMODE";
|
||||
break;
|
||||
case RichEditMessages.EM_GETTEXTMODE:
|
||||
case (int)Richedit.EM.GETTEXTMODE:
|
||||
text = "EM_GETTEXTMODE";
|
||||
break;
|
||||
case RichEditMessages.EM_AUTOURLDETECT:
|
||||
case (int)Richedit.EM.AUTOURLDETECT:
|
||||
text = "EM_AUTOURLDETECT";
|
||||
break;
|
||||
case RichEditMessages.EM_GETAUTOURLDETECT:
|
||||
case (int)Richedit.EM.GETAUTOURLDETECT:
|
||||
text = "EM_GETAUTOURLDETECT";
|
||||
break;
|
||||
case RichEditMessages.EM_SETPALETTE:
|
||||
case (int)Richedit.EM.SETPALETTE:
|
||||
text = "EM_SETPALETTE";
|
||||
break;
|
||||
case RichEditMessages.EM_GETTEXTEX:
|
||||
case (int)Richedit.EM.GETTEXTEX:
|
||||
text = "EM_GETTEXTEX";
|
||||
break;
|
||||
case RichEditMessages.EM_GETTEXTLENGTHEX:
|
||||
case (int)Richedit.EM.GETTEXTLENGTHEX:
|
||||
text = "EM_GETTEXTLENGTHEX";
|
||||
break;
|
||||
|
||||
// Asia specific messages
|
||||
case RichEditMessages.EM_SETPUNCTUATION:
|
||||
case (int)Richedit.EM.SETPUNCTUATION:
|
||||
text = "EM_SETPUNCTUATION";
|
||||
break;
|
||||
case RichEditMessages.EM_GETPUNCTUATION:
|
||||
case (int)Richedit.EM.GETPUNCTUATION:
|
||||
text = "EM_GETPUNCTUATION";
|
||||
break;
|
||||
case RichEditMessages.EM_SETWORDWRAPMODE:
|
||||
case (int)Richedit.EM.SETWORDWRAPMODE:
|
||||
text = "EM_SETWORDWRAPMODE";
|
||||
break;
|
||||
case RichEditMessages.EM_GETWORDWRAPMODE:
|
||||
case (int)Richedit.EM.GETWORDWRAPMODE:
|
||||
text = "EM_GETWORDWRAPMODE";
|
||||
break;
|
||||
case RichEditMessages.EM_SETIMECOLOR:
|
||||
case (int)Richedit.EM.SETIMECOLOR:
|
||||
text = "EM_SETIMECOLOR";
|
||||
break;
|
||||
case RichEditMessages.EM_GETIMECOLOR:
|
||||
case (int)Richedit.EM.GETIMECOLOR:
|
||||
text = "EM_GETIMECOLOR";
|
||||
break;
|
||||
case RichEditMessages.EM_SETIMEOPTIONS:
|
||||
case (int)Richedit.EM.SETIMEOPTIONS:
|
||||
text = "EM_SETIMEOPTIONS";
|
||||
break;
|
||||
case RichEditMessages.EM_GETIMEOPTIONS:
|
||||
case (int)Richedit.EM.GETIMEOPTIONS:
|
||||
text = "EM_GETIMEOPTIONS";
|
||||
break;
|
||||
case RichEditMessages.EM_CONVPOSITION:
|
||||
case (int)Richedit.EM.CONVPOSITION:
|
||||
text = "EM_CONVPOSITION";
|
||||
break;
|
||||
case RichEditMessages.EM_SETLANGOPTIONS:
|
||||
case (int)Richedit.EM.SETLANGOPTIONS:
|
||||
text = "EM_SETLANGOPTIONS";
|
||||
break;
|
||||
case RichEditMessages.EM_GETLANGOPTIONS:
|
||||
case (int)Richedit.EM.GETLANGOPTIONS:
|
||||
text = "EM_GETLANGOPTIONS";
|
||||
break;
|
||||
case RichEditMessages.EM_GETIMECOMPMODE:
|
||||
case (int)Richedit.EM.GETIMECOMPMODE:
|
||||
text = "EM_GETIMECOMPMODE";
|
||||
break;
|
||||
case RichEditMessages.EM_FINDTEXTW:
|
||||
case (int)Richedit.EM.FINDTEXTW:
|
||||
text = "EM_FINDTEXTW";
|
||||
break;
|
||||
case RichEditMessages.EM_FINDTEXTEXW:
|
||||
case (int)Richedit.EM.FINDTEXTEXW:
|
||||
text = "EM_FINDTEXTEXW";
|
||||
break;
|
||||
|
||||
// Rich Edit 3.0 Asia msgs
|
||||
case RichEditMessages.EM_RECONVERSION:
|
||||
case (int)Richedit.EM.RECONVERSION:
|
||||
text = "EM_RECONVERSION";
|
||||
break;
|
||||
case RichEditMessages.EM_SETIMEMODEBIAS:
|
||||
case (int)Richedit.EM.SETIMEMODEBIAS:
|
||||
text = "EM_SETIMEMODEBIAS";
|
||||
break;
|
||||
case RichEditMessages.EM_GETIMEMODEBIAS:
|
||||
case (int)Richedit.EM.GETIMEMODEBIAS:
|
||||
text = "EM_GETIMEMODEBIAS";
|
||||
break;
|
||||
|
||||
// BiDi Specific messages
|
||||
case RichEditMessages.EM_SETBIDIOPTIONS:
|
||||
case (int)Richedit.EM.SETBIDIOPTIONS:
|
||||
text = "EM_SETBIDIOPTIONS";
|
||||
break;
|
||||
case RichEditMessages.EM_GETBIDIOPTIONS:
|
||||
case (int)Richedit.EM.GETBIDIOPTIONS:
|
||||
text = "EM_GETBIDIOPTIONS";
|
||||
break;
|
||||
case RichEditMessages.EM_SETTYPOGRAPHYOPTIONS:
|
||||
case (int)Richedit.EM.SETTYPOGRAPHYOPTIONS:
|
||||
text = "EM_SETTYPOGRAPHYOPTIONS";
|
||||
break;
|
||||
case RichEditMessages.EM_GETTYPOGRAPHYOPTIONS:
|
||||
case (int)Richedit.EM.GETTYPOGRAPHYOPTIONS:
|
||||
text = "EM_GETTYPOGRAPHYOPTIONS";
|
||||
break;
|
||||
|
||||
// Extended Edit style specific messages
|
||||
case RichEditMessages.EM_SETEDITSTYLE:
|
||||
case (int)Richedit.EM.SETEDITSTYLE:
|
||||
text = "EM_SETEDITSTYLE";
|
||||
break;
|
||||
case RichEditMessages.EM_GETEDITSTYLE:
|
||||
case (int)Richedit.EM.GETEDITSTYLE:
|
||||
text = "EM_GETEDITSTYLE";
|
||||
break;
|
||||
|
||||
|
|
|
@ -193,7 +193,7 @@ namespace System.Windows.Forms
|
|||
{
|
||||
User32.SendMessageW(
|
||||
this,
|
||||
(User32.WM)RichEditMessages.EM_SETOPTIONS,
|
||||
(User32.WM)EM.SETOPTIONS,
|
||||
(IntPtr)(value ? ECOOP.OR : ECOOP.XOR),
|
||||
(IntPtr)ECO.AUTOWORDSELECTION);
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ namespace System.Windows.Forms
|
|||
{
|
||||
if (IsHandleCreated)
|
||||
{
|
||||
return unchecked((int)(long)User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_CANREDO)) != 0;
|
||||
return unchecked((int)(long)User32.SendMessageW(this, (User32.WM)EM.CANREDO)) != 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -392,7 +392,7 @@ namespace System.Windows.Forms
|
|||
richTextBoxFlags[autoUrlDetectSection] = value ? 1 : 0;
|
||||
if (IsHandleCreated)
|
||||
{
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_AUTOURLDETECT, PARAM.FromBool(value));
|
||||
User32.SendMessageW(this, (User32.WM)EM.AUTOURLDETECT, PARAM.FromBool(value));
|
||||
RecreateHandle();
|
||||
}
|
||||
}
|
||||
|
@ -534,7 +534,7 @@ namespace System.Windows.Forms
|
|||
{
|
||||
if (IsHandleCreated)
|
||||
{
|
||||
return (RichTextBoxLanguageOptions)User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_GETLANGOPTIONS);
|
||||
return (RichTextBoxLanguageOptions)User32.SendMessageW(this, (User32.WM)EM.GETLANGOPTIONS);
|
||||
}
|
||||
|
||||
return languageOption;
|
||||
|
@ -546,7 +546,7 @@ namespace System.Windows.Forms
|
|||
languageOption = value;
|
||||
if (IsHandleCreated)
|
||||
{
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETLANGOPTIONS, IntPtr.Zero, (IntPtr)value);
|
||||
User32.SendMessageW(this, (User32.WM)EM.SETLANGOPTIONS, IntPtr.Zero, (IntPtr)value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -597,7 +597,7 @@ namespace System.Windows.Forms
|
|||
return "";
|
||||
}
|
||||
|
||||
int n = unchecked((int)(long)User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_GETREDONAME));
|
||||
int n = unchecked((int)(long)User32.SendMessageW(this, (User32.WM)EM.GETREDONAME));
|
||||
return GetEditorActionName(n);
|
||||
}
|
||||
}
|
||||
|
@ -654,7 +654,7 @@ namespace System.Windows.Forms
|
|||
IntPtr hDC = Gdi32.CreateICW("DISPLAY", null, null, IntPtr.Zero);
|
||||
try
|
||||
{
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETTARGETDEVICE, hDC, (IntPtr)Pixel2Twip(hDC, value, true));
|
||||
User32.SendMessageW(this, (User32.WM)EM.SETTARGETDEVICE, hDC, (IntPtr)Pixel2Twip(hDC, value, true));
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -777,7 +777,7 @@ namespace System.Windows.Forms
|
|||
};
|
||||
|
||||
// get the format for our currently selected paragraph
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_GETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
User32.SendMessageW(this, (User32.WM)EM.GETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
|
||||
// check if alignment has been set yet
|
||||
if ((PFM.ALIGNMENT & pf.dwMask) != 0)
|
||||
|
@ -830,7 +830,7 @@ namespace System.Windows.Forms
|
|||
}
|
||||
|
||||
// set the format for our current paragraph or selection
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
User32.SendMessageW(this, (User32.WM)EM.SETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -855,7 +855,7 @@ namespace System.Windows.Forms
|
|||
};
|
||||
|
||||
// get the format for our currently selected paragraph
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_GETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
User32.SendMessageW(this, (User32.WM)EM.GETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
|
||||
// check if alignment has been set yet
|
||||
if ((PFM.NUMBERING & pf.dwMask) != 0)
|
||||
|
@ -894,7 +894,7 @@ namespace System.Windows.Forms
|
|||
pf.dxOffset = Pixel2Twip(IntPtr.Zero, bulletIndent, true);
|
||||
}
|
||||
// set the format for our current paragraph or selection
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
User32.SendMessageW(this, (User32.WM)EM.SETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -934,7 +934,7 @@ namespace System.Windows.Forms
|
|||
// SendMessage will force the handle to be created if it hasn't already. Normally,
|
||||
// we would cache property values until the handle is created - but for this property,
|
||||
// it's far more simple to just create the handle.
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETCHARFORMAT, (IntPtr)SCF.SELECTION, ref cf);
|
||||
User32.SendMessageW(this, (User32.WM)EM.SETCHARFORMAT, (IntPtr)SCF.SELECTION, ref cf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -971,7 +971,7 @@ namespace System.Windows.Forms
|
|||
cf.crTextColor = ColorTranslator.ToWin32(value);
|
||||
|
||||
// set the format information
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETCHARFORMAT, (IntPtr)SCF.SELECTION, ref cf);
|
||||
User32.SendMessageW(this, (User32.WM)EM.SETCHARFORMAT, (IntPtr)SCF.SELECTION, ref cf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1028,7 +1028,7 @@ namespace System.Windows.Forms
|
|||
cf2.crBackColor = ColorTranslator.ToWin32(value);
|
||||
}
|
||||
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETCHARFORMAT, (IntPtr)SCF.SELECTION, ref cf2);
|
||||
User32.SendMessageW(this, (User32.WM)EM.SETCHARFORMAT, (IntPtr)SCF.SELECTION, ref cf2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1075,7 +1075,7 @@ namespace System.Windows.Forms
|
|||
};
|
||||
|
||||
// get the format for our currently selected paragraph
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_GETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
User32.SendMessageW(this, (User32.WM)EM.GETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
|
||||
// check if alignment has been set yet
|
||||
if ((PFM.OFFSET & pf.dwMask) != 0)
|
||||
|
@ -1097,7 +1097,7 @@ namespace System.Windows.Forms
|
|||
};
|
||||
|
||||
// set the format for our current paragraph or selection
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
User32.SendMessageW(this, (User32.WM)EM.SETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1123,7 +1123,7 @@ namespace System.Windows.Forms
|
|||
};
|
||||
|
||||
// get the format for our currently selected paragraph
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_GETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
User32.SendMessageW(this, (User32.WM)EM.GETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
|
||||
// check if alignment has been set yet
|
||||
if ((PFM.STARTINDENT & pf.dwMask) != 0)
|
||||
|
@ -1145,7 +1145,7 @@ namespace System.Windows.Forms
|
|||
};
|
||||
|
||||
// set the format for our current paragraph or selection
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
User32.SendMessageW(this, (User32.WM)EM.SETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1247,7 +1247,7 @@ namespace System.Windows.Forms
|
|||
};
|
||||
|
||||
// get the format for our currently selected paragraph
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_GETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
User32.SendMessageW(this, (User32.WM)EM.GETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
|
||||
// check if alignment has been set yet
|
||||
if ((PFM.RIGHTINDENT & pf.dwMask) != 0)
|
||||
|
@ -1273,7 +1273,7 @@ namespace System.Windows.Forms
|
|||
};
|
||||
|
||||
// set the format for our current paragraph or selection
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
User32.SendMessageW(this, (User32.WM)EM.SETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1296,7 +1296,7 @@ namespace System.Windows.Forms
|
|||
};
|
||||
|
||||
// get the format for our currently selected paragraph
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_GETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
User32.SendMessageW(this, (User32.WM)EM.GETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
|
||||
// check if alignment has been set yet
|
||||
if ((PFM.TABSTOPS & pf.dwMask) != 0)
|
||||
|
@ -1326,7 +1326,7 @@ namespace System.Windows.Forms
|
|||
|
||||
// get the format for our currently selected paragraph because
|
||||
// we need to get the number of tabstops to copy
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_GETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
User32.SendMessageW(this, (User32.WM)EM.GETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
|
||||
pf.cTabCount = (short)((value == null) ? 0 : value.Length);
|
||||
pf.dwMask = PFM.TABSTOPS;
|
||||
|
@ -1336,7 +1336,7 @@ namespace System.Windows.Forms
|
|||
}
|
||||
|
||||
// set the format for our current paragraph or selection
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
User32.SendMessageW(this, (User32.WM)EM.SETPARAFORMAT, IntPtr.Zero, ref pf);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1379,7 +1379,7 @@ namespace System.Windows.Forms
|
|||
ForceHandleCreate();
|
||||
if (SelectionLength > 0)
|
||||
{
|
||||
int n = unchecked((int)(long)User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SELECTIONTYPE));
|
||||
int n = unchecked((int)(long)User32.SendMessageW(this, (User32.WM)EM.SELECTIONTYPE));
|
||||
return (RichTextBoxSelectionTypes)n;
|
||||
}
|
||||
else
|
||||
|
@ -1408,7 +1408,7 @@ namespace System.Windows.Forms
|
|||
{
|
||||
User32.SendMessageW(
|
||||
this,
|
||||
(User32.WM)RichEditMessages.EM_SETOPTIONS,
|
||||
(User32.WM)EM.SETOPTIONS,
|
||||
(IntPtr)(value ? ECOOP.OR : ECOOP.XOR),
|
||||
(IntPtr)ECO.SELECTIONBAR);
|
||||
}
|
||||
|
@ -1505,7 +1505,7 @@ namespace System.Windows.Forms
|
|||
codepage = 1200u /* CP_UNICODE */
|
||||
};
|
||||
|
||||
return unchecked((int)(long)User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_GETTEXTLENGTHEX, (IntPtr)(>l)));
|
||||
return unchecked((int)(long)User32.SendMessageW(this, (User32.WM)EM.GETTEXTLENGTHEX, (IntPtr)(>l)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1529,7 +1529,7 @@ namespace System.Windows.Forms
|
|||
return "";
|
||||
}
|
||||
|
||||
int n = unchecked((int)(long)User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_GETUNDONAME));
|
||||
int n = unchecked((int)(long)User32.SendMessageW(this, (User32.WM)EM.GETUNDONAME));
|
||||
return GetEditorActionName(n);
|
||||
}
|
||||
}
|
||||
|
@ -1573,7 +1573,7 @@ namespace System.Windows.Forms
|
|||
{
|
||||
int numerator = 0;
|
||||
int denominator = 0;
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_GETZOOM, (IntPtr)(&numerator), ref denominator);
|
||||
User32.SendMessageW(this, (User32.WM)EM.GETZOOM, (IntPtr)(&numerator), ref denominator);
|
||||
if ((numerator != 0) && (denominator != 0))
|
||||
{
|
||||
zoomMultiplier = ((float)numerator) / ((float)denominator);
|
||||
|
@ -1720,7 +1720,7 @@ namespace System.Windows.Forms
|
|||
/// </summary>
|
||||
public bool CanPaste(DataFormats.Format clipFormat)
|
||||
{
|
||||
return unchecked((int)(long)User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_CANPASTE, (IntPtr)clipFormat.Id)) != 0;
|
||||
return unchecked((int)(long)User32.SendMessageW(this, (User32.WM)EM.CANPASTE, (IntPtr)clipFormat.Id)) != 0;
|
||||
}
|
||||
|
||||
//DrawToBitmap doesn't work for this control, so we should hide it. We'll
|
||||
|
@ -1978,7 +1978,7 @@ namespace System.Windows.Forms
|
|||
fixed (char* pText = str)
|
||||
{
|
||||
ft.lpstrText = pText;
|
||||
position = (int)User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_FINDTEXT, (IntPtr)findOptions, ref ft);
|
||||
position = (int)User32.SendMessageW(this, (User32.WM)EM.FINDTEXT, (IntPtr)findOptions, ref ft);
|
||||
}
|
||||
|
||||
// if we didn't find anything, or we don't have to select what was found,
|
||||
|
@ -2020,7 +2020,7 @@ namespace System.Windows.Forms
|
|||
chrg.cpMax = foundCursor;
|
||||
}
|
||||
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_EXSETSEL, IntPtr.Zero, ref chrg);
|
||||
User32.SendMessageW(this, (User32.WM)EM.EXSETSEL, IntPtr.Zero, ref chrg);
|
||||
User32.SendMessageW(this, (User32.WM)User32.EM.SCROLLCARET);
|
||||
}
|
||||
|
||||
|
@ -2149,7 +2149,7 @@ namespace System.Windows.Forms
|
|||
|
||||
// go get the text in this range, if we didn't get any text then punt
|
||||
int len;
|
||||
len = (int)User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_GETTEXTRANGE, IntPtr.Zero, ref txrg);
|
||||
len = (int)User32.SendMessageW(this, (User32.WM)EM.GETTEXTRANGE, IntPtr.Zero, ref txrg);
|
||||
if (len == 0)
|
||||
{
|
||||
chrg.cpMax = chrg.cpMin = -1; // Hit end of control without finding what we wanted
|
||||
|
@ -2242,7 +2242,7 @@ namespace System.Windows.Forms
|
|||
{
|
||||
cbSize = (uint)sizeof(CHARFORMAT2W)
|
||||
};
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_GETCHARFORMAT, (IntPtr)(fSelection ? SCF.SELECTION : SCF.DEFAULT), ref cf);
|
||||
User32.SendMessageW(this, (User32.WM)EM.GETCHARFORMAT, (IntPtr)(fSelection ? SCF.SELECTION : SCF.DEFAULT), ref cf);
|
||||
return cf;
|
||||
}
|
||||
|
||||
|
@ -2363,7 +2363,7 @@ namespace System.Windows.Forms
|
|||
/// </summary>
|
||||
public override int GetLineFromCharIndex(int index)
|
||||
{
|
||||
return unchecked((int)(long)User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_EXLINEFROMCHAR, IntPtr.Zero, (IntPtr)index));
|
||||
return unchecked((int)(long)User32.SendMessageW(this, (User32.WM)EM.EXLINEFROMCHAR, IntPtr.Zero, (IntPtr)index));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -2465,7 +2465,7 @@ namespace System.Windows.Forms
|
|||
{
|
||||
if (IsHandleCreated)
|
||||
{
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETBKGNDCOLOR, IntPtr.Zero, PARAM.FromColor(BackColor));
|
||||
User32.SendMessageW(this, (User32.WM)EM.SETBKGNDCOLOR, IntPtr.Zero, PARAM.FromColor(BackColor));
|
||||
}
|
||||
|
||||
base.OnBackColorChanged(e);
|
||||
|
@ -2532,7 +2532,7 @@ namespace System.Windows.Forms
|
|||
// even if it is hidden
|
||||
User32.SendMessageW(
|
||||
this,
|
||||
(User32.WM)RichEditMessages.EM_SETEVENTMASK,
|
||||
(User32.WM)EM.SETEVENTMASK,
|
||||
IntPtr.Zero,
|
||||
(IntPtr)(ENM.PROTECTED | ENM.SELCHANGE |
|
||||
ENM.DROPFILES | ENM.REQUESTRESIZE |
|
||||
|
@ -2545,7 +2545,7 @@ namespace System.Windows.Forms
|
|||
rightMargin = 0;
|
||||
RightMargin = rm;
|
||||
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_AUTOURLDETECT, DetectUrls ? (IntPtr)1 : IntPtr.Zero, IntPtr.Zero);
|
||||
User32.SendMessageW(this, (User32.WM)EM.AUTOURLDETECT, DetectUrls ? (IntPtr)1 : IntPtr.Zero, IntPtr.Zero);
|
||||
if (selectionBackColorToSetOnHandleCreated != Color.Empty)
|
||||
{
|
||||
SelectionBackColor = selectionBackColorToSetOnHandleCreated;
|
||||
|
@ -2554,7 +2554,7 @@ namespace System.Windows.Forms
|
|||
// Initialize colors before initializing RTF, otherwise CFE_AUTOCOLOR will be in effect
|
||||
// and our text will all be Color.WindowText.
|
||||
AutoWordSelection = AutoWordSelection;
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETBKGNDCOLOR, IntPtr.Zero, PARAM.FromColor(BackColor));
|
||||
User32.SendMessageW(this, (User32.WM)EM.SETBKGNDCOLOR, IntPtr.Zero, PARAM.FromColor(BackColor));
|
||||
InternalSetForeColor(ForeColor);
|
||||
|
||||
// base sets the Text property. It's important to do this *after* setting EM_AUTOUrlDETECT.
|
||||
|
@ -2597,7 +2597,7 @@ namespace System.Windows.Forms
|
|||
// will resize itself to the size of the parent's client area. Don't know why...
|
||||
User32.PostMessageW(
|
||||
this,
|
||||
(User32.WM)RichEditMessages.EM_SETOPTIONS,
|
||||
(User32.WM)EM.SETOPTIONS,
|
||||
(IntPtr)ECOOP.OR,
|
||||
(IntPtr)ECO.SELECTIONBAR);
|
||||
}
|
||||
|
@ -2690,7 +2690,7 @@ namespace System.Windows.Forms
|
|||
/// </summary>
|
||||
public void Paste(DataFormats.Format clipFormat)
|
||||
{
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_PASTESPECIAL, (IntPtr)clipFormat.Id);
|
||||
User32.SendMessageW(this, (User32.WM)EM.PASTESPECIAL, (IntPtr)clipFormat.Id);
|
||||
}
|
||||
|
||||
protected override bool ProcessCmdKey(ref Message m, Keys keyData)
|
||||
|
@ -2711,7 +2711,7 @@ namespace System.Windows.Forms
|
|||
/// <summary>
|
||||
/// Redoes the last undone editing operation.
|
||||
/// </summary>
|
||||
public void Redo() => User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_REDO);
|
||||
public void Redo() => User32.SendMessageW(this, (User32.WM)EM.REDO);
|
||||
|
||||
//NOTE: Undo is implemented on TextBox
|
||||
|
||||
|
@ -2801,7 +2801,7 @@ namespace System.Windows.Forms
|
|||
|
||||
if (IsHandleCreated)
|
||||
{
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETZOOM, (IntPtr)numerator, (IntPtr)denominator);
|
||||
User32.SendMessageW(this, (User32.WM)EM.SETZOOM, (IntPtr)numerator, (IntPtr)denominator);
|
||||
}
|
||||
|
||||
if (numerator != 0)
|
||||
|
@ -2838,7 +2838,7 @@ namespace System.Windows.Forms
|
|||
}
|
||||
|
||||
// set the format information
|
||||
return User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETCHARFORMAT, (IntPtr)SCF.SELECTION, ref cf) != IntPtr.Zero;
|
||||
return User32.SendMessageW(this, (User32.WM)EM.SETCHARFORMAT, (IntPtr)SCF.SELECTION, ref cf) != IntPtr.Zero;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -2846,7 +2846,7 @@ namespace System.Windows.Forms
|
|||
|
||||
private bool SetCharFormat(SCF charRange, CHARFORMAT2W cf)
|
||||
{
|
||||
return User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETCHARFORMAT, (IntPtr)charRange, ref cf) != IntPtr.Zero;
|
||||
return User32.SendMessageW(this, (User32.WM)EM.SETCHARFORMAT, (IntPtr)charRange, ref cf) != IntPtr.Zero;
|
||||
}
|
||||
|
||||
private unsafe void SetCharFormatFont(bool selectionOnly, Font value)
|
||||
|
@ -2892,7 +2892,7 @@ namespace System.Windows.Forms
|
|||
|
||||
User32.SendMessageW(
|
||||
this,
|
||||
(User32.WM)RichEditMessages.EM_SETCHARFORMAT,
|
||||
(User32.WM)EM.SETCHARFORMAT,
|
||||
(IntPtr)(selectionOnly ? SCF.SELECTION : SCF.ALL),
|
||||
ref charFormat);
|
||||
}
|
||||
|
@ -2967,7 +2967,7 @@ namespace System.Windows.Forms
|
|||
if ((flags & SF.F_SELECTION) == 0)
|
||||
{
|
||||
var cr = new CHARRANGE();
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_EXSETSEL, IntPtr.Zero, ref cr);
|
||||
User32.SendMessageW(this, (User32.WM)EM.EXSETSEL, IntPtr.Zero, ref cr);
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -3024,10 +3024,10 @@ namespace System.Windows.Forms
|
|||
|
||||
// gives us TextBox compatible behavior, programatic text change shouldn't
|
||||
// be limited...
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_EXLIMITTEXT, IntPtr.Zero, (IntPtr)int.MaxValue);
|
||||
User32.SendMessageW(this, (User32.WM)EM.EXLIMITTEXT, IntPtr.Zero, (IntPtr)int.MaxValue);
|
||||
|
||||
// go get the text for the control
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_STREAMIN, (IntPtr)flags, ref es);
|
||||
User32.SendMessageW(this, (User32.WM)EM.STREAMIN, (IntPtr)flags, ref es);
|
||||
GC.KeepAlive(callback);
|
||||
|
||||
UpdateMaxLength();
|
||||
|
@ -3131,7 +3131,7 @@ namespace System.Windows.Forms
|
|||
es.pfnCallback = Marshal.GetFunctionPointerForDelegate(callback);
|
||||
|
||||
// Get Text
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_STREAMOUT, (IntPtr)flags, ref es);
|
||||
User32.SendMessageW(this, (User32.WM)EM.STREAMOUT, (IntPtr)flags, ref es);
|
||||
GC.KeepAlive(callback);
|
||||
|
||||
// check to make sure things went well
|
||||
|
@ -3170,7 +3170,7 @@ namespace System.Windows.Forms
|
|||
Marshal.QueryInterface(punk, ref iidRichEditOleCallback, out IntPtr pRichEditOleCallback);
|
||||
try
|
||||
{
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETOLECALLBACK, IntPtr.Zero, pRichEditOleCallback);
|
||||
User32.SendMessageW(this, (User32.WM)EM.SETOLECALLBACK, IntPtr.Zero, pRichEditOleCallback);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -3195,7 +3195,7 @@ namespace System.Windows.Forms
|
|||
{
|
||||
if (BackColor.IsSystemColor)
|
||||
{
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_SETBKGNDCOLOR, IntPtr.Zero, PARAM.FromColor(BackColor));
|
||||
User32.SendMessageW(this, (User32.WM)EM.SETBKGNDCOLOR, IntPtr.Zero, PARAM.FromColor(BackColor));
|
||||
}
|
||||
if (ForeColor.IsSystemColor)
|
||||
{
|
||||
|
@ -3281,7 +3281,7 @@ namespace System.Windows.Forms
|
|||
}
|
||||
|
||||
txrg.lpstrText = unmanagedBuffer;
|
||||
int len = (int)User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_GETTEXTRANGE, IntPtr.Zero, ref txrg);
|
||||
int len = (int)User32.SendMessageW(this, (User32.WM)EM.GETTEXTRANGE, IntPtr.Zero, ref txrg);
|
||||
Debug.Assert(len != 0, "CHARRANGE from RichTextBox was bad! - impossible?");
|
||||
charBuffer.PutCoTaskMem(unmanagedBuffer);
|
||||
if (txrg.lpstrText != IntPtr.Zero)
|
||||
|
@ -3297,7 +3297,7 @@ namespace System.Windows.Forms
|
|||
{
|
||||
if (IsHandleCreated)
|
||||
{
|
||||
User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_EXLIMITTEXT, IntPtr.Zero, (IntPtr)MaxLength);
|
||||
User32.SendMessageW(this, (User32.WM)EM.EXLIMITTEXT, IntPtr.Zero, (IntPtr)MaxLength);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3399,7 +3399,7 @@ namespace System.Windows.Forms
|
|||
|
||||
switch (enprotected.msg)
|
||||
{
|
||||
case RichEditMessages.EM_SETCHARFORMAT:
|
||||
case (int)EM.SETCHARFORMAT:
|
||||
// Allow change of protected style
|
||||
CHARFORMAT2W* charFormat = (CHARFORMAT2W*)enprotected.lParam;
|
||||
if ((charFormat->dwMask & CFM.PROTECTED) != 0)
|
||||
|
@ -3411,11 +3411,11 @@ namespace System.Windows.Forms
|
|||
|
||||
// Throw an exception for the following
|
||||
//
|
||||
case RichEditMessages.EM_SETPARAFORMAT:
|
||||
case (int)EM.SETPARAFORMAT:
|
||||
case (int)User32.EM.REPLACESEL:
|
||||
break;
|
||||
|
||||
case RichEditMessages.EM_STREAMIN:
|
||||
case (int)EM.STREAMIN:
|
||||
// Don't allow STREAMIN to replace protected selection
|
||||
if ((unchecked((SF)(long)enprotected.wParam) & SF.F_SELECTION) != 0)
|
||||
{
|
||||
|
@ -3429,7 +3429,7 @@ namespace System.Windows.Forms
|
|||
//
|
||||
case (int)User32.WM.COPY:
|
||||
case (int)User32.WM.SETTEXT:
|
||||
case RichEditMessages.EM_EXLIMITTEXT:
|
||||
case (int)EM.EXLIMITTEXT:
|
||||
m.Result = IntPtr.Zero;
|
||||
return;
|
||||
|
||||
|
@ -3523,7 +3523,7 @@ namespace System.Windows.Forms
|
|||
if (ImeMode == ImeMode.Hangul || ImeMode == ImeMode.HangulFull)
|
||||
{
|
||||
// Is the IME CompositionWindow open?
|
||||
ICM compMode = unchecked((ICM)(long)User32.SendMessageW(this, (User32.WM)RichEditMessages.EM_GETIMECOMPMODE));
|
||||
ICM compMode = unchecked((ICM)(long)User32.SendMessageW(this, (User32.WM)EM.GETIMECOMPMODE));
|
||||
if (compMode != ICM.NOTOPEN)
|
||||
{
|
||||
int textLength = User32.GetWindowTextLengthW(new HandleRef(this, Handle));
|
||||
|
|
|
@ -1713,7 +1713,7 @@ namespace System.Windows.Forms
|
|||
IntPtr editOlePtr = IntPtr.Zero;
|
||||
try
|
||||
{
|
||||
if (SendMessageW(this, (WM)RichEditMessages.EM_GETOLEINTERFACE, IntPtr.Zero, ref editOlePtr) != IntPtr.Zero)
|
||||
if (SendMessageW(this, (WM)Richedit.EM.GETOLEINTERFACE, IntPtr.Zero, ref editOlePtr) != IntPtr.Zero)
|
||||
{
|
||||
IntPtr iTextDocument = IntPtr.Zero;
|
||||
Guid iiTextDocumentGuid = typeof(Richedit.ITextDocument).GUID;
|
||||
|
|
|
@ -421,84 +421,84 @@ namespace System.Windows.Forms.Tests
|
|||
yield return new object[] { User32.EM.POSFROMCHAR, " (EM_POSFROMCHAR)" };
|
||||
yield return new object[] { User32.EM.CHARFROMPOS, " (EM_CHARFROMPOS)" };
|
||||
yield return new object[] { User32.EM.SCROLLCARET, " (EM_SCROLLCARET)" };
|
||||
yield return new object[] { RichEditMessages.EM_CANPASTE, " (EM_CANPASTE)" };
|
||||
yield return new object[] { RichEditMessages.EM_DISPLAYBAND, " (EM_DISPLAYBAND)" };
|
||||
yield return new object[] { RichEditMessages.EM_EXGETSEL, " (EM_EXGETSEL)" };
|
||||
yield return new object[] { RichEditMessages.EM_EXLIMITTEXT, " (EM_EXLIMITTEXT)" };
|
||||
yield return new object[] { RichEditMessages.EM_EXLINEFROMCHAR, " (EM_EXLINEFROMCHAR)" };
|
||||
yield return new object[] { RichEditMessages.EM_EXSETSEL, " (EM_EXSETSEL)" };
|
||||
yield return new object[] { RichEditMessages.EM_FINDTEXT, " (EM_FINDTEXT)" };
|
||||
yield return new object[] { RichEditMessages.EM_FORMATRANGE, " (EM_FORMATRANGE)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETCHARFORMAT, " (EM_GETCHARFORMAT)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETEVENTMASK, " (EM_GETEVENTMASK)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETOLEINTERFACE, " (EM_GETOLEINTERFACE)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETPARAFORMAT, " (EM_GETPARAFORMAT)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETSELTEXT, " (EM_GETSELTEXT)" };
|
||||
yield return new object[] { RichEditMessages.EM_HIDESELECTION, " (EM_HIDESELECTION)" };
|
||||
yield return new object[] { RichEditMessages.EM_PASTESPECIAL, " (EM_PASTESPECIAL)" };
|
||||
yield return new object[] { RichEditMessages.EM_REQUESTRESIZE, " (EM_REQUESTRESIZE)" };
|
||||
yield return new object[] { RichEditMessages.EM_SELECTIONTYPE, " (EM_SELECTIONTYPE)" };
|
||||
yield return new object[] { RichEditMessages.EM_SETBKGNDCOLOR, " (EM_SETBKGNDCOLOR)" };
|
||||
yield return new object[] { RichEditMessages.EM_SETCHARFORMAT, " (EM_SETCHARFORMAT)" };
|
||||
yield return new object[] { RichEditMessages.EM_SETEVENTMASK, " (EM_SETEVENTMASK)" };
|
||||
yield return new object[] { RichEditMessages.EM_SETOLECALLBACK, " (EM_SETOLECALLBACK)" };
|
||||
yield return new object[] { RichEditMessages.EM_SETPARAFORMAT, " (EM_SETPARAFORMAT)" };
|
||||
yield return new object[] { RichEditMessages.EM_SETTARGETDEVICE, " (EM_SETTARGETDEVICE)" };
|
||||
yield return new object[] { RichEditMessages.EM_STREAMIN, " (EM_STREAMIN)" };
|
||||
yield return new object[] { RichEditMessages.EM_STREAMOUT, " (EM_STREAMOUT)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETTEXTRANGE, " (EM_GETTEXTRANGE)" };
|
||||
yield return new object[] { RichEditMessages.EM_FINDWORDBREAK, " (EM_FINDWORDBREAK)" };
|
||||
yield return new object[] { RichEditMessages.EM_SETOPTIONS, " (EM_SETOPTIONS)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETOPTIONS, " (EM_GETOPTIONS)" };
|
||||
yield return new object[] { RichEditMessages.EM_FINDTEXTEX, " (EM_FINDTEXTEX)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETWORDBREAKPROCEX, " (EM_GETWORDBREAKPROCEX)" };
|
||||
yield return new object[] { RichEditMessages.EM_SETWORDBREAKPROCEX, " (EM_SETWORDBREAKPROCEX)" };
|
||||
yield return new object[] { Richedit.EM.CANPASTE, " (EM_CANPASTE)" };
|
||||
yield return new object[] { Richedit.EM.DISPLAYBAND, " (EM_DISPLAYBAND)" };
|
||||
yield return new object[] { Richedit.EM.EXGETSEL, " (EM_EXGETSEL)" };
|
||||
yield return new object[] { Richedit.EM.EXLIMITTEXT, " (EM_EXLIMITTEXT)" };
|
||||
yield return new object[] { Richedit.EM.EXLINEFROMCHAR, " (EM_EXLINEFROMCHAR)" };
|
||||
yield return new object[] { Richedit.EM.EXSETSEL, " (EM_EXSETSEL)" };
|
||||
yield return new object[] { Richedit.EM.FINDTEXT, " (EM_FINDTEXT)" };
|
||||
yield return new object[] { Richedit.EM.FORMATRANGE, " (EM_FORMATRANGE)" };
|
||||
yield return new object[] { Richedit.EM.GETCHARFORMAT, " (EM_GETCHARFORMAT)" };
|
||||
yield return new object[] { Richedit.EM.GETEVENTMASK, " (EM_GETEVENTMASK)" };
|
||||
yield return new object[] { Richedit.EM.GETOLEINTERFACE, " (EM_GETOLEINTERFACE)" };
|
||||
yield return new object[] { Richedit.EM.GETPARAFORMAT, " (EM_GETPARAFORMAT)" };
|
||||
yield return new object[] { Richedit.EM.GETSELTEXT, " (EM_GETSELTEXT)" };
|
||||
yield return new object[] { Richedit.EM.HIDESELECTION, " (EM_HIDESELECTION)" };
|
||||
yield return new object[] { Richedit.EM.PASTESPECIAL, " (EM_PASTESPECIAL)" };
|
||||
yield return new object[] { Richedit.EM.REQUESTRESIZE, " (EM_REQUESTRESIZE)" };
|
||||
yield return new object[] { Richedit.EM.SELECTIONTYPE, " (EM_SELECTIONTYPE)" };
|
||||
yield return new object[] { Richedit.EM.SETBKGNDCOLOR, " (EM_SETBKGNDCOLOR)" };
|
||||
yield return new object[] { Richedit.EM.SETCHARFORMAT, " (EM_SETCHARFORMAT)" };
|
||||
yield return new object[] { Richedit.EM.SETEVENTMASK, " (EM_SETEVENTMASK)" };
|
||||
yield return new object[] { Richedit.EM.SETOLECALLBACK, " (EM_SETOLECALLBACK)" };
|
||||
yield return new object[] { Richedit.EM.SETPARAFORMAT, " (EM_SETPARAFORMAT)" };
|
||||
yield return new object[] { Richedit.EM.SETTARGETDEVICE, " (EM_SETTARGETDEVICE)" };
|
||||
yield return new object[] { Richedit.EM.STREAMIN, " (EM_STREAMIN)" };
|
||||
yield return new object[] { Richedit.EM.STREAMOUT, " (EM_STREAMOUT)" };
|
||||
yield return new object[] { Richedit.EM.GETTEXTRANGE, " (EM_GETTEXTRANGE)" };
|
||||
yield return new object[] { Richedit.EM.FINDWORDBREAK, " (EM_FINDWORDBREAK)" };
|
||||
yield return new object[] { Richedit.EM.SETOPTIONS, " (EM_SETOPTIONS)" };
|
||||
yield return new object[] { Richedit.EM.GETOPTIONS, " (EM_GETOPTIONS)" };
|
||||
yield return new object[] { Richedit.EM.FINDTEXTEX, " (EM_FINDTEXTEX)" };
|
||||
yield return new object[] { Richedit.EM.GETWORDBREAKPROCEX, " (EM_GETWORDBREAKPROCEX)" };
|
||||
yield return new object[] { Richedit.EM.SETWORDBREAKPROCEX, " (EM_SETWORDBREAKPROCEX)" };
|
||||
|
||||
// Richedit v2.0 messages
|
||||
yield return new object[] { RichEditMessages.EM_SETUNDOLIMIT, " (EM_SETUNDOLIMIT)" };
|
||||
yield return new object[] { RichEditMessages.EM_REDO, " (EM_REDO)" };
|
||||
yield return new object[] { RichEditMessages.EM_CANREDO, " (EM_CANREDO)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETUNDONAME, " (EM_GETUNDONAME)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETREDONAME, " (EM_GETREDONAME)" };
|
||||
yield return new object[] { RichEditMessages.EM_STOPGROUPTYPING, " (EM_STOPGROUPTYPING)" };
|
||||
yield return new object[] { RichEditMessages.EM_SETTEXTMODE, " (EM_SETTEXTMODE)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETTEXTMODE, " (EM_GETTEXTMODE)" };
|
||||
yield return new object[] { RichEditMessages.EM_AUTOURLDETECT, " (EM_AUTOURLDETECT)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETAUTOURLDETECT, " (EM_GETAUTOURLDETECT)" };
|
||||
yield return new object[] { RichEditMessages.EM_SETPALETTE, " (EM_SETPALETTE)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETTEXTEX, " (EM_GETTEXTEX)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETTEXTLENGTHEX, " (EM_GETTEXTLENGTHEX)" };
|
||||
yield return new object[] { Richedit.EM.SETUNDOLIMIT, " (EM_SETUNDOLIMIT)" };
|
||||
yield return new object[] { Richedit.EM.REDO, " (EM_REDO)" };
|
||||
yield return new object[] { Richedit.EM.CANREDO, " (EM_CANREDO)" };
|
||||
yield return new object[] { Richedit.EM.GETUNDONAME, " (EM_GETUNDONAME)" };
|
||||
yield return new object[] { Richedit.EM.GETREDONAME, " (EM_GETREDONAME)" };
|
||||
yield return new object[] { Richedit.EM.STOPGROUPTYPING, " (EM_STOPGROUPTYPING)" };
|
||||
yield return new object[] { Richedit.EM.SETTEXTMODE, " (EM_SETTEXTMODE)" };
|
||||
yield return new object[] { Richedit.EM.GETTEXTMODE, " (EM_GETTEXTMODE)" };
|
||||
yield return new object[] { Richedit.EM.AUTOURLDETECT, " (EM_AUTOURLDETECT)" };
|
||||
yield return new object[] { Richedit.EM.GETAUTOURLDETECT, " (EM_GETAUTOURLDETECT)" };
|
||||
yield return new object[] { Richedit.EM.SETPALETTE, " (EM_SETPALETTE)" };
|
||||
yield return new object[] { Richedit.EM.GETTEXTEX, " (EM_GETTEXTEX)" };
|
||||
yield return new object[] { Richedit.EM.GETTEXTLENGTHEX, " (EM_GETTEXTLENGTHEX)" };
|
||||
|
||||
// Asia specific messages
|
||||
yield return new object[] { RichEditMessages.EM_SETPUNCTUATION, " (EM_SETPUNCTUATION)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETPUNCTUATION, " (EM_GETPUNCTUATION)" };
|
||||
yield return new object[] { RichEditMessages.EM_SETWORDWRAPMODE, " (EM_SETWORDWRAPMODE)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETWORDWRAPMODE, " (EM_GETWORDWRAPMODE)" };
|
||||
yield return new object[] { RichEditMessages.EM_SETIMECOLOR, " (EM_SETIMECOLOR)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETIMECOLOR, " (EM_GETIMECOLOR)" };
|
||||
yield return new object[] { RichEditMessages.EM_SETIMEOPTIONS, " (EM_SETIMEOPTIONS)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETIMEOPTIONS, " (EM_GETIMEOPTIONS)" };
|
||||
yield return new object[] { RichEditMessages.EM_CONVPOSITION, " (EM_CONVPOSITION)" };
|
||||
yield return new object[] { RichEditMessages.EM_SETLANGOPTIONS, " (EM_SETLANGOPTIONS)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETLANGOPTIONS, " (EM_GETLANGOPTIONS)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETIMECOMPMODE, " (EM_GETIMECOMPMODE)" };
|
||||
yield return new object[] { RichEditMessages.EM_FINDTEXTW, " (EM_FINDTEXTW)" };
|
||||
yield return new object[] { RichEditMessages.EM_FINDTEXTEXW, " (EM_FINDTEXTEXW)" };
|
||||
yield return new object[] { Richedit.EM.SETPUNCTUATION, " (EM_SETPUNCTUATION)" };
|
||||
yield return new object[] { Richedit.EM.GETPUNCTUATION, " (EM_GETPUNCTUATION)" };
|
||||
yield return new object[] { Richedit.EM.SETWORDWRAPMODE, " (EM_SETWORDWRAPMODE)" };
|
||||
yield return new object[] { Richedit.EM.GETWORDWRAPMODE, " (EM_GETWORDWRAPMODE)" };
|
||||
yield return new object[] { Richedit.EM.SETIMECOLOR, " (EM_SETIMECOLOR)" };
|
||||
yield return new object[] { Richedit.EM.GETIMECOLOR, " (EM_GETIMECOLOR)" };
|
||||
yield return new object[] { Richedit.EM.SETIMEOPTIONS, " (EM_SETIMEOPTIONS)" };
|
||||
yield return new object[] { Richedit.EM.GETIMEOPTIONS, " (EM_GETIMEOPTIONS)" };
|
||||
yield return new object[] { Richedit.EM.CONVPOSITION, " (EM_CONVPOSITION)" };
|
||||
yield return new object[] { Richedit.EM.SETLANGOPTIONS, " (EM_SETLANGOPTIONS)" };
|
||||
yield return new object[] { Richedit.EM.GETLANGOPTIONS, " (EM_GETLANGOPTIONS)" };
|
||||
yield return new object[] { Richedit.EM.GETIMECOMPMODE, " (EM_GETIMECOMPMODE)" };
|
||||
yield return new object[] { Richedit.EM.FINDTEXTW, " (EM_FINDTEXTW)" };
|
||||
yield return new object[] { Richedit.EM.FINDTEXTEXW, " (EM_FINDTEXTEXW)" };
|
||||
|
||||
// Rich Edit 3.0 Asia msgs
|
||||
yield return new object[] { RichEditMessages.EM_RECONVERSION, " (EM_RECONVERSION)" };
|
||||
yield return new object[] { RichEditMessages.EM_SETIMEMODEBIAS, " (EM_SETIMEMODEBIAS)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETIMEMODEBIAS, " (EM_GETIMEMODEBIAS)" };
|
||||
yield return new object[] { Richedit.EM.RECONVERSION, " (EM_RECONVERSION)" };
|
||||
yield return new object[] { Richedit.EM.SETIMEMODEBIAS, " (EM_SETIMEMODEBIAS)" };
|
||||
yield return new object[] { Richedit.EM.GETIMEMODEBIAS, " (EM_GETIMEMODEBIAS)" };
|
||||
|
||||
// BiDi Specific messages
|
||||
yield return new object[] { RichEditMessages.EM_SETBIDIOPTIONS, " (EM_SETBIDIOPTIONS)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETBIDIOPTIONS, " (EM_GETBIDIOPTIONS)" };
|
||||
yield return new object[] { RichEditMessages.EM_SETTYPOGRAPHYOPTIONS, " (EM_SETTYPOGRAPHYOPTIONS)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETTYPOGRAPHYOPTIONS, " (EM_GETTYPOGRAPHYOPTIONS)" };
|
||||
yield return new object[] { Richedit.EM.SETBIDIOPTIONS, " (EM_SETBIDIOPTIONS)" };
|
||||
yield return new object[] { Richedit.EM.GETBIDIOPTIONS, " (EM_GETBIDIOPTIONS)" };
|
||||
yield return new object[] { Richedit.EM.SETTYPOGRAPHYOPTIONS, " (EM_SETTYPOGRAPHYOPTIONS)" };
|
||||
yield return new object[] { Richedit.EM.GETTYPOGRAPHYOPTIONS, " (EM_GETTYPOGRAPHYOPTIONS)" };
|
||||
|
||||
// Extended Edit style specific messages
|
||||
yield return new object[] { RichEditMessages.EM_SETEDITSTYLE, " (EM_SETEDITSTYLE)" };
|
||||
yield return new object[] { RichEditMessages.EM_GETEDITSTYLE, " (EM_GETEDITSTYLE)" };
|
||||
yield return new object[] { Richedit.EM.SETEDITSTYLE, " (EM_SETEDITSTYLE)" };
|
||||
yield return new object[] { Richedit.EM.GETEDITSTYLE, " (EM_GETEDITSTYLE)" };
|
||||
}
|
||||
|
||||
[Theory]
|
||||
|
|
|
@ -589,7 +589,7 @@ namespace System.Windows.Forms.Tests
|
|||
Assert.Equal(0, createdCallCount);
|
||||
|
||||
// Call EM_SETOPTIONS.
|
||||
SendMessageW(control.Handle, (WM)RichEditMessages.EM_SETOPTIONS, (IntPtr)ECOOP.OR, (IntPtr)ECO.AUTOWORDSELECTION);
|
||||
SendMessageW(control.Handle, (WM)Richedit.EM.SETOPTIONS, (IntPtr)ECOOP.OR, (IntPtr)ECO.AUTOWORDSELECTION);
|
||||
Assert.False(control.AutoWordSelection);
|
||||
Assert.True(control.IsHandleCreated);
|
||||
Assert.Equal(0, invalidatedCallCount);
|
||||
|
@ -665,7 +665,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
Assert.NotEqual(IntPtr.Zero, control.Handle);
|
||||
control.AutoWordSelection = value;
|
||||
Assert.Equal((IntPtr)expected, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETOPTIONS));
|
||||
Assert.Equal((IntPtr)expected, SendMessageW(control.Handle, (WM)Richedit.EM.GETOPTIONS));
|
||||
}
|
||||
|
||||
public static IEnumerable<object[]> BackColor_Set_TestData()
|
||||
|
@ -1021,7 +1021,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
protected unsafe override void WndProc(ref Message m)
|
||||
{
|
||||
if (m.Msg == RichEditMessages.EM_CANREDO)
|
||||
if (m.Msg == (int)Richedit.EM.CANREDO)
|
||||
{
|
||||
m.Result = Result;
|
||||
return;
|
||||
|
@ -1090,7 +1090,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
protected unsafe override void WndProc(ref Message m)
|
||||
{
|
||||
if (m.Msg == (int)EM.CANUNDO)
|
||||
if (m.Msg == (int)User32.EM.CANUNDO)
|
||||
{
|
||||
m.Result = Result;
|
||||
return;
|
||||
|
@ -1135,7 +1135,7 @@ namespace System.Windows.Forms.Tests
|
|||
Assert.Equal(0, createdCallCount);
|
||||
|
||||
// Call EM_AUTOURLDETECT.
|
||||
User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_AUTOURLDETECT, IntPtr.Zero);
|
||||
SendMessageW(control.Handle, (WM)Richedit.EM.AUTOURLDETECT, IntPtr.Zero);
|
||||
Assert.True(control.DetectUrls);
|
||||
Assert.True(control.IsHandleCreated);
|
||||
Assert.Equal(0, invalidatedCallCount);
|
||||
|
@ -1212,7 +1212,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
Assert.NotEqual(IntPtr.Zero, control.Handle);
|
||||
control.DetectUrls = value;
|
||||
Assert.Equal((IntPtr)expected, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETAUTOURLDETECT));
|
||||
Assert.Equal((IntPtr)expected, SendMessageW(control.Handle, (WM)Richedit.EM.GETAUTOURLDETECT));
|
||||
}
|
||||
|
||||
[WinFormsTheory]
|
||||
|
@ -1625,7 +1625,7 @@ namespace System.Windows.Forms.Tests
|
|||
cbSize = (uint)sizeof(CHARFORMAT2W),
|
||||
dwMask = (CFM)int.MaxValue
|
||||
};
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)RichEditMessages.EM_GETCHARFORMAT, (IntPtr)SCF.ALL, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETCHARFORMAT, (IntPtr)SCF.ALL, ref format));
|
||||
Assert.Equal("Arial", format.FaceName.ToString());
|
||||
Assert.Equal(expectedYHeight, (int)format.yHeight);
|
||||
Assert.Equal(CFE.AUTOBACKCOLOR | CFE.AUTOCOLOR | (CFE)expectedEffects, format.dwEffects);
|
||||
|
@ -1633,7 +1633,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
// Set null.
|
||||
control.Font = null;
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)RichEditMessages.EM_GETCHARFORMAT, (IntPtr)SCF.ALL, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETCHARFORMAT, (IntPtr)SCF.ALL, ref format));
|
||||
Assert.Equal(Control.DefaultFont.Name, format.FaceName.ToString());
|
||||
Assert.Equal((int)(Control.DefaultFont.SizeInPoints * 20), (int)format.yHeight);
|
||||
Assert.Equal(CFE.AUTOBACKCOLOR | CFE.AUTOCOLOR, format.dwEffects);
|
||||
|
@ -1757,7 +1757,7 @@ namespace System.Windows.Forms.Tests
|
|||
{
|
||||
cbSize = (uint)sizeof(CHARFORMAT2W)
|
||||
};
|
||||
Assert.NotEqual(IntPtr.Zero, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETCHARFORMAT, (IntPtr)SCF.ALL, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETCHARFORMAT, (IntPtr)SCF.ALL, ref format));
|
||||
Assert.Equal(0x785634, format.crTextColor);
|
||||
}
|
||||
|
||||
|
@ -1772,7 +1772,7 @@ namespace System.Windows.Forms.Tests
|
|||
{
|
||||
cbSize = (uint)sizeof(CHARFORMAT2W)
|
||||
};
|
||||
Assert.NotEqual(IntPtr.Zero, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETCHARFORMAT, (IntPtr)SCF.ALL, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETCHARFORMAT, (IntPtr)SCF.ALL, ref format));
|
||||
Assert.Equal(0x785634, format.crTextColor);
|
||||
|
||||
// Set different.
|
||||
|
@ -1781,7 +1781,7 @@ namespace System.Windows.Forms.Tests
|
|||
{
|
||||
cbSize = (uint)sizeof(CHARFORMAT2W)
|
||||
};
|
||||
Assert.NotEqual(IntPtr.Zero, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETCHARFORMAT, (IntPtr)SCF.ALL, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETCHARFORMAT, (IntPtr)SCF.ALL, ref format));
|
||||
Assert.Equal(0x907856, format.crTextColor);
|
||||
}
|
||||
|
||||
|
@ -1851,7 +1851,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
if (MakeCustom && m.Msg == (int)RichEditMessages.EM_GETLANGOPTIONS)
|
||||
if (MakeCustom && m.Msg == (int)Richedit.EM.GETLANGOPTIONS)
|
||||
{
|
||||
m.Result = GetLangOptionsResult;
|
||||
return;
|
||||
|
@ -1916,7 +1916,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
Assert.NotEqual(IntPtr.Zero, control.Handle);
|
||||
control.LanguageOption = value;
|
||||
Assert.Equal(value, (RichTextBoxLanguageOptions)User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETLANGOPTIONS));
|
||||
Assert.Equal(value, (RichTextBoxLanguageOptions)SendMessageW(control.Handle, (WM)Richedit.EM.GETLANGOPTIONS));
|
||||
}
|
||||
|
||||
[WinFormsFact]
|
||||
|
@ -1938,7 +1938,7 @@ namespace System.Windows.Forms.Tests
|
|||
Assert.Equal(0, createdCallCount);
|
||||
|
||||
// Call EM_LIMITTEXT.
|
||||
User32.SendMessageW(control.Handle, (User32.WM)User32.EM.LIMITTEXT, IntPtr.Zero, (IntPtr)1);
|
||||
SendMessageW(control.Handle, (WM)User32.EM.LIMITTEXT, IntPtr.Zero, (IntPtr)1);
|
||||
Assert.Equal(0x7FFFFFFF, control.MaxLength);
|
||||
Assert.True(control.IsHandleCreated);
|
||||
Assert.Equal(0, invalidatedCallCount);
|
||||
|
@ -1946,7 +1946,7 @@ namespace System.Windows.Forms.Tests
|
|||
Assert.Equal(0, createdCallCount);
|
||||
|
||||
// Call EM_EXLIMITTEXT.
|
||||
User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_EXLIMITTEXT, IntPtr.Zero, (IntPtr)2);
|
||||
SendMessageW(control.Handle, (WM)Richedit.EM.EXLIMITTEXT, IntPtr.Zero, (IntPtr)2);
|
||||
Assert.Equal(0x7FFFFFFF, control.MaxLength);
|
||||
Assert.True(control.IsHandleCreated);
|
||||
Assert.Equal(0, invalidatedCallCount);
|
||||
|
@ -2055,7 +2055,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
Assert.NotEqual(IntPtr.Zero, control.Handle);
|
||||
control.MaxLength = value;
|
||||
Assert.Equal((IntPtr)expected, User32.SendMessageW(control.Handle, (User32.WM)User32.EM.GETLIMITTEXT));
|
||||
Assert.Equal((IntPtr)expected, SendMessageW(control.Handle, (WM)User32.EM.GETLIMITTEXT));
|
||||
}
|
||||
|
||||
[WinFormsFact]
|
||||
|
@ -2376,12 +2376,12 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
protected unsafe override void WndProc(ref Message m)
|
||||
{
|
||||
if (m.Msg == RichEditMessages.EM_CANREDO)
|
||||
if (m.Msg == (int)Richedit.EM.CANREDO)
|
||||
{
|
||||
m.Result = CanRedoResult;
|
||||
return;
|
||||
}
|
||||
else if (m.Msg == RichEditMessages.EM_GETREDONAME)
|
||||
else if (m.Msg == (int)Richedit.EM.GETREDONAME)
|
||||
{
|
||||
m.Result = GetRedoNameResult;
|
||||
return;
|
||||
|
@ -3792,7 +3792,7 @@ namespace System.Windows.Forms.Tests
|
|||
{
|
||||
cbSize = (uint)sizeof(PARAFORMAT)
|
||||
};
|
||||
Assert.NotEqual(IntPtr.Zero, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETPARAFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETPARAFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.Equal(expected, (int)format.wAlignment);
|
||||
}
|
||||
|
||||
|
@ -3987,7 +3987,7 @@ namespace System.Windows.Forms.Tests
|
|||
{
|
||||
cbSize = (uint)sizeof(CHARFORMAT2W)
|
||||
};
|
||||
Assert.NotEqual(IntPtr.Zero, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETCHARFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETCHARFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.Equal(0x785634, format.crBackColor);
|
||||
}
|
||||
|
||||
|
@ -4249,7 +4249,7 @@ namespace System.Windows.Forms.Tests
|
|||
{
|
||||
cbSize = (uint)sizeof(PARAFORMAT)
|
||||
};
|
||||
Assert.NotEqual(IntPtr.Zero, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETPARAFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETPARAFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.Equal(expectedOffset, (int)format.dxOffset);
|
||||
Assert.Equal(expected, (int)format.wNumbering);
|
||||
}
|
||||
|
@ -4443,7 +4443,7 @@ namespace System.Windows.Forms.Tests
|
|||
{
|
||||
cbSize = (uint)sizeof(CHARFORMAT2W)
|
||||
};
|
||||
Assert.NotEqual(IntPtr.Zero, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETCHARFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETCHARFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.Equal(900, format.yOffset);
|
||||
}
|
||||
|
||||
|
@ -4632,7 +4632,7 @@ namespace System.Windows.Forms.Tests
|
|||
{
|
||||
cbSize = (uint)sizeof(CHARFORMAT2W)
|
||||
};
|
||||
Assert.NotEqual(IntPtr.Zero, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETCHARFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETCHARFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.Equal(0x785634, format.crTextColor);
|
||||
}
|
||||
|
||||
|
@ -4944,7 +4944,7 @@ namespace System.Windows.Forms.Tests
|
|||
cbSize = (uint)sizeof(CHARFORMAT2W),
|
||||
dwMask = (CFM)int.MaxValue
|
||||
};
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)RichEditMessages.EM_GETCHARFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETCHARFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.Equal("Arial", format.FaceName.ToString());
|
||||
Assert.Equal(expectedYHeight, (int)format.yHeight);
|
||||
Assert.Equal(CFE.AUTOBACKCOLOR | CFE.AUTOCOLOR | (CFE)expectedEffects, format.dwEffects);
|
||||
|
@ -5164,7 +5164,7 @@ namespace System.Windows.Forms.Tests
|
|||
{
|
||||
cbSize = (uint)sizeof(PARAFORMAT)
|
||||
};
|
||||
Assert.NotEqual(IntPtr.Zero, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETPARAFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETPARAFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.Equal(expected, format.dxOffset);
|
||||
}
|
||||
|
||||
|
@ -5355,7 +5355,7 @@ namespace System.Windows.Forms.Tests
|
|||
{
|
||||
cbSize = (uint)sizeof(PARAFORMAT)
|
||||
};
|
||||
Assert.NotEqual(IntPtr.Zero, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETPARAFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETPARAFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.Equal(expected, format.dxStartIndent);
|
||||
}
|
||||
|
||||
|
@ -5557,7 +5557,7 @@ namespace System.Windows.Forms.Tests
|
|||
control.SelectionLength = value;
|
||||
int selectionStart = 0;
|
||||
int selectionEnd = 0;
|
||||
IntPtr result = User32.SendMessageW(control.Handle, (User32.WM)User32.EM.GETSEL, (IntPtr)(&selectionStart), (IntPtr)(&selectionEnd));
|
||||
IntPtr result = SendMessageW(control.Handle, (WM)User32.EM.GETSEL, (IntPtr)(&selectionStart), (IntPtr)(&selectionEnd));
|
||||
Assert.Equal(1, PARAM.LOWORD(result));
|
||||
Assert.Equal(expected, PARAM.HIWORD(result));
|
||||
Assert.Equal(1, selectionStart);
|
||||
|
@ -5753,7 +5753,7 @@ namespace System.Windows.Forms.Tests
|
|||
cbSize = (uint)sizeof(CHARFORMAT2W),
|
||||
dwMask = CFM.PROTECTED
|
||||
};
|
||||
Assert.NotEqual(IntPtr.Zero, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETCHARFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETCHARFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.Equal(value, (format.dwEffects & CFE.PROTECTED) != 0);
|
||||
}
|
||||
|
||||
|
@ -5939,7 +5939,7 @@ namespace System.Windows.Forms.Tests
|
|||
{
|
||||
cbSize = (uint)sizeof(PARAFORMAT)
|
||||
};
|
||||
Assert.NotEqual(IntPtr.Zero, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETPARAFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETPARAFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.Equal(expected, format.dxRightIndent);
|
||||
}
|
||||
|
||||
|
@ -6147,7 +6147,7 @@ namespace System.Windows.Forms.Tests
|
|||
control.SelectionStart = value;
|
||||
int selectionStart = 0;
|
||||
int selectionEnd = 0;
|
||||
IntPtr result = User32.SendMessageW(control.Handle, (User32.WM)User32.EM.GETSEL, (IntPtr)(&selectionStart), (IntPtr)(&selectionEnd));
|
||||
IntPtr result = SendMessageW(control.Handle, (WM)User32.EM.GETSEL, (IntPtr)(&selectionStart), (IntPtr)(&selectionEnd));
|
||||
Assert.Equal(expectedSelectionStart, PARAM.LOWORD(result));
|
||||
Assert.Equal(expectedEnd, PARAM.HIWORD(result));
|
||||
Assert.Equal(expectedSelectionStart, selectionStart);
|
||||
|
@ -6385,7 +6385,7 @@ namespace System.Windows.Forms.Tests
|
|||
{
|
||||
cbSize = (uint)sizeof(PARAFORMAT)
|
||||
};
|
||||
Assert.NotEqual(IntPtr.Zero, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETPARAFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETPARAFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.Equal(3, format.cTabCount);
|
||||
Assert.Equal(15, format.rgxTabs[0]);
|
||||
Assert.Equal(30, format.rgxTabs[1]);
|
||||
|
@ -6393,7 +6393,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
// Set null or empty.
|
||||
control.SelectionTabs = nullOrEmptyValue;
|
||||
Assert.NotEqual(IntPtr.Zero, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETPARAFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.NotEqual(IntPtr.Zero, SendMessageW(control.Handle, (WM)Richedit.EM.GETPARAFORMAT, (IntPtr)SCF.SELECTION, ref format));
|
||||
Assert.Equal(0, format.cTabCount);
|
||||
}
|
||||
|
||||
|
@ -6539,7 +6539,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
protected unsafe override void WndProc(ref Message m)
|
||||
{
|
||||
if (m.Msg == (int)RichEditMessages.EM_SELECTIONTYPE)
|
||||
if (m.Msg == (int)Richedit.EM.SELECTIONTYPE)
|
||||
{
|
||||
Assert.Equal(IntPtr.Zero, m.WParam);
|
||||
Assert.Equal(IntPtr.Zero, m.LParam);
|
||||
|
@ -6586,7 +6586,7 @@ namespace System.Windows.Forms.Tests
|
|||
Assert.Equal(0, createdCallCount);
|
||||
|
||||
// Call EM_SETOPTIONS.
|
||||
SendMessageW(control.Handle, (WM)RichEditMessages.EM_SETOPTIONS, (IntPtr)ECOOP.OR, (IntPtr)ECO.SELECTIONBAR);
|
||||
SendMessageW(control.Handle, (WM)Richedit.EM.SETOPTIONS, (IntPtr)ECOOP.OR, (IntPtr)ECO.SELECTIONBAR);
|
||||
Assert.False(control.ShowSelectionMargin);
|
||||
Assert.True(control.IsHandleCreated);
|
||||
Assert.Equal(0, invalidatedCallCount);
|
||||
|
@ -6662,7 +6662,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
Assert.NotEqual(IntPtr.Zero, control.Handle);
|
||||
control.ShowSelectionMargin = value;
|
||||
Assert.Equal((IntPtr)expected, User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_GETOPTIONS));
|
||||
Assert.Equal((IntPtr)expected, SendMessageW(control.Handle, (WM)Richedit.EM.GETOPTIONS));
|
||||
}
|
||||
|
||||
[WinFormsFact]
|
||||
|
@ -6766,7 +6766,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
protected unsafe override void WndProc(ref Message m)
|
||||
{
|
||||
if (m.Msg == RichEditMessages.EM_GETTEXTLENGTHEX)
|
||||
if (m.Msg == (int)Richedit.EM.GETTEXTLENGTHEX)
|
||||
{
|
||||
GETTEXTLENGTHEX* gtl = (GETTEXTLENGTHEX*)m.WParam;
|
||||
Assert.Equal(GTL.NUMCHARS, gtl->flags);
|
||||
|
@ -7496,7 +7496,7 @@ namespace System.Windows.Forms.Tests
|
|||
m.Result = CanUndoResult;
|
||||
return;
|
||||
}
|
||||
else if (m.Msg == RichEditMessages.EM_GETUNDONAME)
|
||||
else if (m.Msg == (int)Richedit.EM.GETUNDONAME)
|
||||
{
|
||||
m.Result = GetUndoNameResult;
|
||||
return;
|
||||
|
@ -7541,7 +7541,7 @@ namespace System.Windows.Forms.Tests
|
|||
Assert.Equal(0, createdCallCount);
|
||||
|
||||
// Call EM_SETZOOM.
|
||||
User32.SendMessageW(control.Handle, (User32.WM)RichEditMessages.EM_SETZOOM, (IntPtr)2, (IntPtr)10);
|
||||
SendMessageW(control.Handle, (WM)Richedit.EM.SETZOOM, (IntPtr)2, (IntPtr)10);
|
||||
Assert.Equal(0.2f, control.ZoomFactor);
|
||||
Assert.True(control.IsHandleCreated);
|
||||
Assert.Equal(0, invalidatedCallCount);
|
||||
|
@ -7575,7 +7575,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
protected unsafe override void WndProc(ref Message m)
|
||||
{
|
||||
if (m.Msg == RichEditMessages.EM_GETZOOM)
|
||||
if (m.Msg == (int)Richedit.EM.GETZOOM)
|
||||
{
|
||||
int* pNumerator = (int*)m.WParam;
|
||||
int* pDenominator = (int*)m.LParam;
|
||||
|
@ -7715,7 +7715,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
protected unsafe override void WndProc(ref Message m)
|
||||
{
|
||||
if (m.Msg == RichEditMessages.EM_CANPASTE)
|
||||
if (m.Msg == (int)Richedit.EM.CANPASTE)
|
||||
{
|
||||
m.Result = Result;
|
||||
return;
|
||||
|
@ -8760,7 +8760,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
protected override void WndProc(ref Message m)
|
||||
{
|
||||
if (m.Msg == RichEditMessages.EM_EXLINEFROMCHAR)
|
||||
if (m.Msg == (int)Richedit.EM.EXLINEFROMCHAR)
|
||||
{
|
||||
Assert.Equal(IntPtr.Zero, m.WParam);
|
||||
Assert.Equal((IntPtr)1, m.LParam);
|
||||
|
@ -10011,7 +10011,7 @@ namespace System.Windows.Forms.Tests
|
|||
try
|
||||
{
|
||||
Marshal.WriteInt32(ptr, IntPtr.Size * 2, (int)Richedit.EN.PROTECTED);
|
||||
Marshal.WriteInt32(ptr, IntPtr.Size * 2 + IntPtr.Size, RichEditMessages.EM_SETCHARFORMAT);
|
||||
Marshal.WriteInt32(ptr, IntPtr.Size * 2 + IntPtr.Size, (int)Richedit.EM.SETCHARFORMAT);
|
||||
Marshal.WriteIntPtr(ptr, IntPtr.Size * 2 + IntPtr.Size + 4 + IntPtr.Size, (IntPtr)(&format));
|
||||
var m = new Message
|
||||
{
|
||||
|
@ -10244,7 +10244,7 @@ namespace System.Windows.Forms.Tests
|
|||
try
|
||||
{
|
||||
Marshal.WriteInt32(ptr, IntPtr.Size * 2, (int)Richedit.EN.PROTECTED);
|
||||
Marshal.WriteInt32(ptr, IntPtr.Size * 2 + IntPtr.Size, RichEditMessages.EM_SETCHARFORMAT);
|
||||
Marshal.WriteInt32(ptr, IntPtr.Size * 2 + IntPtr.Size, (int)Richedit.EM.SETCHARFORMAT);
|
||||
Marshal.WriteIntPtr(ptr, IntPtr.Size * 2 + IntPtr.Size + 4 + IntPtr.Size, (IntPtr)(&format));
|
||||
var m = new Message
|
||||
{
|
||||
|
@ -10289,7 +10289,7 @@ namespace System.Windows.Forms.Tests
|
|||
Assert.Equal(IntPtr.Zero, m.Result);
|
||||
Assert.True(control.IsHandleCreated);
|
||||
Assert.Equal(0, textChangedCallCount);
|
||||
IntPtr result = SendMessageW(control.Handle, (WM)EM.GETMARGINS);
|
||||
IntPtr result = SendMessageW(control.Handle, (WM)User32.EM.GETMARGINS);
|
||||
Assert.Equal(expectedMargin, PARAM.HIWORD(result));
|
||||
Assert.Equal(expectedMargin, PARAM.LOWORD(result));
|
||||
}
|
||||
|
@ -10311,7 +10311,7 @@ namespace System.Windows.Forms.Tests
|
|||
control.StyleChanged += (sender, e) => styleChangedCallCount++;
|
||||
int createdCallCount = 0;
|
||||
control.HandleCreated += (sender, e) => createdCallCount++;
|
||||
SendMessageW(control.Handle, (WM)EM.SETMARGINS, (IntPtr)(EC.LEFTMARGIN | EC.RIGHTMARGIN), PARAM.FromLowHigh(1, 2));
|
||||
SendMessageW(control.Handle, (WM)User32.EM.SETMARGINS, (IntPtr)(EC.LEFTMARGIN | EC.RIGHTMARGIN), PARAM.FromLowHigh(1, 2));
|
||||
int textChangedCallCount = 0;
|
||||
control.TextChanged += (sender, e) => textChangedCallCount++;
|
||||
|
||||
|
@ -10323,7 +10323,7 @@ namespace System.Windows.Forms.Tests
|
|||
control.WndProc(ref m);
|
||||
Assert.Equal(IntPtr.Zero, m.Result);
|
||||
Assert.Equal(0, textChangedCallCount);
|
||||
IntPtr result = SendMessageW(control.Handle, (WM)EM.GETMARGINS);
|
||||
IntPtr result = SendMessageW(control.Handle, (WM)User32.EM.GETMARGINS);
|
||||
Assert.Equal(expectedLeft, PARAM.LOWORD(result));
|
||||
Assert.Equal(expectedRight, PARAM.HIWORD(result));
|
||||
Assert.True(control.IsHandleCreated);
|
||||
|
@ -10340,7 +10340,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
protected unsafe override void WndProc(ref Message m)
|
||||
{
|
||||
if (MakeCustom && m.Msg == RichEditMessages.EM_GETPARAFORMAT)
|
||||
if (MakeCustom && m.Msg == (int)Richedit.EM.GETPARAFORMAT)
|
||||
{
|
||||
PARAFORMAT* format = (PARAFORMAT*)m.LParam;
|
||||
Assert.Equal(IntPtr.Zero, m.WParam);
|
||||
|
@ -10361,7 +10361,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
protected unsafe override void WndProc(ref Message m)
|
||||
{
|
||||
if (MakeCustom && m.Msg == RichEditMessages.EM_GETCHARFORMAT)
|
||||
if (MakeCustom && m.Msg == (int)Richedit.EM.GETCHARFORMAT)
|
||||
{
|
||||
CHARFORMAT2W* format = (CHARFORMAT2W*)m.LParam;
|
||||
Assert.Equal(ExpectedWParam, m.WParam);
|
||||
|
|
|
@ -6380,7 +6380,7 @@ namespace System.Windows.Forms.Tests
|
|||
|
||||
protected unsafe override void WndProc(ref Message m)
|
||||
{
|
||||
if (m.Msg == (int)RichEditMessages.EM_GETOLEINTERFACE)
|
||||
if (m.Msg == (int)Richedit.EM.GETOLEINTERFACE)
|
||||
{
|
||||
IntPtr* pParam = (IntPtr*)m.LParam;
|
||||
*pParam = GetOleInterfaceLParam;
|
||||
|
|
Загрузка…
Ссылка в новой задаче