3524 references to PInvoke
System.Windows.Forms (2046)
System\Windows\Forms\Accessibility\AccessibleObject.cs (23)
107
private protected static VARIANT CHILDID_SELF { get; } = (VARIANT)(int)
PInvoke
.CHILDID_SELF;
703
internal virtual int GetChildId() => (int)
PInvoke
.CHILDID_SELF;
932
*pidChild = (int)
PInvoke
.CHILDID_SELF;
1829
result = accessible.Value->accDoDefaultAction((VARIANT)(int)
PInvoke
.CHILDID_SELF);
2017
if (!childID.Equals((int)
PInvoke
.CHILDID_SELF))
2047
? (int)
PInvoke
.CHILDID_SELF
2632
if (SysNavigate(navdir, (VARIANT)(int)
PInvoke
.CHILDID_SELF, out AccessibleObject? accessibleObject))
2660
return (VARIANT)(int)
PInvoke
.CHILDID_SELF;
2728
HRESULT result =
PInvoke
.CreateStdAccessibleObject(
2756
result =
PInvoke
.CreateStdAccessibleObject(
2791
if ((int)childID != (int)
PInvoke
.CHILDID_SELF)
2807
|| childID.data.intVal == (int)
PInvoke
.CHILDID_SELF;
2834
if (id == (int)
PInvoke
.CHILDID_SELF)
2990
args = [(int)
PInvoke
.CHILDID_SELF];
3217
&&
PInvoke
.UiaRaiseNotificationEvent(
3235
if (
PInvoke
.UiaClientsAreListening() && !AppContextSwitches.NoClientNotifications)
3238
HRESULT result =
PInvoke
.UiaRaiseAutomationEvent(provider, eventId);
3247
if (
PInvoke
.UiaClientsAreListening() && !AppContextSwitches.NoClientNotifications)
3250
HRESULT result =
PInvoke
.UiaRaiseAutomationPropertyChangedEvent(provider, propertyId, oldValue, newValue);
3261
=>
PInvoke
.UiaClientsAreListening()
3267
if (
PInvoke
.UiaClientsAreListening() && !AppContextSwitches.NoClientNotifications)
3274
result =
PInvoke
.UiaRaiseStructureChangedEvent(provider, structureChangeType, default, length);
3280
result =
PInvoke
.UiaRaiseStructureChangedEvent(provider, structureChangeType, pRuntimeId, length);
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (2)
470
PInvoke
.NotifyWinEvent(
544
PInvoke
.UiaHostProviderFromHwnd(new HandleRef<HWND>(this, HandleInternal), out IRawElementProviderSimple* provider);
System\Windows\Forms\Accessibility\LabelEditAccessibleObject.cs (1)
51
PInvoke
.UiaHostProviderFromHwnd(target.HWND, out IRawElementProviderSimple* provider);
System\Windows\Forms\Accessibility\LabelEditNativeWindow.cs (13)
39
if (!
PInvoke
.UiaClientsAreListening())
48
_valueChangeHook =
PInvoke
.SetWinEventHook(
51
PInvoke
.GetModuleHandle((PCWSTR)null),
55
PInvoke
.WINEVENT_INCONTEXT);
57
_textSelectionChangedHook =
PInvoke
.SetWinEventHook(
60
PInvoke
.GetModuleHandle((PCWSTR)null),
64
PInvoke
.WINEVENT_INCONTEXT);
97
PInvoke
.UnhookWinEvent(_valueChangeHook);
98
PInvoke
.UnhookWinEvent(_textSelectionChangedHook);
109
PInvoke
.UiaReturnRawElementProvider(HWND, wParam: 0, lParam: 0, (IRawElementProviderSimple*)null);
112
PInvoke
.UiaDisconnectProvider(AccessibilityObject);
152
if (m.LParamInternal ==
PInvoke
.UiaRootObjectId)
156
m.ResultInternal =
PInvoke
.UiaReturnRawElementProvider(
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (2)
54
public override bool IsScrollable => ((int)GetWindowStyle(_owningChildEdit) &
PInvoke
.ES_AUTOHSCROLL) != 0;
385
return
PInvoke
.GetTextExtentPoint32W(hdc.HDC, &item, 1, (SIZE*)psizle);
System\Windows\Forms\ActiveX\AxHost.cs (13)
50
=
PInvoke
.RegisterWindowMessage($"{Application.WindowMessagesVersion}_subclassCheck");
957
uiDeactivate = !
PInvoke
.IsChild(this, _hwndFocus);
1754
PInvoke
.GetCursorPos(out Point point);
1766
(int)(
PInvoke
.KF_ALTDOWN | 0x18)), // 0x18 => O key scan code
1767
time =
PInvoke
.GetTickCount(),
1771
if (
PInvoke
.IsAccelerator(new HandleRef<HACCEL>(this, ctlInfo.hAccel), ctlInfo.cAccel, &msg, lpwCmd: null))
2222
HRESULT hr =
PInvoke
.CoGetClassObject(
2277
HRESULT hr =
PInvoke
.CoGetClassObject(
2414
_ =
PInvoke
.GetFocus();
2981
PInvoke
.OleCreatePropertyFrameIndirect(¶meters).AssertSuccess();
3028
PInvoke
.OleCreatePropertyFrame(
3685
HRESULT hr =
PInvoke
.OleCreateFontIndirect(in fontDesc, in IID.GetRef<IFont>(), out void* lplpvObj);
3740
PInvoke
.OleCreateFontIndirect(in fontdesc, in IID.GetRef<IFontDisp>(), out void* lplpvObj).ThrowOnFailure();
System\Windows\Forms\ActiveX\AxHost.State.cs (4)
156
if (
PInvoke
.CreateILockBytesOnHGlobal(hglobal, true, &lockBytes).Failed)
165
?
PInvoke
.StgCreateDocfileOnILockBytes(
170
:
PInvoke
.StgOpenStorageOnILockBytes(
277
PInvoke
.GetHGlobalFromILockBytes(lockBytes, &hglobal).ThrowOnFailure();
System\Windows\Forms\ActiveX\AxHost.VBFormat.cs (1)
38
HRESULT hr =
PInvoke
.VarFormat(
System\Windows\Forms\ActiveX\Control.ActiveXFontMarshaler.cs (1)
49
PInvoke
.OleCreateFontIndirect(
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (28)
297
HRESULT hr =
PInvoke
.CreateOleAdviseHolder(&holder);
461
PInvoke
.LPtoDP(hdcDraw, [p1, p2]);
464
PInvoke
.SetWindowOrgEx(hdcDraw, 0, 0, &pW);
465
PInvoke
.SetWindowExtEx(hdcDraw, _control.Width, _control.Height, (SIZE*)&sWindowExt);
466
PInvoke
.SetViewportOrgEx(hdcDraw, p1.X, p1.Y, &pVp);
467
PInvoke
.SetViewportExtEx(hdcDraw, p2.X, p2.Y, (SIZE*)&sViewportExt);
473
nint flags =
PInvoke
.PRF_CHILDREN |
PInvoke
.PRF_CLIENT |
PInvoke
.PRF_ERASEBKGND |
PInvoke
.PRF_NONCLIENT;
488
PInvoke
.SetWindowOrgEx(hdcDraw, pW.X, pW.Y, lppt: null);
489
PInvoke
.SetWindowExtEx(hdcDraw, sWindowExt.Width, sWindowExt.Height, lpsz: null);
490
PInvoke
.SetViewportOrgEx(hdcDraw, pVp.X, pVp.Y, lppt: null);
491
PInvoke
.SetViewportExtEx(hdcDraw, sViewportExt.Width, sViewportExt.Height, lpsz: null);
598
hr = dispatch.Value->TryGetProperty(dispid, &property,
PInvoke
.LCID.USER_DEFAULT.RawValue);
631
short scan =
PInvoke
.VkKeyScan(ch);
675
PInvoke
.DestroyAcceleratorTable(new HandleRef<HACCEL>(_control, _accelTable));
681
_accelTable =
PInvoke
.CreateAcceleratorTable(pAccelerators, _accelCount);
855
if (
PInvoke
.SetParent(_control, hwndParent).IsNull)
1666
PInvoke
.DestroyAcceleratorTable(new HandleRef<HACCEL>(_control, _accelTable));
1810
HWND hWndParent =
PInvoke
.GetParent(_control);
1879
PInvoke
.TranslateMessage(lpmsg);
1880
if (
PInvoke
.IsWindowUnicode(lpmsg->hwnd))
1882
PInvoke
.DispatchMessage(lpmsg);
1886
PInvoke
.DispatchMessageA(lpmsg);
1910
if (
PInvoke
.GetKeyState((int)VIRTUAL_KEY.VK_SHIFT) < 0)
1915
if (
PInvoke
.GetKeyState((int)VIRTUAL_KEY.VK_CONTROL) < 0)
1920
if (
PInvoke
.GetKeyState((int)VIRTUAL_KEY.VK_MENU) < 0)
System\Windows\Forms\Application.ComponentManager.cs (6)
239
PInvoke
.GetMessage(&msg, HWND.Null, 0, 0);
247
PInvoke
.PostQuitMessage((int)msg.wParam);
259
PInvoke
.TranslateMessage(msg);
260
PInvoke
.DispatchMessage(&msg);
295
PInvoke
.MsgWaitForMultipleObjectsEx(
311
PInvoke
.WaitMessage();
System\Windows\Forms\Application.ComponentThreadContext.cs (8)
93
if (
PInvoke
.CoRegisterMessageFilter(null, messageFilter).Failed || messageFilter.IsNull)
100
PInvoke
.CoRegisterMessageFilter(messageFilter, &dummy);
292
if (
PInvoke
.GetMessage(&msg, HWND.Null, 0, 0))
296
PInvoke
.TranslateMessage(msg);
297
PInvoke
.DispatchMessage(&msg);
311
PInvoke
.WaitMessage();
428
PInvokeCore.GetWindowThreadProcessId(
PInvoke
.GetActiveWindow(), out uint pid);
429
if (pid ==
PInvoke
.GetCurrentProcessId())
System\Windows\Forms\Application.cs (15)
117
var hModule =
PInvoke
.GetModuleHandle(Libraries.Comctl32);
122
return
PInvoke
.GetProcAddress(hModule, (PCSTR)ptr) != 0;
127
nint ninthModule =
PInvoke
.LoadComctl32(StartupPath);
135
return
PInvoke
.GetProcAddress(hModule, (PCSTR)ptr) != 0;
323
HWND hwnd =
PInvoke
.FindWindow(s_systemTrackerWindow, s_systemTrackerWindow);
331
bool success =
PInvoke
.SendMessageCallback(hwnd, PInvokeCore.WM_SYSCOLORCHANGE + MessageId.WM_REFLECT, () => complete = true);
413
s_executablePath ??=
PInvoke
.GetModuleFileNameLongPath(HINSTANCE.Null);
678
VisualStyleState vState = (VisualStyleState)
PInvoke
.GetThemeAppProperties();
685
PInvoke
.SetThemeAppProperties((SET_THEME_APP_PROPERTIES_FLAGS)value);
701
if (processId ==
PInvoke
.GetCurrentProcessId() &&
PInvoke
.IsWindowVisible(hwnd))
704
PInvoke
.RedrawWindow(
924
var moduleHandle =
PInvoke
.GetModuleHandle(module.Name);
1196
Debug.Assert(
PInvoke
.IsWindow(handle), "Handle being parked is not a valid window handle");
1430
=>
PInvoke
.SetSuspendState((state == PowerState.Hibernate), force, disableWakeEvent);
System\Windows\Forms\Application.LightThreadContext.cs (5)
91
PInvoke
.GetMessage(&msg, HWND.Null, 0, 0);
99
PInvoke
.PostQuitMessage((int)msg.wParam);
108
PInvoke
.TranslateMessage(msg);
109
PInvoke
.DispatchMessage(&msg);
136
PInvoke
.WaitMessage();
System\Windows\Forms\Application.ParkingWindow.cs (3)
92
HWND hwndChild =
PInvoke
.GetWindow(this, GET_WINDOW_CMD.GW_CHILD);
114
PInvoke
.SetParent(handle, (IHandle<HWND>)this);
128
PInvoke
.GetParent(handle) != HWND,
System\Windows\Forms\Application.ThreadContext.cs (14)
75
PInvoke
.DuplicateHandle(
76
PInvoke
.GetCurrentProcess(),
77
PInvoke
.GetCurrentThread(),
78
PInvoke
.GetCurrentProcess(),
301
PInvoke
.CloseHandle(_handle);
458
PInvoke
.CloseHandle(_handle);
654
PInvoke
.PostThreadMessage(_id, PInvokeCore.WM_QUIT, default, default);
753
if (
PInvoke
.IsWindowEnabled(hwndOwner))
755
PInvoke
.EnableWindow(hwndOwner, false);
767
if (CurrentForm is not null && CurrentForm.IsHandleCreated &&
PInvoke
.IsWindowEnabled(CurrentForm) != modalEnabled)
769
PInvoke
.EnableWindow(CurrentForm, modalEnabled);
803
PInvoke
.EnableWindow(hwndOwner, true);
972
HWND hwndRoot =
PInvoke
.GetAncestor(msg.hwnd, GET_ANCESTOR_FLAGS.GA_ROOT);
976
if (!hwndRoot.IsNull &&
PInvoke
.IsDialogMessage(hwndRoot, in msg))
System\Windows\Forms\Application.ThreadWindows.cs (11)
33
if (
PInvoke
.IsWindowVisible(hwnd) &&
PInvoke
.IsWindowEnabled(hwnd))
49
if (
PInvoke
.IsWindow(hwnd))
61
_activeHwnd =
PInvoke
.GetActiveWindow();
63
_focusedHwnd = activatingControl is not null ? activatingControl.HWND :
PInvoke
.GetFocus();
68
if (
PInvoke
.IsWindow(hwnd))
70
PInvoke
.EnableWindow(hwnd, enable);
84
if (!_activeHwnd.IsNull &&
PInvoke
.IsWindow(_activeHwnd))
86
PInvoke
.SetActiveWindow(_activeHwnd);
89
if (!_focusedHwnd.IsNull &&
PInvoke
.IsWindow(_focusedHwnd))
91
PInvoke
.SetFocus(_focusedHwnd);
System\Windows\Forms\ComponentModel\COM2Interop\COM2ComponentEditor.cs (4)
21
hr = propertyBrowsing.Value->MapPropertyToPage(
PInvoke
.MEMBERID_NIL, &guid);
59
hr = propertyBrowsing.Value->MapPropertyToPage(
PInvoke
.MEMBERID_NIL, &guid);
66
PInvoke
.OleCreatePropertyFrame(
101
PInvoke
.OleCreatePropertyFrame(
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyBuilderUITypeEditor.cs (1)
31
HWND parentHandle =
PInvoke
.GetFocus();
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (2)
879
hr =
PInvoke
.GetErrorInfo(0, errorInfo);
899
uint result =
PInvoke
.FormatMessage(
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyPageUITypeConverter.cs (2)
28
HWND parentHandle =
PInvoke
.GetFocus();
78
PInvoke
.OleCreatePropertyFrame(
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (4)
256
properties = InternalGetProperties(dispatch, typeInfo,
PInvoke
.MEMBERID_NIL);
622
|| (dispidToGet !=
PInvoke
.MEMBERID_NIL && functionDescription->memid != dispidToGet))
713
enumTypeInfo->GetDocumentation(
PInvoke
.MEMBERID_NIL, &enumNameBstr, &enumHelpStringBstr, null, null);
845
|| (dispidToGet !=
PInvoke
.MEMBERID_NIL && pVarDesc->memid != dispidToGet))
System\Windows\Forms\ComponentModel\COM2Interop\ComNativeDescriptor.cs (2)
91
PInvoke
.MEMBERID_NIL,
247
attributes.AddRange(Com2IManagedPerPropertyBrowsingHandler.GetComponentAttributes(browsing,
PInvoke
.MEMBERID_NIL));
System\Windows\Forms\ContextMenuStrip.cs (1)
137
&& DeviceDpi != (int)
PInvoke
.GetDpiForWindow(this))
System\Windows\Forms\Control.cs (142)
75
private static readonly uint WM_GETCONTROLNAME =
PInvoke
.RegisterWindowMessage("WM_GETCONTROLNAME");
76
private static readonly uint WM_GETCONTROLTYPE =
PInvoke
.RegisterWindowMessage("WM_GETCONTROLTYPE");
1093
public bool CanFocus => IsHandleCreated &&
PInvoke
.IsWindowVisible(this) &&
PInvoke
.IsWindowEnabled(this);
1123
get => IsHandleCreated &&
PInvoke
.GetCapture() == HWND;
1133
PInvoke
.SetCapture(this);
1137
PInvoke
.ReleaseCapture();
1285
HWND focusHwnd =
PInvoke
.GetFocus();
1286
return !focusHwnd.IsNull && (focusHwnd == Handle ||
PInvoke
.IsChild(this, focusHwnd));
1361
if ((
PInvoke
.GetModuleHandle(Libraries.Comctl32) != 0)
1362
|| (
PInvoke
.LoadComctl32(Application.StartupPath) != 0))
1562
PInvoke
.GetCursorPos(out Point p);
1564
if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) ||
PInvoke
.GetCapture() == HWND)
1566
PInvokeCore.SendMessage(this, PInvokeCore.WM_SETCURSOR, (WPARAM)HWND, (LPARAM)(int)
PInvoke
.HTCLIENT);
1861
=> IsHandleCreated &&
PInvoke
.GetFocus() == InternalHandle;
2242
HWND parentHandle =
PInvoke
.GetParent(this);
2252
length =
PInvoke
.GetClassName(lastParentHandle, lpClassName, buffer.Length);
2265
parentHandle =
PInvoke
.GetParent(parentHandle);
2318
!(next =
PInvoke
.GetWindow(prev, GET_WINDOW_CMD.GW_HWNDPREV)).IsNull;
2322
if (
PInvoke
.IsWindowVisible(next))
2583
if (
PInvoke
.GetKeyState((int)Keys.ShiftKey) < 0)
2588
if (
PInvoke
.GetKeyState((int)Keys.ControlKey) < 0)
2593
if (
PInvoke
.GetKeyState((int)Keys.Menu) < 0)
2612
if (
PInvoke
.GetKeyState((int)Keys.LButton) < 0)
2617
if (
PInvoke
.GetKeyState((int)Keys.RButton) < 0)
2622
if (
PInvoke
.GetKeyState((int)Keys.MButton) < 0)
2627
if (
PInvoke
.GetKeyState((int)Keys.XButton1) < 0)
2632
if (
PInvoke
.GetKeyState((int)Keys.XButton2) < 0)
2648
PInvoke
.GetCursorPos(out Point pt);
2808
PInvoke
.SetWindowRgn(this, default,
PInvoke
.IsWindowVisible(this));
2816
if (
PInvoke
.SetWindowRgn(this, regionHandle,
PInvoke
.IsWindowVisible(this)) != 0)
3345
uint actionMask =
PInvoke
.UISF_HIDEACCEL << 16;
3353
(WPARAM)(actionMask |
PInvoke
.UIS_SET));
3393
int actionMask = (int)(
PInvoke
.UISF_HIDEACCEL |
PInvoke
.UISF_HIDEFOCUS) << 16;
3399
(WPARAM)(actionMask | (int)
PInvoke
.UIS_SET));
3555
returnValue =
PInvoke
.GetExitCodeThread(threadHandle, &exitCode);
3663
PInvoke
.SetWindowText(this, value);
4205
PInvoke
.NotifyWinEvent((uint)accEvent, this, objectID, childID + 1);
4380
else if (IsHandleCreated && GetTopLevel() &&
PInvoke
.IsWindowEnabled(this))
4382
PInvoke
.SetWindowPos(
4566
if (cp.X !=
PInvoke
.CW_USEDEFAULT)
4571
if (cp.Y !=
PInvoke
.CW_USEDEFAULT)
4738
PInvoke
.DefMDIChildProc(InternalHandle, PInvokeCore.WM_CLOSE, default, default);
4996
(LPARAM)(
PInvoke
.PRF_CHILDREN |
PInvoke
.PRF_CLIENT |
PInvoke
.PRF_ERASEBKGND |
PInvoke
.PRF_NONCLIENT));
5173
PInvoke
.SetFocus(this);
5215
hwnd =
PInvoke
.GetAncestor(hwnd, GET_ANCESTOR_FLAGS.GA_PARENT);
5290
HWND hwnd =
PInvoke
.ChildWindowFromPointEx(this, pt, (CWP_FLAGS)value);
5412
PInvoke
.XBUTTON1 => MouseButtons.XButton1,
5413
PInvoke
.XBUTTON2 => MouseButtons.XButton2,
5448
for (HWND hWndChild =
PInvoke
.GetWindow(this, GET_WINDOW_CMD.GW_CHILD);
5450
hWndChild =
PInvoke
.GetWindow(new HandleRef<HWND>(this, hWndChild), GET_WINDOW_CMD.GW_HWNDNEXT))
5776
return hwnd.IsNull ||
PInvoke
.IsWindow(hwnd)
5823
PInvoke
.TrackMouseEvent(ref _trackMouseEvent);
5890
PInvoke
.RedrawWindow(
5900
PInvoke
.InvalidateRgn(
5931
PInvoke
.RedrawWindow(
5941
PInvoke
.InvalidateRect(
5979
PInvoke
.RedrawWindow(
5989
PInvoke
.InvalidateRect(
6276
int result =
PInvoke
.GetKeyState((int)keyVal);
6310
? (int)(
PInvoke
.DLGC_WANTCHARS |
PInvoke
.DLGC_WANTALLKEYS |
PInvoke
.DLGC_WANTTAB)
6311
: (int)(
PInvoke
.DLGC_WANTCHARS |
PInvoke
.DLGC_WANTALLKEYS);
6336
uint mask =
PInvoke
.DLGC_WANTALLKEYS;
6340
mask =
PInvoke
.DLGC_WANTALLKEYS |
PInvoke
.DLGC_WANTTAB;
6346
mask =
PInvoke
.DLGC_WANTALLKEYS |
PInvoke
.DLGC_WANTARROWS;
6447
PInvoke
.AdjustWindowRectExForDpi(ref rect, style, bMenu, exStyle, (uint)dpi);
6451
PInvoke
.AdjustWindowRectEx(ref rect, style, bMenu, exStyle);
6507
s_threadCallbackMessage =
PInvoke
.RegisterWindowMessage($"{Application.WindowMessagesVersion}_ThreadCallbackMessage");
6836
PInvoke
.EnableWindow(this, Enabled);
7063
if (
PInvoke
.SetParent(this, parent).IsNull)
7160
uint flags =
PInvoke
.PRF_CHILDREN |
PInvoke
.PRF_CLIENT |
PInvoke
.PRF_ERASEBKGND |
PInvoke
.PRF_NONCLIENT;
7367
PInvoke
.SetWindowText(this, _text);
7385
_ =
PInvoke
.SetWindowTheme(
7416
Properties.AddOrRemoveValue(s_deviceDpiInternal, (int)
PInvoke
.GetDpiForWindow(this));
7469
if (
PInvoke
.GetScrollInfo(this, SCROLLBAR_CONSTANTS.SB_HORZ, ref si))
8770
Debug.Assert((lParam & (long)
PInvoke
.PRF_CHILDREN) != 0,
8774
lParam = (nint)(lParam & (long)~
PInvoke
.PRF_CHILDREN);
8806
PrintToMetaFile_SendPrintMessage(hDC, (nint)(lParam & (long)~
PInvoke
.PRF_CLIENT));
8818
PrintToMetaFile_SendPrintMessage(hDC, (nint)(lParam & (long)~
PInvoke
.PRF_NONCLIENT));
8847
lParam |=
PInvoke
.PRF_CHILDREN;
9048
if ((current &
PInvoke
.UISF_HIDEACCEL) != 0)
9051
toClear |=
PInvoke
.UISF_HIDEACCEL;
9057
if ((current &
PInvoke
.UISF_HIDEFOCUS) != 0)
9060
toClear |=
PInvoke
.UISF_HIDEFOCUS;
9081
PInvoke
.GetParent(topMostParent).IsNull ? PInvokeCore.WM_CHANGEUISTATE : PInvokeCore.WM_UPDATEUISTATE,
9082
(WPARAM)((int)
PInvoke
.UIS_CLEAR | ((int)toClear << 16)));
9224
HWND parentHandle =
PInvoke
.GetParent(this);
9329
&&
PInvoke
.IsWindow(parentHandle))
9334
if (
PInvoke
.SetParent(this, parentHandle) == IntPtr.Zero)
9349
_ =
PInvoke
.SetWindowTheme(
9430
PInvoke
.UiaReturnRawElementProvider(handle, 0, 0, (IRawElementProviderSimple*)null);
9435
PInvoke
.UiaDisconnectProvider(accessibleObject, skipOSCheck: true);
10032
PInvoke
.SetWindowPos(
10175
PInvoke
.SetWindowPos(this, HWND.Null, x, y, width, height, flags);
10246
HWND parentHandle =
PInvoke
.GetParent(this);
10285
if (
PInvoke
.SetParent(this, value).IsNull)
10303
if (
PInvoke
.SetParent(this, HWND.Null).IsNull)
10399
PInvoke
.ShowWindow(HWND, value ? ShowParams : SHOW_WINDOW_CMD.SW_HIDE);
10418
PInvoke
.SetWindowPos(
10465
if (!
PInvoke
.IsWindowVisible(this))
10479
PInvoke
.SetWindowPos(
10495
PInvoke
.DwmSetWindowAttribute(
10810
PInvoke
.UpdateWindow(this);
10832
PInvokeCore.MapWindowPoints(HWND.Null,
PInvoke
.GetParent(this), ref rect);
10924
while (!(hWnd =
PInvoke
.GetWindow(hWnd, GET_WINDOW_CMD.GW_HWNDPREV)).IsNull)
10962
HWND parentHandle =
PInvoke
.GetParent(this);
11003
if (
PInvoke
.GetWindow(control, GET_WINDOW_CMD.GW_HWNDPREV) != previous)
11008
PInvoke
.SetWindowPos(
11070
PInvoke
.SetWindowPos(
11111
parentHandle =
PInvoke
.GetParent(parentHandle);
11284
if (m.LParamInternal ==
PInvoke
.UiaRootObjectId && SupportsUiaProviders)
11288
m.ResultInternal =
PInvoke
.UiaReturnRawElementProvider(
11540
newDeviceDpi = (int)
PInvoke
.GetDpiForWindow(this);
11651
&&
PInvoke
.WindowFromPoint(screenLocation) == HWND;
11722
case
PInvoke
.TTN_SHOW:
11729
case
PInvoke
.TTN_POP:
11759
HWND dialogItem =
PInvoke
.GetDlgItem(m.HWND, controlId);
11944
if ((HWND)m.WParamInternal == InternalHandle && m.LParamInternal.LOWORD ==
PInvoke
.HTCLIENT)
12003
hWnd =
PInvoke
.GetDlgItem(this, m.WParamInternal.HIWORD);
12141
if (cmd ==
PInvoke
.UIS_INITIALIZE)
12155
if ((m.WParamInternal.HIWORD &
PInvoke
.UISF_HIDEACCEL) != 0)
12158
bool showKeyboard = (cmd ==
PInvoke
.UIS_CLEAR);
12176
if ((m.WParamInternal.HIWORD &
PInvoke
.UISF_HIDEFOCUS) != 0)
12179
bool showFocus = cmd ==
PInvoke
.UIS_CLEAR;
12215
&&
PInvoke
.GetParent(this) == _parent.InternalHandle
12326
if ((m.WParamInternal & 0xFFF0) ==
PInvoke
.SC_KEYMENU && ToolStripManager.ProcessMenuKey(ref m))
12518
m.ResultInternal = (LRESULT)(nint)
PInvoke
.NFR_UNICODE;
12883
PInvoke
.GetKeyboardState(b);
System\Windows\Forms\Control.Ime.cs (24)
186
ctl = FromChildHandle(
PInvoke
.GetFocus());
268
HWND focusHandle =
PInvoke
.GetFocus();
278
focusHandle =
PInvoke
.GetAncestor(focusHandle, GET_ANCESTOR_FLAGS.GA_ROOT);
597
if (wparam is ((int)
PInvoke
.IMN_SETCONVERSIONMODE) or ((int)
PInvoke
.IMN_SETOPENSTATUS))
698
HIMC oldContext =
PInvoke
.ImmAssociateContext((HWND)handle, (HIMC)IntPtr.Zero);
712
HIMC inputContext =
PInvoke
.ImmGetContext((HWND)handle);
719
inputContext =
PInvoke
.ImmCreateContext();
722
PInvoke
.ImmAssociateContext((HWND)handle, inputContext);
727
PInvoke
.ImmAssociateContext((HWND)handle, s_originalImeContext);
732
PInvoke
.ImmReleaseContext((HWND)handle, inputContext);
760
inputContext =
PInvoke
.ImmGetContext((HWND)handle);
779
PInvoke
.ImmGetConversionStatus(inputContext, &conversion, &sentence);
810
PInvoke
.ImmReleaseContext((HWND)handle, inputContext);
821
HIMC inputContext =
PInvoke
.ImmGetContext((HWND)handle);
827
retval =
PInvoke
.ImmGetOpenStatus(inputContext);
828
PInvoke
.ImmReleaseContext((HWND)handle, inputContext);
905
HIMC inputContext =
PInvoke
.ImmGetContext((HWND)handle);
908
PInvoke
.ImmGetConversionStatus(inputContext, &conversion, &sentence);
913
PInvoke
.ImmSetConversionStatus(inputContext, conversion, sentence);
915
PInvoke
.ImmReleaseContext((HWND)handle, inputContext);
932
HIMC inputContext =
PInvoke
.ImmGetContext((HWND)handle);
936
bool succeeded =
PInvoke
.ImmSetOpenStatus(inputContext, open);
941
succeeded =
PInvoke
.ImmReleaseContext((HWND)handle, inputContext);
System\Windows\Forms\Control.MetafileDCWrapper.cs (4)
143
PInvoke
.GetSystemPaletteEntries(hdcSrc, 0, (uint)colorEntryCount, (PALETTEENTRY*)ppal);
159
int diRet =
PInvoke
.GetDIBits(
191
int iRet =
PInvoke
.StretchDIBits(
206
if (iRet ==
PInvoke
.GDI_ERROR)
System\Windows\Forms\Controls\Buttons\Button.cs (6)
115
cp.ClassName =
PInvoke
.WC_BUTTON;
119
cp.Style |=
PInvoke
.BS_OWNERDRAW;
123
cp.Style |=
PInvoke
.BS_PUSHBUTTON;
127
cp.Style |=
PInvoke
.BS_DEFPUSHBUTTON;
269
if (
PInvoke
.WindowFromPoint(PointToScreen(mevent.Location)) == HWND && !ValidationCancelled)
336
if (m.WParamInternal.HIWORD ==
PInvoke
.BN_CLICKED)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (13)
270
cp.Style |=
PInvoke
.BS_MULTILINE;
274
cp.Style |=
PInvoke
.BS_DEFPUSHBUTTON;
281
cp.Style |=
PInvoke
.BS_LEFT;
285
cp.Style |=
PInvoke
.BS_RIGHT;
289
cp.Style |=
PInvoke
.BS_CENTER;
294
cp.Style |=
PInvoke
.BS_TOP;
298
cp.Style |=
PInvoke
.BS_BOTTOM;
302
cp.Style |=
PInvoke
.BS_VCENTER;
1189
PInvokeCore.SendMessage(this,
PInvoke
.BM_SETSTATE, (WPARAM)(BOOL)true);
1217
PInvokeCore.SendMessage(this,
PInvoke
.BM_SETSTATE, (WPARAM)(BOOL)false);
1358
case
PInvoke
.BM_CLICK:
1375
case
PInvoke
.BM_SETSTATE:
1422
if (m.WParamInternal.HIWORD ==
PInvoke
.BN_CLICKED && !ValidationCancelled)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (2)
114
PInvoke
.FillRect(hdc, rect, hbrush);
314
PInvoke
.DrawFrameControl(
System\Windows\Forms\Controls\Buttons\CheckBox.cs (8)
210
PInvokeCore.SendMessage(this,
PInvoke
.BM_SETCHECK, (WPARAM)(int)_checkState);
249
cp.ClassName =
PInvoke
.WC_BUTTON;
252
cp.Style |=
PInvoke
.BS_OWNERDRAW;
256
cp.Style |=
PInvoke
.BS_3STATE;
259
cp.Style |=
PInvoke
.BS_PUSHLIKE;
266
cp.Style |=
PInvoke
.BS_RIGHTBUTTON;
500
PInvokeCore.SendMessage(this,
PInvoke
.BM_SETCHECK, (WPARAM)(int)_checkState);
513
&&
PInvoke
.WindowFromPoint(PointToScreen(mevent.Location)) == HWND)
System\Windows\Forms\Controls\Buttons\RadioButton.cs (9)
163
PInvokeCore.SendMessage(this,
PInvoke
.BM_SETCHECK, (WPARAM)(BOOL)value);
212
cp.ClassName =
PInvoke
.WC_BUTTON;
215
cp.Style |=
PInvoke
.BS_OWNERDRAW;
219
cp.Style |=
PInvoke
.BS_RADIOBUTTON;
222
cp.Style |=
PInvoke
.BS_PUSHLIKE;
229
cp.Style |=
PInvoke
.BS_RIGHTBUTTON;
349
PInvokeCore.SendMessage(this,
PInvoke
.BM_SETCHECK, (WPARAM)(BOOL)_isChecked);
388
if (
PInvoke
.GetKeyState((int)Keys.Tab) >= 0)
489
&&
PInvoke
.WindowFromPoint(PointToScreen(mevent.Location)) == HWND)
System\Windows\Forms\Controls\ComboBox\ComboBox.ACNativeWindow.cs (1)
36
internal bool Visible =>
PInvoke
.IsWindowVisible(this);
System\Windows\Forms\Controls\ComboBox\ComboBox.AutoCompleteDropDownFinder.cs (1)
42
int length =
PInvoke
.GetClassName(hwnd, (PWSTR)b, buffer.Length);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxAccessibleObject.cs (3)
142
PInvoke
.UiaDisconnectProvider(value);
149
PInvoke
.UiaDisconnectProvider(_dropDownButtonUiaProvider);
159
PInvoke
.UiaDisconnectProvider(itemAccessibleObject, skipOSCheck: true);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildEditUiaProvider.cs (1)
88
PInvoke
.UiaHostProviderFromHwnd(new HandleRef<HWND>(this, _handle), out IRawElementProviderSimple* provider);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildListUiaProvider.cs (1)
183
PInvoke
.UiaHostProviderFromHwnd(new HandleRef<HWND>(this, _childListControlhandle), out IRawElementProviderSimple* provider);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildNativeWindow.cs (5)
62
PInvoke
.UiaReturnRawElementProvider(HWND, wParam: 0, lParam: 0, (IRawElementProviderSimple*)null);
65
PInvoke
.UiaDisconnectProvider(accessibilityObject);
125
if (m.LParamInternal !=
PInvoke
.UiaRootObjectId && (int)m.LParamInternal != (int)OBJECT_IDENTIFIER.OBJID_CLIENT)
134
if (m.LParamInternal ==
PInvoke
.UiaRootObjectId)
138
m.ResultInternal =
PInvoke
.UiaReturnRawElementProvider(
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxItemAccessibleObject.cs (4)
43
PInvoke
.LB_GETITEMRECT,
47
if (result ==
PInvoke
.LB_ERR)
185
PInvokeCore.SendMessage(_owningComboBox,
PInvoke
.CB_SETTOPINDEX, (WPARAM)GetCurrentIndex());
203
PInvoke
.InvalidateRect(_owningComboBox.GetListHandle(), lpRect: null, bErase: false);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (2)
75
return ((int)GetWindowStyle(_owningChildEdit) &
PInvoke
.ES_AUTOHSCROLL) != 0;
460
return
PInvoke
.GetTextExtentPoint32W(hdc, &item, 1, (SIZE*)pSize);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (72)
334
cp.ClassName =
PInvoke
.WC_COMBOBOX;
335
cp.Style |= (int)WINDOW_STYLE.WS_VSCROLL |
PInvoke
.CBS_HASSTRINGS |
PInvoke
.CBS_AUTOHSCROLL;
339
cp.Style |=
PInvoke
.CBS_NOINTEGRALHEIGHT;
345
cp.Style |=
PInvoke
.CBS_SIMPLE;
348
cp.Style |=
PInvoke
.CBS_DROPDOWN;
353
cp.Style |=
PInvoke
.CBS_DROPDOWNLIST;
362
cp.Style |=
PInvoke
.CBS_OWNERDRAWFIXED;
365
cp.Style |=
PInvoke
.CBS_OWNERDRAWVARIABLE;
441
PInvokeCore.SendMessage(this,
PInvoke
.CB_SETDROPPEDWIDTH, (WPARAM)value);
481
get => IsHandleCreated && (int)PInvokeCore.SendMessage(this,
PInvoke
.CB_GETDROPPEDSTATE) != 0;
489
PInvokeCore.SendMessage(this,
PInvoke
.CB_SHOWDROPDOWN, (WPARAM)(value ? -1 : 0));
527
HWND focus =
PInvoke
.GetFocus();
590
int height = (int)PInvokeCore.SendMessage(this,
PInvoke
.CB_GETITEMHEIGHT);
698
PInvokeCore.SendMessage(this,
PInvoke
.CB_LIMITTEXT, (WPARAM)value);
867
get => IsHandleCreated ? (int)PInvokeCore.SendMessage(this,
PInvoke
.CB_GETCURSEL) : _selectedIndex;
880
PInvokeCore.SendMessage(this,
PInvoke
.CB_SETCURSEL, (WPARAM)value);
974
PInvokeCore.SendMessage(this,
PInvoke
.CB_GETEDITSEL, (WPARAM)(&start), (LPARAM)(&end));
995
PInvokeCore.SendMessage(this,
PInvoke
.CB_GETEDITSEL, (WPARAM)(&value));
1576
(WPARAM)(
PInvoke
.EC_LEFTMARGIN |
PInvoke
.EC_RIGHTMARGIN));
1751
&& m.HWnd == _childEdit.Handle && PARAM.LOWORD(m.LParamInternal) == (int)
PInvoke
.HTCLIENT)
1872
PInvoke
.InvalidateRect(_childEdit, lpRect: null, bErase: false);
1877
PInvoke
.InvalidateRect(_childListBox, lpRect: null, bErase: false);
1967
int h = (int)PInvokeCore.SendMessage(this,
PInvoke
.CB_GETITEMHEIGHT, (WPARAM)index);
2119
PInvoke
.RedrawWindow(
2160
int insertIndex = (int)PInvokeCore.SendMessage(this,
PInvoke
.CB_ADDSTRING, (WPARAM)0, GetItemText(item));
2176
PInvokeCore.SendMessage(this,
PInvoke
.CB_RESETCONTENT);
2189
int maxLength = (int)PInvokeCore.SendMessage(this,
PInvoke
.CB_GETLBTEXTLEN, (WPARAM)index);
2190
if (maxLength ==
PInvoke
.LB_ERR)
2198
int actualLength = (int)PInvokeCore.SendMessage(this,
PInvoke
.CB_GETLBTEXT, (WPARAM)index, (LPARAM)b);
2199
Debug.Assert(actualLength !=
PInvoke
.LB_ERR, "Should have validated the index above");
2200
return actualLength ==
PInvoke
.LB_ERR ? string.Empty : buffer[..Math.Min(maxLength, actualLength)].ToString();
2211
int insertIndex = (int)PInvokeCore.SendMessage(this,
PInvoke
.CB_INSERTSTRING, (WPARAM)index, GetItemText(item));
2238
PInvokeCore.SendMessage(this,
PInvoke
.CB_DELETESTRING, (WPARAM)index);
2273
PInvokeCore.SendMessage(this,
PInvoke
.CB_LIMITTEXT, (WPARAM)MaxLength);
2285
HWND hwnd =
PInvoke
.GetWindow(this, GET_WINDOW_CMD.GW_CHILD);
2295
hwnd =
PInvoke
.GetWindow(new HandleRef<HWND>(this, hwnd), GET_WINDOW_CMD.GW_HWNDNEXT);
2302
PInvokeCore.SendMessage(_childEdit, PInvokeCore.EM_SETMARGINS, (WPARAM)(
PInvoke
.EC_LEFTMARGIN |
PInvoke
.EC_RIGHTMARGIN));
2308
PInvokeCore.SendMessage(this,
PInvoke
.CB_SETDROPPEDWIDTH, (WPARAM)dropDownWidth);
2341
PInvoke
.SetWindowTheme(HWND, $"{DarkModeIdentifier}_{ComboBoxButtonThemeIdentifier}", null);
2346
_ =
PInvoke
.GetComboBoxInfo(HWND, ref cInfo);
2347
PInvoke
.SetWindowTheme(cInfo.hwndList, $"{DarkModeIdentifier}_{ExplorerThemeIdentifier}", null);
2361
PInvokeCore.SendMessage(this,
PInvoke
.CB_SETCURSEL, (WPARAM)_selectedIndex);
2898
PInvoke
.NotifyWinEvent(
2902
(int)
PInvoke
.CHILDID_SELF);
3071
PInvoke
.UiaDisconnectProvider(_childTextAccessibleObject);
3119
PInvoke
.SHAutoComplete(
3146
PInvoke
.SHAutoComplete(
3175
PInvoke
.SHAutoComplete(
3189
PInvoke
.SHAutoComplete(
3229
PInvoke
.SHAutoComplete(_childEdit.HWND, (SHELL_AUTOCOMPLETE_FLAGS)AutoCompleteSource | mode);
3247
PInvokeCore.SendMessage(this,
PInvoke
.CB_SETEDITSEL, (WPARAM)0, LPARAM.MAKELPARAM(start, end));
3291
PInvokeCore.SendMessage(this,
PInvoke
.CB_SETCURSEL, (WPARAM)DataManager.Position);
3362
PInvoke
.SetWindowPos(
3389
PInvokeCore.SendMessage(this,
PInvoke
.CB_SETITEMHEIGHT, (WPARAM)(-1), (LPARAM)ItemHeight);
3390
PInvokeCore.SendMessage(this,
PInvoke
.CB_SETITEMHEIGHT, 0, ItemHeight);
3394
PInvokeCore.SendMessage(this,
PInvoke
.CB_SETITEMHEIGHT, (WPARAM)(-1), (LPARAM)ItemHeight);
3398
int original = (int)PInvokeCore.SendMessage(this,
PInvoke
.CB_GETITEMHEIGHT, (WPARAM)i);
3403
PInvokeCore.SendMessage(this,
PInvoke
.CB_SETITEMHEIGHT, (WPARAM)i, (LPARAM)mievent.ItemHeight);
3548
case
PInvoke
.CBN_DBLCLK:
3550
case
PInvoke
.CBN_EDITUPDATE:
3553
case
PInvoke
.CBN_CLOSEUP:
3563
case
PInvoke
.CBN_DROPDOWN:
3570
case
PInvoke
.CBN_EDITCHANGE:
3573
case
PInvoke
.CBN_SELCHANGE:
3577
case
PInvoke
.CBN_SELENDOK:
3740
bool getRegionSucceeded =
PInvoke
.GetUpdateRgn(HWND, windowRegion, bErase: true) != GDI_REGION_TYPE.RGN_ERROR;
3744
PInvoke
.GetRgnBox(windowRegion, &updateRegionBoundingRect);
3782
if (((nint)m.LParamInternal &
PInvoke
.PRF_CLIENT) ==
PInvoke
.PRF_CLIENT)
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (2)
42
PInvoke
.UiaDisconnectProvider(_topRowAccessibilityObject, skipOSCheck: true);
45
PInvoke
.UiaDisconnectProvider(_selectedCellsAccessibilityObject, skipOSCheck: true);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (24)
5710
PInvoke
.PatBlt(dc, r.X, r.Y, r.Width, DATAGRIDVIEW_shadowEdgeThickness, ROP_CODE.PATINVERT);
5711
PInvoke
.PatBlt(dc, r.X, r.Y + r.Height - DATAGRIDVIEW_shadowEdgeThickness, r.Width, DATAGRIDVIEW_shadowEdgeThickness, ROP_CODE.PATINVERT);
5712
PInvoke
.PatBlt(dc, r.X, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, ROP_CODE.PATINVERT);
5713
PInvoke
.PatBlt(dc, r.X + r.Width - DATAGRIDVIEW_shadowEdgeThickness, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, ROP_CODE.PATINVERT);
5728
PInvoke
.PatBlt(dc, r.X, r.Y, r.Width, r.Height, ROP_CODE.PATINVERT);
16482
Debug.Assert(_cumulativeVerticalWheelDelta > -
PInvoke
.WHEEL_DELTA);
16483
Debug.Assert(_cumulativeVerticalWheelDelta <
PInvoke
.WHEEL_DELTA);
16484
Debug.Assert(_cumulativeHorizontalWheelDelta > -
PInvoke
.WHEEL_DELTA);
16485
Debug.Assert(_cumulativeHorizontalWheelDelta <
PInvoke
.WHEEL_DELTA);
16492
partialNotches = _cumulativeVerticalWheelDelta / (float)
PInvoke
.WHEEL_DELTA;
16497
partialNotches = _cumulativeHorizontalWheelDelta / (float)
PInvoke
.WHEEL_DELTA;
16522
_cumulativeVerticalWheelDelta -= fullNotches * (int)
PInvoke
.WHEEL_DELTA;
16535
_cumulativeHorizontalWheelDelta -= fullNotches * (int)
PInvoke
.WHEEL_DELTA;
16577
_cumulativeVerticalWheelDelta -= (int)(scrollBands * (
PInvoke
.WHEEL_DELTA / (float)wheelScrollLines));
16604
_cumulativeVerticalWheelDelta -= (int)(scrollBands * (
PInvoke
.WHEEL_DELTA / (float)wheelScrollLines));
16635
_cumulativeHorizontalWheelDelta -= (int)(scrollBands * (
PInvoke
.WHEEL_DELTA / (float)wheelScrollLines));
26253
PInvoke
.ScrollWindow(
26368
PInvoke
.ScrollWindow(this, 0, deltaY, &scrollArea, &scrollArea);
28340
AccessibilityNotifyClients(AccessibleEvents.Reorder, (int)OBJECT_IDENTIFIER.OBJID_CLIENT, (int)
PInvoke
.CHILDID_SELF);
30018
m.ResultInternal = (LRESULT)(m.ResultInternal | (nint)
PInvoke
.DLGC_WANTARROWS | (nint)
PInvoke
.DLGC_WANTCHARS);
30023
m.ResultInternal = (LRESULT)(m.ResultInternal | (nint)
PInvoke
.DLGC_WANTTAB);
30035
if (nmhdr->code ==
PInvoke
.TTN_GETDISPINFOW && !DesignMode)
30042
PInvokeCore.SendMessage(nmhdr->hwndFrom,
PInvoke
.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (2)
1067
PInvoke
.SetFocus(default);
3873
PInvoke
.UiaDisconnectProvider(AccessibilityObject);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (1)
1364
PInvoke
.DrawFrameControl(
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (3)
618
PInvokeCore.SendMessage(comboBox,
PInvoke
.CB_SETDROPPEDWIDTH, (WPARAM)s_cachedDropDownWidth);
625
int dropDownWidth = (int)PInvokeCore.SendMessage(comboBox,
PInvoke
.CB_GETDROPPEDWIDTH);
628
PInvokeCore.SendMessage(comboBox,
PInvoke
.CB_SETDROPPEDWIDTH, (WPARAM)DropDownWidth);
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (1)
1746
PInvoke
.UiaDisconnectProvider(AccessibilityObject);
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (41)
49
private const uint TIMEFORMAT_NOUPDOWN =
PInvoke
.DTS_TIMEFORMAT & (~
PInvoke
.DTS_UPDOWN);
192
SetControlColor(
PInvoke
.MCSC_TEXT, value);
252
SetControlColor(
PInvoke
.MCSC_TITLEBK, value);
275
SetControlColor(
PInvoke
.MCSC_TITLETEXT, value);
298
SetControlColor(
PInvoke
.MCSC_TRAILINGTEXT, value);
321
SetControlColor(
PInvoke
.MCSC_MONTHBK, value);
341
nint result = PInvokeCore.SendMessage(this,
PInvoke
.DTM_GETSYSTEMTIME, 0, ref systemTime);
359
PInvokeCore.SendMessage(this,
PInvoke
.DTM_SETSYSTEMTIME, (WPARAM)(uint)NMDATETIMECHANGE_FLAGS.GDT_VALID, ref systemTime);
363
PInvokeCore.SendMessage(this,
PInvoke
.DTM_SETSYSTEMTIME, (WPARAM)(uint)NMDATETIMECHANGE_FLAGS.GDT_NONE);
391
cp.ClassName =
PInvoke
.DATETIMEPICK_CLASS;
398
cp.Style |= (int)
PInvoke
.DTS_LONGDATEFORMAT;
445
PInvokeCore.SendMessage(this,
PInvoke
.DTM_SETFORMATW, 0, _customFormat);
478
get => (_style &
PInvoke
.DTS_RIGHTALIGN) != 0 ? LeftRightAlignment.Right : LeftRightAlignment.Left;
483
SetStyleBit(value == LeftRightAlignment.Right,
PInvoke
.DTS_RIGHTALIGN);
790
get => (_style &
PInvoke
.DTS_SHOWNONE) != 0;
791
set => SetStyleBit(value,
PInvoke
.DTS_SHOWNONE);
802
get => (_style &
PInvoke
.DTS_UPDOWN) != 0;
807
SetStyleBit(value,
PInvoke
.DTS_UPDOWN);
896
PInvokeCore.SendMessage(this,
PInvoke
.DTM_SETSYSTEMTIME, (WPARAM)(uint)NMDATETIMECHANGE_FLAGS.GDT_VALID, ref systemTime);
962
PInvoke
.InitCommonControlsEx(new INITCOMMONCONTROLSEX
977
PInvokeCore.SendMessage(this,
PInvoke
.DTM_SETSYSTEMTIME, (uint)NMDATETIMECHANGE_FLAGS.GDT_VALID, ref systemTime);
981
PInvokeCore.SendMessage(this,
PInvoke
.DTM_SETSYSTEMTIME, (uint)NMDATETIMECHANGE_FLAGS.GDT_NONE);
986
PInvokeCore.SendMessage(this,
PInvoke
.DTM_SETFORMATW, 0, _customFormat);
1263
PInvokeCore.SendMessage(this,
PInvoke
.DTM_SETSYSTEMTIME, (uint)NMDATETIMECHANGE_FLAGS.GDT_VALID, ref systemTime);
1280
PInvokeCore.SendMessage(this,
PInvoke
.DTM_SETMCCOLOR, (WPARAM)(int)colorIndex, (LPARAM)value);
1291
PInvokeCore.SendMessage(this,
PInvoke
.DTM_SETMCFONT, (WPARAM)CalendarFontHandle, (LPARAM)(-1));
1300
SetControlColor(
PInvoke
.MCSC_MONTHBK, _calendarMonthBackground);
1301
SetControlColor(
PInvoke
.MCSC_TEXT, _calendarForeColor);
1302
SetControlColor(
PInvoke
.MCSC_TITLEBK, _calendarTitleBackColor);
1303
SetControlColor(
PInvoke
.MCSC_TITLETEXT, _calendarTitleForeColor);
1304
SetControlColor(
PInvoke
.MCSC_TRAILINGTEXT, _calendarTrailingText);
1320
uint flags =
PInvoke
.GDTR_MIN |
PInvoke
.GDTR_MAX;
1321
PInvokeCore.SendMessage(this,
PInvoke
.DTM_SETRANGE, (WPARAM)flags, ref times[0]);
1446
PInvoke
.InvalidateRect(c.hwndFound, lpRect: (RECT*)null, bErase: true);
1447
PInvoke
.UpdateWindow(c.hwndFound);
1505
HWND handle = (HWND)PInvokeCore.SendMessage(this,
PInvoke
.DTM_GETMONTHCAL);
1538
case
PInvoke
.DTN_CLOSEUP:
1541
case
PInvoke
.DTN_DATETIMECHANGE:
1544
case
PInvoke
.DTN_DROPDOWN:
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.DateTimePickerAccessibleObject.cs (1)
145
PInvokeCore.SendMessage(owner,
PInvoke
.DTM_CLOSEMONTHCAL);
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (4)
118
cp.ClassName =
PInvoke
.WC_BUTTON;
119
cp.Style |=
PInvoke
.BS_GROUPBOX;
125
cp.Style &= ~
PInvoke
.BS_GROUPBOX;
675
PInvoke
.FillRect((HDC)m.WParamInternal, rect, hbrush);
System\Windows\Forms\Controls\ImageList\ImageList.cs (9)
215
if (
PInvoke
.ImageList.GetIconSize(new HandleRef<HIMAGELIST>(this, _nativeImageList.HIMAGELIST), out int x, out int y))
221
if (
PInvoke
.ImageList.GetImageInfo(new HandleRef<HIMAGELIST>(this, _nativeImageList.HIMAGELIST), 0, out IMAGEINFO imageInfo))
353
int index =
PInvoke
.ImageList.ReplaceIcon(this, -1, new HandleRef<HICON>(icon, (HICON)icon.Handle));
382
index =
PInvoke
.ImageList.Add(this, hBitmap, hMask);
428
PInvoke
.InitCommonControls();
434
PInvoke
.ImageList.SetBkColor(this, (COLORREF)PInvokeCore.CLR_NONE);
531
PInvoke
.ImageList.DrawEx(
616
if (
PInvoke
.ImageList.GetImageInfo(this, index, out IMAGEINFO imageInfo))
667
PInvoke
.ImageList.DrawEx(
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (4)
87
return
PInvoke
.ImageList.GetImageCount(_owner);
163
ok =
PInvoke
.ImageList.Replace(_owner, index, hBitmap, hMask);
423
PInvoke
.ImageList.Remove(_owner, -1);
548
if (!
PInvoke
.ImageList.Remove(_owner, index))
System\Windows\Forms\Controls\ImageList\ImageList.NativeImageList.cs (4)
28
himl =
PInvoke
.ImageList_Read(stream);
38
himl =
PInvoke
.ImageList_Create(imageSize.Width, imageSize.Height, flags, InitialCapacity, GrowBy);
75
PInvoke
.ImageList.Destroy(this);
99
HIMAGELIST himl =
PInvoke
.ImageList_Duplicate(HIMAGELIST);
System\Windows\Forms\Controls\ImageList\ImageListStreamer.cs (3)
76
PInvoke
.InitCommonControls();
130
return
PInvoke
.ImageList.WriteEx(
140
return
PInvoke
.ImageList.Write(handle, stream);
System\Windows\Forms\Controls\Labels\Label.cs (3)
251
cp.ClassName =
PInvoke
.WC_STATIC;
1437
m.ResultInternal = (LRESULT)(nint)(rectInScreen.Contains(pt) ?
PInvoke
.HTCLIENT :
PInvoke
.HTNOWHERE);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (6)
300
PInvoke
.GetCursorPos(out Point p);
302
if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) ||
PInvoke
.GetCapture() == HWND)
304
PInvokeCore.SendMessage(this, PInvokeCore.WM_SETCURSOR, (WPARAM)HWND, (LPARAM)(int)
PInvoke
.HTCLIENT);
438
PInvoke
.UiaDisconnectProvider(link.AccessibleObject, skipOSCheck: true);
1361
(int)
PInvoke
.GetNearestColor(hdc, (COLORREF)(uint)ColorTranslator.ToWin32(foreBrush.Color)).Value);
1750
if ((HWND)m.WParamInternal == InternalHandle && m.LParamInternal.LOWORD ==
PInvoke
.HTCLIENT)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (12)
53
private static uint LBC_GETCHECKSTATE { get; } =
PInvoke
.RegisterWindowMessage("LBC_GETCHECKSTATE");
54
private static uint LBC_SETCHECKSTATE { get; } =
PInvoke
.RegisterWindowMessage("LBC_SETCHECKSTATE");
100
cp.Style |=
PInvoke
.LBS_OWNERDRAWFIXED |
PInvoke
.LBS_WANTKEYBOARDINPUT;
392
PInvokeCore.SendMessage(this,
PInvoke
.LB_GETITEMRECT, (WPARAM)index, ref rect);
393
PInvoke
.InvalidateRect(this, &rect, bErase: false);
464
PInvokeCore.SendMessage(this,
PInvoke
.LB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)ItemHeight);
752
PInvoke
.InvalidateRect(this, null, true);
761
PInvokeCore.SendMessage(this,
PInvoke
.LB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)ItemHeight);
893
case
PInvoke
.LBN_SELCHANGE:
898
case
PInvoke
.LBN_DBLCLK:
947
m.ResultInternal = (LRESULT)
PInvoke
.LB_ERR;
System\Windows\Forms\Controls\ListBoxes\ListBox.AccessibleObject.cs (2)
134
PInvoke
.UiaDisconnectProvider(itemAccessibleObject, skipOSCheck: true);
161
PInvoke
.UiaDisconnectProvider(value);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (55)
30
public const int NoMatches =
PInvoke
.LB_ERR;
257
PInvokeCore.SendMessage(this,
PInvoke
.LB_SETCOLUMNWIDTH, (WPARAM)_columnWidth);
272
cp.ClassName =
PInvoke
.WC_LISTBOX;
274
cp.Style |= (int)WINDOW_STYLE.WS_VSCROLL |
PInvoke
.LBS_NOTIFY |
PInvoke
.LBS_HASSTRINGS;
277
cp.Style |=
PInvoke
.LBS_DISABLENOSCROLL;
282
cp.Style |=
PInvoke
.LBS_NOINTEGRALHEIGHT;
287
cp.Style |=
PInvoke
.LBS_USETABSTOPS;
302
cp.Style |=
PInvoke
.LBS_MULTICOLUMN | (int)WINDOW_STYLE.WS_HSCROLL;
312
cp.Style |=
PInvoke
.LBS_NOSEL;
315
cp.Style |=
PInvoke
.LBS_MULTIPLESEL;
318
cp.Style |=
PInvoke
.LBS_EXTENDEDSEL;
329
cp.Style |=
PInvoke
.LBS_OWNERDRAWFIXED;
332
cp.Style |=
PInvoke
.LBS_OWNERDRAWVARIABLE;
423
internal int FocusedIndex => IsHandleCreated ? (int)PInvokeCore.SendMessage(this,
PInvoke
.LB_GETCARETINDEX) : -1;
598
PInvokeCore.SendMessage(this,
PInvoke
.LB_SETITEMHEIGHT, 0, value);
839
return (int)PInvokeCore.SendMessage(this,
PInvoke
.LB_GETCURSEL);
1117
get => IsHandleCreated ? (int)PInvokeCore.SendMessage(this,
PInvoke
.LB_GETTOPINDEX) : _topIndex;
1122
PInvokeCore.SendMessage(this,
PInvoke
.LB_SETTOPINDEX, (WPARAM)value);
1425
int height = (int)PInvokeCore.SendMessage(this,
PInvoke
.LB_GETITEMHEIGHT, (WPARAM)index);
1446
if (PInvokeCore.SendMessage(this,
PInvoke
.LB_GETITEMRECT, (uint)index, ref rect) == 0)
1480
int selection = (int)PInvokeCore.SendMessage(this,
PInvoke
.LB_GETSEL, (WPARAM)index);
1517
int index = (int)PInvokeCore.SendMessage(this,
PInvoke
.LB_ITEMFROMPOINT, 0, PARAM.FromLowHigh(x, y));
1534
int insertIndex = (int)PInvokeCore.SendMessage(this,
PInvoke
.LB_ADDSTRING, 0, GetItemText(item));
1535
if (insertIndex ==
PInvoke
.LB_ERRSPACE)
1540
if (insertIndex ==
PInvoke
.LB_ERR)
1558
PInvokeCore.SendMessage(this,
PInvoke
.LB_RESETCONTENT);
1567
int maxLength = (int)PInvokeCore.SendMessage(this,
PInvoke
.LB_GETTEXTLEN, (WPARAM)index);
1568
if (maxLength ==
PInvoke
.LB_ERR)
1576
int actualLength = (int)PInvokeCore.SendMessage(this,
PInvoke
.LB_GETTEXT, (WPARAM)index, (LPARAM)b);
1577
Debug.Assert(actualLength !=
PInvoke
.LB_ERR, "Should have validated the index above");
1578
return actualLength ==
PInvoke
.LB_ERR ? string.Empty : buffer[..Math.Min(maxLength, actualLength)].ToString();
1589
int insertIndex = (int)PInvokeCore.SendMessage(this,
PInvoke
.LB_INSERTSTRING, (uint)index, GetItemText(item));
1591
if (insertIndex ==
PInvoke
.LB_ERRSPACE)
1596
if (insertIndex ==
PInvoke
.LB_ERR)
1616
bool selected = (int)PInvokeCore.SendMessage(this,
PInvoke
.LB_GETSEL, (WPARAM)index) > 0;
1617
PInvokeCore.SendMessage(this,
PInvoke
.LB_DELETESTRING, (WPARAM)index);
1639
PInvokeCore.SendMessage(this,
PInvoke
.LB_SETCURSEL, (WPARAM)(value ? index : -1));
1643
PInvokeCore.SendMessage(this,
PInvoke
.LB_SETSEL, (WPARAM)(BOOL)value, (LPARAM)index);
1666
int index = (int)PInvokeCore.SendMessage(this,
PInvoke
.LB_GETCURSEL);
1676
int count = (int)PInvokeCore.SendMessage(this,
PInvoke
.LB_GETSELCOUNT);
1682
PInvokeCore.SendMessage(this,
PInvoke
.LB_GETSELITEMS, (WPARAM)count, (LPARAM)pResult);
1747
PInvokeCore.SendMessage(this,
PInvoke
.LB_SETLOCALE, (WPARAM)PInvokeCore.GetThreadLocale());
1751
PInvokeCore.SendMessage(this,
PInvoke
.LB_SETCOLUMNWIDTH, (WPARAM)_columnWidth);
1756
PInvokeCore.SendMessage(this,
PInvoke
.LB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)ItemHeight);
1761
PInvokeCore.SendMessage(this,
PInvoke
.LB_SETTOPINDEX, (WPARAM)_topIndex);
1772
PInvokeCore.SendMessage(this,
PInvoke
.LB_SETTABSTOPS, (WPARAM)wpar, (LPARAM)pOffsets);
2118
PInvokeCore.SendMessage(this,
PInvoke
.LB_SETCURSEL, (WPARAM)DataManager.Position);
2257
PInvokeCore.SendMessage(this,
PInvoke
.LB_SETHORIZONTALEXTENT, (WPARAM)width);
2314
PInvokeCore.SendMessage(this,
PInvoke
.LB_SETTABSTOPS, (WPARAM)wpar, (nint)pOffsets);
2324
if (((nint)m.LParamInternal &
PInvoke
.PRF_NONCLIENT) != 0 && Application.RenderWithVisualStyles && BorderStyle == BorderStyle.Fixed3D)
2339
case
PInvoke
.LBN_SELCHANGE:
2343
case
PInvoke
.LBN_DBLCLK:
2422
if (captured &&
PInvoke
.WindowFromPoint(PointToScreen(point)) == HWND)
2462
if (Capture &&
PInvoke
.WindowFromPoint(PointToScreen((Point)m.LParamInternal)) == HWND)
System\Windows\Forms\Controls\ListBoxes\ListBox.ItemAccessibleObject.cs (6)
207
PInvokeCore.SendMessage(_owningListBox,
PInvoke
.LB_SETCARETINDEX, (WPARAM)currentIndex);
211
int firstVisibleIndex = (int)PInvokeCore.SendMessage(_owningListBox,
PInvoke
.LB_GETTOPINDEX);
214
PInvokeCore.SendMessage(_owningListBox,
PInvoke
.LB_SETTOPINDEX, (WPARAM)currentIndex);
224
int itemHeight = (int)PInvokeCore.SendMessage(_owningListBox,
PInvoke
.LB_GETITEMHEIGHT, (WPARAM)i);
236
PInvokeCore.SendMessage(_owningListBox,
PInvoke
.LB_SETTOPINDEX, (WPARAM)(currentIndex - visibleItemsCount + 1));
252
PInvoke
.InvalidateRect(_owningListBox, lpRect: null, bErase: false);
System\Windows\Forms\Controls\ListBoxes\ListBox.SelectedObjectCollection.cs (1)
55
return (int)PInvokeCore.SendMessage(_owner,
PInvoke
.LB_GETSELCOUNT);
System\Windows\Forms\Controls\ListView\ColumnHeader.cs (5)
395
HWND hwndHdr = (HWND)PInvokeCore.SendMessage(ListView,
PInvoke
.LVM_GETHEADER);
398
int nativeColumnCount = (int)PInvokeCore.SendMessage(hwndHdr,
PInvoke
.HDM_GETITEMCOUNT);
401
_width = (int)PInvokeCore.SendMessage(ListView,
PInvoke
.LVM_GETCOLUMNWIDTH, (WPARAM)Index);
467
PInvoke
.UiaDisconnectProvider(_accessibilityObject);
483
PInvokeCore.SendMessage(ListView,
PInvoke
.LVM_SETCOLUMNORDERARRAY, (WPARAM)cols.Length, (LPARAM)pCols);
System\Windows\Forms\Controls\ListView\ItemBoundsPortion.cs (4)
14
Entire = (int)
PInvoke
.LVIR_BOUNDS,
19
Icon = (int)
PInvoke
.LVIR_ICON,
24
Label = (int)
PInvoke
.LVIR_LABEL,
29
ItemOnly = (int)
PInvoke
.LVIR_SELECTBOUNDS,
System\Windows\Forms\Controls\ListView\ListView.ColumnHeaderCollection.cs (2)
334
PInvokeCore.SendMessage(_owner,
PInvoke
.LVM_DELETECOLUMN, (WPARAM)colIdx);
507
int retval = (int)PInvokeCore.SendMessage(_owner,
PInvoke
.LVM_DELETECOLUMN, (WPARAM)index);
System\Windows\Forms\Controls\ListView\ListView.cs (243)
354
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETBKCOLOR, (WPARAM)0, (LPARAM)BackColor);
404
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETBKIMAGEW, (WPARAM)0, ref lvbkImage);
559
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETIMAGELIST, (WPARAM)
PInvoke
.LVSIL_STATE, (LPARAM)_imageListState.Handle);
563
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETIMAGELIST,
PInvoke
.LVSIL_STATE);
636
cp.ClassName =
PInvoke
.WC_LISTVIEW;
645
cp.Style |= (int)
PInvoke
.LVS_SHAREIMAGELISTS;
650
cp.Style |= (int)
PInvoke
.LVS_ALIGNTOP;
653
cp.Style |= (int)
PInvoke
.LVS_ALIGNLEFT;
659
cp.Style |= (int)
PInvoke
.LVS_AUTOARRANGE;
675
cp.Style |= (int)
PInvoke
.LVS_NOCOLUMNHEADER;
678
cp.Style |= (int)
PInvoke
.LVS_NOSORTHEADER;
684
cp.Style |= (int)
PInvoke
.LVS_EDITLABELS;
689
cp.Style |= (int)
PInvoke
.LVS_NOLABELWRAP;
694
cp.Style |= (int)
PInvoke
.LVS_SHOWSELALWAYS;
699
cp.Style |= (int)
PInvoke
.LVS_SINGLESEL;
707
cp.Style |= (int)
PInvoke
.LVS_SORTASCENDING;
710
cp.Style |= (int)
PInvoke
.LVS_SORTDESCENDING;
717
cp.Style |= (int)
PInvoke
.LVS_OWNERDATA;
814
PInvoke
.LVM_GETNEXTITEM,
816
(LPARAM)
PInvoke
.LVNI_FOCUSED);
843
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETTEXTCOLOR, (WPARAM)0, (LPARAM)ForeColor);
958
PInvoke
.LVM_SETIMAGELIST,
959
(WPARAM)
PInvoke
.LVSIL_GROUPHEADER,
1222
PInvoke
.LVM_SETIMAGELIST,
1223
(WPARAM)
PInvoke
.LVSIL_NORMAL,
1459
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETIMAGELIST, (WPARAM)
PInvoke
.LVSIL_SMALL, (LPARAM)(value?.Handle ?? 0));
1565
PInvoke
.LVM_SETIMAGELIST,
1566
(WPARAM)
PInvoke
.LVSIL_STATE,
1582
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETIMAGELIST, (WPARAM)
PInvoke
.LVSIL_STATE);
1602
PInvoke
.LVM_SETIMAGELIST,
1603
(WPARAM)
PInvoke
.LVSIL_STATE,
1663
PInvokeCore.SendMessage(this,
PInvoke
.LVM_GETTILEVIEWINFO, (WPARAM)0, ref tileViewInfo);
1693
nint result = PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETTILEVIEWINFO, (WPARAM)0, ref tileViewInfo);
1726
_topIndex = (int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_GETTOPINDEX);
1837
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETVIEW, (WPARAM)(int)_viewStyle);
1886
topIndex = (int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_GETTOPINDEX);
1893
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETITEMCOUNT, (WPARAM)_virtualListSize);
2189
HWND hwnd = (HWND)PInvokeCore.SendMessage(this,
PInvoke
.LVM_GETHEADER);
2206
if (
PInvoke
.GetScrollInfo(this, SCROLLBAR_CONSTANTS.SB_HORZ, ref si))
2212
&& PInvokeCore.SendMessage(hwnd,
PInvoke
.HDM_HITTEST, (WPARAM)0, ref lvhi) != -1 && lvhi.iItem > -1)
2256
case
PInvoke
.LVA_DEFAULT:
2257
case (ListViewAlignment)
PInvoke
.LVA_ALIGNLEFT:
2258
case (ListViewAlignment)
PInvoke
.LVA_ALIGNTOP:
2259
case (ListViewAlignment)
PInvoke
.LVA_SNAPTOGRID:
2262
PInvokeCore.PostMessage(this,
PInvoke
.LVM_ARRANGE, (WPARAM)(int)value);
2281
public void ArrangeIcons() => ArrangeIcons(
PInvoke
.LVA_DEFAULT);
2565
PInvoke
.InitCommonControlsEx(new INITCOMMONCONTROLSEX
2601
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_NOTIFYITEMDRAW;
2606
m.ResultInternal = (LRESULT)(nint)(
PInvoke
.CDRF_NOTIFYSUBITEMDRAW |
PInvoke
.CDRF_NEWFONT);
2623
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_NEWFONT;
2666
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_NOTIFYSUBITEMDRAW;
2672
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_SKIPDEFAULT;
2684
m.ResultInternal = (LRESULT)(nint)(
PInvoke
.CDRF_NOTIFYSUBITEMDRAW |
PInvoke
.CDRF_NEWFONT);
2759
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_SKIPDEFAULT;
2769
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_NEWFONT;
2920
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_NEWFONT;
2931
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_DODEFAULT;
2938
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_DODEFAULT;
3182
if (PInvokeCore.SendMessage(this,
PInvoke
.LVM_HASGROUP, (WPARAM)DefaultGroup.ID) == 0)
3201
PInvokeCore.SendMessage(this,
PInvoke
.LVM_ENSUREVISIBLE, (WPARAM)index);
3321
PInvoke
.LVM_FINDITEMW,
3371
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETEXTENDEDLISTVIEWSTYLE, (WPARAM)
PInvoke
.LVS_EX_CHECKBOXES);
3374
PInvoke
.LVM_SETEXTENDEDLISTVIEWSTYLE,
3375
(WPARAM)
PInvoke
.LVS_EX_CHECKBOXES,
3376
(LPARAM)
PInvoke
.LVS_EX_CHECKBOXES);
3426
displayIndex = (int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_FINDITEMW, (WPARAM)(lastIndex - 1), ref info);
3431
displayIndex = (int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_FINDITEMW, (WPARAM)(-1) /* beginning */, ref info);
3491
int displayIndex = (int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_HITTEST, (WPARAM)0, ref lvhi);
3540
int index = (int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_SUBITEMHITTEST, (WPARAM)0, ref lvhi);
3556
PInvokeCore.SendMessage(this,
PInvoke
.LVM_GETITEMPOSITION, (WPARAM)index, ref position);
3573
return (LIST_VIEW_ITEM_STATE_FLAGS)(uint)PInvokeCore.SendMessage(this,
PInvoke
.LVM_GETITEMSTATE, (WPARAM)index, (LPARAM)(uint)mask);
3602
return PInvokeCore.SendMessage(this,
PInvoke
.LVM_GETITEMRECT, (WPARAM)index, ref itemrect) == 0
3631
return PInvokeCore.SendMessage(this,
PInvoke
.LVM_GETITEMRECT, (WPARAM)index, ref itemrect) == 0
3679
return PInvokeCore.SendMessage(this,
PInvoke
.LVM_GETSUBITEMRECT, (WPARAM)itemIndex, ref itemrect) == 0
3710
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETIMAGELIST, (WPARAM)
PInvoke
.LVSIL_GROUPHEADER, handle);
3728
? (int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_SUBITEMHITTEST, (WPARAM)0, ref lvhi)
3729
: (int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_HITTEST, (WPARAM)0, ref lvhi);
3799
HWND header = (HWND)PInvokeCore.SendMessage(this,
PInvoke
.LVM_GETHEADER);
3802
PInvoke
.InvalidateRect(new HandleRef<HWND>(this, header), lpRect: null, bErase: true);
3935
return (int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_INSERTCOLUMNW, (WPARAM)index, ref lvColumn);
3980
PInvokeCore.SendMessage(this,
PInvoke
.LVM_GETITEMW, (WPARAM)0, ref lvItem);
3993
nint result = SendGroupMessage(group,
PInvoke
.LVM_INSERTGROUP, index, LVGROUP_MASK.LVGF_GROUPID);
4123
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETITEMCOUNT, (WPARAM)_itemCount);
4150
IntPtr result = PInvokeCore.SendMessage(this,
PInvoke
.LVM_ISGROUPVIEWENABLED);
4152
result = PInvokeCore.SendMessage(this,
PInvoke
.LVM_HASGROUP, (WPARAM)lvItem.iGroupId);
4197
PInvoke
.LVM_INSERTITEMW,
4310
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETIMAGELIST, (WPARAM)
PInvoke
.LVSIL_NORMAL, (LPARAM)handle);
4519
PInvokeCore.SendMessage(this,
PInvoke
.LVM_UPDATE, (WPARAM)(-1));
4538
int version = (int)PInvokeCore.SendMessage(this,
PInvoke
.CCM_GETVERSION);
4541
PInvokeCore.SendMessage(this,
PInvoke
.CCM_SETVERSION, (WPARAM)5);
4547
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETBKCOLOR, (WPARAM)0, (LPARAM)BackColor);
4548
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETTEXTCOLOR, (WPARAM)0, (LPARAM)ForeColor);
4554
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETTEXTBKCOLOR, (WPARAM)0, (LPARAM)PInvokeCore.CLR_NONE);
4561
style |= (int)
PInvoke
.LVS_NOSCROLL;
4568
LIST_VIEW_ITEM_STATE_FLAGS callbackMask = (LIST_VIEW_ITEM_STATE_FLAGS)(int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_GETCALLBACKMASK);
4570
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETCALLBACKMASK, (WPARAM)(uint)callbackMask);
4575
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETVIEW, (WPARAM)(uint)_viewStyle);
4631
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETITEMCOUNT, (WPARAM)VirtualListSize);
4679
uint exMask =
PInvoke
.LVS_EX_ONECLICKACTIVATE |
PInvoke
.LVS_EX_TWOCLICKACTIVATE |
4680
PInvoke
.LVS_EX_TRACKSELECT |
PInvoke
.LVS_EX_UNDERLINEHOT |
4681
PInvoke
.LVS_EX_ONECLICKACTIVATE |
PInvoke
.LVS_EX_HEADERDRAGDROP |
4682
PInvoke
.LVS_EX_CHECKBOXES |
PInvoke
.LVS_EX_FULLROWSELECT |
4683
PInvoke
.LVS_EX_GRIDLINES |
PInvoke
.LVS_EX_INFOTIP |
PInvoke
.LVS_EX_DOUBLEBUFFER;
4686
exStyle |=
PInvoke
.LVS_EX_DOUBLEBUFFER;
4690
PInvoke
.LVM_SETEXTENDEDLISTVIEWSTYLE,
4695
_ =
PInvoke
.SetWindowTheme(
4703
PInvoke
.LVM_GETHEADER,
4708
PInvoke
.SetWindowTheme(
4932
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETBKCOLOR, (WPARAM)0, (LPARAM)BackColor);
4936
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETTEXTBKCOLOR, (WPARAM)0, (LPARAM)PInvokeCore.CLR_NONE);
4947
HWND headerWindow =
PInvoke
.GetWindow(this, GET_WINDOW_CMD.GW_CHILD);
4959
PInvokeCore.SendMessage(headerWindow,
PInvoke
.HDM_LAYOUT, (WPARAM)0, ref hd);
4962
PInvoke
.SetWindowPos(
4995
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETBKCOLOR, (WPARAM)0, (LPARAM)c);
5002
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETTEXTCOLOR, (WPARAM)0, (LPARAM)c);
5009
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETIMAGELIST, (WPARAM)
PInvoke
.LVSIL_NORMAL, (LPARAM)_imageListLarge.Handle);
5014
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETIMAGELIST, (WPARAM)
PInvoke
.LVSIL_SMALL, (LPARAM)_imageListSmall.Handle);
5019
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETIMAGELIST, (WPARAM)
PInvoke
.LVSIL_STATE, (LPARAM)_imageListState.Handle);
5024
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETIMAGELIST, (WPARAM)
PInvoke
.LVSIL_GROUPHEADER, (LPARAM)_imageListGroup.Handle);
5048
int retval = (int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_REDRAWITEMS, (WPARAM)startIndex, (LPARAM)endIndex);
5156
PInvokeCore.SendMessage(this,
PInvoke
.LVM_REMOVEGROUP, (WPARAM)group.ID);
5162
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SCROLL, (WPARAM)0, (LPARAM)scrollY);
5203
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETBKIMAGEW, (WPARAM)0, ref backgroundImage);
5284
result = PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETCOLUMNW, (WPARAM)ch.Index, ref lvColumn);
5326
if (width ==
PInvoke
.LVSCW_AUTOSIZE_USEHEADER)
5330
else if (width ==
PInvoke
.LVSCW_AUTOSIZE)
5339
width =
PInvoke
.LVSCW_AUTOSIZE_USEHEADER;
5344
width =
PInvoke
.LVSCW_AUTOSIZE;
5349
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETCOLUMNWIDTH, (WPARAM)columnIndex, LPARAM.MAKELPARAM(width, 0));
5361
PInvoke
.LVM_SETCOLUMNWIDTH,
5372
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETCOLUMNWIDTH, (WPARAM)index, LPARAM.MAKELPARAM(width, 0));
5392
PInvoke
.LVM_SETCOLUMNORDERARRAY,
5431
HWND oldHandle = (HWND)PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETTOOLTIPS, toolTip);
5432
PInvoke
.DestroyWindow(oldHandle);
5452
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETITEMW, (WPARAM)0, ref lvItem);
5472
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETITEMW, (WPARAM)0, ref lvItem);
5488
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETITEMPOSITION32, (WPARAM)index, ref pt);
5508
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETITEMSTATE, (WPARAM)index, ref lvItem);
5526
int colWidth = (int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_GETCOLUMNWIDTH);
5545
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETITEMTEXTW, (WPARAM)itemIndex, ref lvItem);
5561
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETSELECTIONMARK, (WPARAM)0, itemIndex);
5572
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETIMAGELIST, (WPARAM)
PInvoke
.LVSIL_SMALL, (LPARAM)handle);
5592
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SORTITEMS, (WPARAM)0, (LPARAM)callbackPointer);
5605
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETIMAGELIST, (WPARAM)
PInvoke
.LVSIL_STATE, (LPARAM)handle);
5647
PInvokeCore.SendMessage(this,
PInvoke
.LVM_UPDATE, (WPARAM)(-1));
5679
exStyle |=
PInvoke
.LVS_EX_ONECLICKACTIVATE;
5682
exStyle |=
PInvoke
.LVS_EX_TWOCLICKACTIVATE;
5688
exStyle |=
PInvoke
.LVS_EX_HEADERDRAGDROP;
5693
exStyle |=
PInvoke
.LVS_EX_CHECKBOXES;
5698
exStyle |=
PInvoke
.LVS_EX_DOUBLEBUFFER;
5703
exStyle |=
PInvoke
.LVS_EX_FULLROWSELECT;
5708
exStyle |=
PInvoke
.LVS_EX_GRIDLINES;
5713
exStyle |=
PInvoke
.LVS_EX_TRACKSELECT;
5718
exStyle |=
PInvoke
.LVS_EX_UNDERLINEHOT;
5723
exStyle |=
PInvoke
.LVS_EX_INFOTIP;
5733
uint exMask =
PInvoke
.LVS_EX_ONECLICKACTIVATE |
PInvoke
.LVS_EX_TWOCLICKACTIVATE |
5734
PInvoke
.LVS_EX_TRACKSELECT |
PInvoke
.LVS_EX_UNDERLINEHOT |
5735
PInvoke
.LVS_EX_ONECLICKACTIVATE |
PInvoke
.LVS_EX_HEADERDRAGDROP |
5736
PInvoke
.LVS_EX_CHECKBOXES |
PInvoke
.LVS_EX_FULLROWSELECT |
5737
PInvoke
.LVS_EX_GRIDLINES |
PInvoke
.LVS_EX_INFOTIP |
PInvoke
.LVS_EX_DOUBLEBUFFER;
5743
PInvoke
.LVM_SETEXTENDEDLISTVIEWSTYLE,
5755
nint result = SendGroupMessage(group,
PInvoke
.LVM_SETGROUPINFO, group.ID, 0);
5861
int retval = (int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_ENABLEGROUPVIEW, (WPARAM)(BOOL)GroupsEnabled);
5882
nint retval = PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETTILEVIEWINFO, (WPARAM)0, ref tileViewInfo);
5901
int displayIndex = (int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_SUBITEMHITTEST, (WPARAM)0, ref lvhi);
5943
int displayIndex = (int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_HITTEST, (WPARAM)0, ref lvhi);
6018
&& nmhdr->code ==
PInvoke
.NM_CUSTOMDRAW)
6025
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_NOTIFYITEMDRAW;
6034
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_DODEFAULT;
6040
if (nmhdr->code ==
PInvoke
.NM_CUSTOMDRAW &&
PInvoke
.UiaClientsAreListening())
6051
if (nmhdr->code ==
PInvoke
.NM_CUSTOMDRAW && OwnerDraw)
6061
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_NOTIFYITEMDRAW;
6068
Color foreColor =
PInvoke
.GetTextColor(nmcd->hdc);
6069
Color backColor =
PInvoke
.GetBkColor(nmcd->hdc);
6083
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_DODEFAULT;
6088
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_SKIPDEFAULT;
6100
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_DODEFAULT;
6104
if (nmhdr->code ==
PInvoke
.NM_RELEASEDCAPTURE && _listViewState[LISTVIEWSTATE_columnClicked])
6110
if (nmhdr->code ==
PInvoke
.HDN_BEGINTRACKW)
6132
if (nmhdr->code ==
PInvoke
.HDN_ITEMCHANGINGW)
6167
if ((nmhdr->code ==
PInvoke
.HDN_ITEMCHANGEDW) &&
6219
if (nmhdr->code ==
PInvoke
.HDN_ENDTRACKW)
6247
if (nmhdr->code ==
PInvoke
.HDN_ENDDRAG)
6314
if (nmhdr->code ==
PInvoke
.HDN_DIVIDERDBLCLICKW)
6386
HWND hwndHdr = (HWND)PInvokeCore.SendMessage(this,
PInvoke
.LVM_GETHEADER);
6394
return (int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_HITTEST, (WPARAM)0, ref lvhi);
6419
int groupID = (int)PInvokeCore.SendMessage(this,
PInvoke
.LVM_HITTEST, (WPARAM)(-1), ref lvhi);
6465
PInvokeCore.SendMessage(this,
PInvoke
.LVM_SETIMAGELIST, (WPARAM)
PInvoke
.LVSIL_STATE);
6477
case
PInvoke
.NM_CUSTOMDRAW:
6481
case
PInvoke
.LVN_BEGINLABELEDITW:
6510
_labelEdit.AssignHandle(PInvokeCore.SendMessage(this,
PInvoke
.LVM_GETEDITCONTROL));
6516
case
PInvoke
.LVN_COLUMNCLICK:
6524
case
PInvoke
.LVN_LINKCLICK:
6540
case
PInvoke
.LVN_ENDLABELEDITW:
6568
case
PInvoke
.LVN_ITEMACTIVATE:
6572
case
PInvoke
.LVN_BEGINDRAG:
6587
case
PInvoke
.LVN_BEGINRDRAG:
6602
case
PInvoke
.LVN_ITEMCHANGING:
6623
case
PInvoke
.LVN_ITEMCHANGED:
6715
case
PInvoke
.NM_CLICK:
6718
goto case
PInvoke
.NM_RCLICK;
6720
case
PInvoke
.NM_RCLICK:
6723
MouseButtons button = nmhdr->code ==
PInvoke
.NM_CLICK ? MouseButtons.Left : MouseButtons.Right;
6741
case
PInvoke
.NM_DBLCLK:
6744
goto case
PInvoke
.NM_RDBLCLK;
6746
case
PInvoke
.NM_RDBLCLK:
6761
case
PInvoke
.LVN_KEYDOWN:
6810
case
PInvoke
.LVN_ODCACHEHINT:
6817
if (nmhdr->code ==
PInvoke
.LVN_GETDISPINFOW)
6867
else if (nmhdr->code ==
PInvoke
.LVN_ODSTATECHANGED)
6883
else if (nmhdr->code ==
PInvoke
.LVN_GETINFOTIPW)
6896
PInvokeCore.SendMessage(nmhdr->hwndFrom,
PInvoke
.TTM_SETMAXTIPWIDTH, (WPARAM)0, (LPARAM)SystemInformation.MaxWindowTrackSize.Width);
6906
else if (nmhdr->code ==
PInvoke
.LVN_ODFINDITEMW)
6970
if (((nint)m.LParamInternal &
PInvoke
.PRF_NONCLIENT) != 0 && Application.RenderWithVisualStyles && BorderStyle == BorderStyle.Fixed3D)
System\Windows\Forms\Controls\ListView\ListView.ListViewNativeItemCollection.cs (7)
202
PInvokeCore.SendMessage(_owner,
PInvoke
.LVM_GETITEMW, (WPARAM)0, ref lvItem);
228
PInvoke
.LVM_GETNEXTITEM,
230
(LPARAM)
PInvoke
.LVNI_SELECTED);
247
PInvoke
.LVM_GETNEXTITEM,
248
(WPARAM)nextSelected, (LPARAM)
PInvoke
.LVNI_SELECTED);
261
PInvokeCore.SendMessage(_owner,
PInvoke
.LVM_DELETEALLITEMS);
421
if (PInvokeCore.SendMessage(_owner,
PInvoke
.LVM_DELETEITEM, (WPARAM)index) == 0)
System\Windows\Forms\Controls\ListView\ListView.SelectedIndexCollection.cs (5)
32
return (int)PInvokeCore.SendMessage(_owner,
PInvoke
.LVM_GETSELECTEDCOUNT);
60
PInvoke
.LVM_GETNEXTITEM,
62
(LPARAM)
PInvoke
.LVNI_SELECTED);
108
PInvoke
.LVM_GETNEXTITEM,
110
(LPARAM)
PInvoke
.LVNI_SELECTED);
System\Windows\Forms\Controls\ListView\ListView.SelectedListViewItemCollection.cs (6)
32
int cnt = (int)PInvokeCore.SendMessage(_owner,
PInvoke
.LVM_GETSELECTEDCOUNT);
42
PInvoke
.LVM_GETNEXTITEM,
44
(LPARAM)
PInvoke
.LVNI_SELECTED);
94
return (int)PInvokeCore.SendMessage(_owner,
PInvoke
.LVM_GETSELECTEDCOUNT);
131
PInvoke
.LVM_GETNEXTITEM,
133
(LPARAM)
PInvoke
.LVNI_SELECTED);
System\Windows\Forms\Controls\ListView\ListViewAlignment.cs (4)
14
Default = (int)
PInvoke
.LVA_DEFAULT,
19
Top = (int)
PInvoke
.LVA_ALIGNTOP,
24
Left = (int)
PInvoke
.LVA_ALIGNLEFT,
30
SnapToGrid = (int)
PInvoke
.LVA_SNAPTOGRID,
System\Windows\Forms\Controls\ListView\ListViewGroup.cs (2)
423
PInvoke
.LVM_GETGROUPSTATE,
439
PInvoke
.UiaDisconnectProvider(accessibleObject, skipOSCheck: true);
System\Windows\Forms\Controls\ListView\ListViewGroup.ListViewGroupAccessibleObject.cs (5)
50
?
PInvoke
.LVGGR_HEADER
51
:
PInvoke
.LVGGR_GROUP;
59
PInvokeCore.SendMessage(_owningListView,
PInvoke
.LVM_GETGROUPRECT, (WPARAM)nativeGroupId, ref groupRect);
167
PInvoke
.LVM_GETGROUPSTATE,
174
if (PInvokeCore.SendMessage(_owningListView,
PInvoke
.LVM_HASGROUP, (WPARAM)_owningGroup.ID) == 0)
System\Windows\Forms\Controls\ListView\ListViewInsertionMark.cs (8)
57
PInvokeCore.SendMessage(_listView,
PInvoke
.LVM_GETINSERTMARKRECT, (WPARAM)0, ref bounds);
71
_color = new COLORREF((uint)PInvokeCore.SendMessage(_listView,
PInvoke
.LVM_GETINSERTMARKCOLOR));
83
PInvokeCore.SendMessage(_listView,
PInvoke
.LVM_SETINSERTMARKCOLOR, 0, _color.ToWin32());
121
PInvokeCore.SendMessage(_listView,
PInvoke
.LVM_INSERTMARKHITTEST, (WPARAM)(&pt), ref lvInsertMark);
132
dwFlags = _appearsAfterItem ?
PInvoke
.LVIM_AFTER :
PInvoke
.LVIM_BEFORE,
136
PInvokeCore.SendMessage(_listView,
PInvoke
.LVM_SETINSERTMARK, 0, ref lvInsertMark);
140
PInvokeCore.SendMessage(_listView,
PInvoke
.LVM_SETINSERTMARKCOLOR, 0, _color.ToWin32());
System\Windows\Forms\Controls\ListView\ListViewItem.cs (6)
880
PInvokeCore.SendMessage(lv,
PInvoke
.LVM_EDITLABELW, (WPARAM)Index);
1026
PInvoke
.UiaDisconnectProvider(_accessibilityObject, skipOSCheck: true);
1099
nint result = PInvokeCore.SendMessage(_listView,
PInvoke
.LVM_ISGROUPVIEWENABLED);
1101
result = PInvokeCore.SendMessage(_listView,
PInvoke
.LVM_HASGROUP, (WPARAM)lvItem.iGroupId);
1107
PInvokeCore.SendMessage(_listView,
PInvoke
.LVM_SETITEMW, 0, ref lvItem);
1136
PInvokeCore.SendMessage(_listView,
PInvoke
.LVM_GETITEMW, 0, ref lvItem);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (1)
271
PInvoke
.InvalidateRect(_owningListView, lpRect: null, bErase: false);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (1)
191
PInvoke
.UiaDisconnectProvider(accessibleObject, skipOSCheck: true);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemWithImageAccessibleObject.cs (1)
110
PInvoke
.UiaDisconnectProvider(_imageAccessibleObject, skipOSCheck: true);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (1)
249
PInvoke
.UiaDisconnectProvider(_accessibilityObject);
System\Windows\Forms\Controls\ListView\View.cs (5)
14
LargeIcon = (int)
PInvoke
.LV_VIEW_ICON,
25
Details = (int)
PInvoke
.LV_VIEW_DETAILS,
30
SmallIcon = (int)
PInvoke
.LV_VIEW_SMALLICON,
37
List = (int)
PInvoke
.LV_VIEW_LIST,
42
Tile = (int)
PInvoke
.LV_VIEW_TILE,
System\Windows\Forms\Controls\Menus\MenuStrip.cs (2)
240
HWND ancestor =
PInvoke
.GetAncestor(this, GET_ANCESTOR_FLAGS.GA_ROOT);
241
PInvokeCore.PostMessage(ancestor, PInvokeCore.WM_SYSCOMMAND, (WPARAM)
PInvoke
.SC_KEYMENU, (LPARAM)(int)Keys.Space);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarAccessibleObject.cs (2)
44
PInvoke
.UiaDisconnectProvider(_calendarHeaderAccessibleObject, skipOSCheck: true);
48
PInvoke
.UiaDisconnectProvider(_calendarBodyAccessibleObject, skipOSCheck: true);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarBodyAccessibleObject.cs (1)
59
PInvoke
.UiaDisconnectProvider(row, skipOSCheck: true);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarButtonAccessibleObject.cs (2)
71
BOOL setOldCursorPos =
PInvoke
.GetPhysicalCursorPos(out Point previousPosition);
135
PInvoke
.SendInput(1, &mouseInput, Marshal.SizeOf(mouseInput));
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarRowAccessibleObject.cs (2)
96
PInvoke
.UiaDisconnectProvider(_weekNumberCellAccessibleObject, skipOSCheck: true);
106
PInvoke
.UiaDisconnectProvider(cell, skipOSCheck: true);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (45)
292
cp.ClassName =
PInvoke
.MONTHCAL_CLASS;
293
cp.Style |= (int)
PInvoke
.MCS_MULTISELECT | (int)
PInvoke
.MCS_DAYSTATE;
296
cp.Style |= (int)
PInvoke
.MCS_NOTODAY;
301
cp.Style |= (int)
PInvoke
.MCS_NOTODAYCIRCLE;
306
cp.Style |= (int)
PInvoke
.MCS_WEEKNUMBERS;
400
PInvokeCore.SendMessage(this,
PInvoke
.MCM_SETFIRSTDAYOFWEEK, 0, (nint)value);
490
if (PInvokeCore.SendMessage(this,
PInvoke
.MCM_SETMAXSELCOUNT, (WPARAM)value) == 0)
624
PInvokeCore.SendMessage(this,
PInvoke
.MCM_SETMONTHDELTA, (WPARAM)value);
804
if (PInvokeCore.SendMessage(this,
PInvoke
.MCM_GETMINREQRECT, 0, ref rect) == 0)
868
int result = (int)PInvokeCore.SendMessage(this,
PInvoke
.MCM_GETTODAY, 0, ref systemTime);
920
SetControlColor(
PInvoke
.MCSC_TITLEBK, value);
941
SetControlColor(
PInvoke
.MCSC_TITLETEXT, value);
962
SetControlColor(
PInvoke
.MCSC_TRAILINGTEXT, value);
1125
PInvoke
.InitCommonControlsEx(new INITCOMMONCONTROLSEX()
1149
return GetMonthRange(
PInvoke
.GMR_VISIBLE);
1152
return GetMonthRange(
PInvoke
.GMR_DAYSTATE);
1241
int maxTodayWidth = (int)PInvokeCore.SendMessage(this,
PInvoke
.MCM_GETMAXTODAYWIDTH);
1257
PInvokeCore.SendMessage(this,
PInvoke
.MCM_GETMONTHRANGE, (WPARAM)(int)flag, ref times[0]);
1305
PInvokeCore.SendMessage(this,
PInvoke
.MCM_HITTEST, 0, ref mchi);
1363
PInvokeCore.SendMessage(this,
PInvoke
.MCM_SETMAXSELCOUNT, (WPARAM)_maxSelectionCount);
1371
PInvokeCore.SendMessage(this,
PInvoke
.MCM_SETTODAY, (WPARAM)0, ref systemTime);
1374
SetControlColor(
PInvoke
.MCSC_TEXT, ForeColor);
1375
SetControlColor(
PInvoke
.MCSC_MONTHBK, BackColor);
1376
SetControlColor(
PInvoke
.MCSC_TITLEBK, _titleBackColor);
1377
SetControlColor(
PInvoke
.MCSC_TITLETEXT, _titleForeColor);
1378
SetControlColor(
PInvoke
.MCSC_TRAILINGTEXT, _trailingForeColor);
1383
firstDay = (int)
PInvoke
.LCTYPE.IFIRSTDAYOFWEEK;
1390
PInvokeCore.SendMessage(this,
PInvoke
.MCM_SETFIRSTDAYOFWEEK, (WPARAM)0, (LPARAM)firstDay);
1395
PInvokeCore.SendMessage(this,
PInvoke
.MCM_SETMONTHDELTA, (WPARAM)_scrollChange);
1452
SetControlColor(
PInvoke
.MCSC_TEXT, ForeColor);
1458
SetControlColor(
PInvoke
.MCSC_MONTHBK, BackColor);
1692
PInvokeCore.SendMessage(this,
PInvoke
.MCM_SETCOLOR, (WPARAM)(int)colorIndex, (LPARAM)value);
1743
uint flags =
PInvoke
.GDTR_MIN |
PInvoke
.GDTR_MAX;
1744
if (PInvokeCore.SendMessage(this,
PInvoke
.MCM_SETRANGE, (WPARAM)flags, ref times[0]) == 0)
1827
PInvokeCore.SendMessage(HWND,
PInvoke
.MCM_SETDAYSTATE, (WPARAM)monthsCount, (LPARAM)arr);
1889
PInvokeCore.SendMessage(this,
PInvoke
.MCM_SETSELRANGE, 0, ref times[0]);
2007
PInvokeCore.SendMessage(this,
PInvoke
.MCM_SETTODAY, 0, ref systemTime);
2011
PInvokeCore.SendMessage(this,
PInvoke
.MCM_SETTODAY, 0, 0);
2161
m.ResultInternal = (LRESULT)(nint)
PInvoke
.DLGC_WANTARROWS;
2175
case
PInvoke
.MCN_SELECT:
2178
case
PInvoke
.MCN_SELCHANGE:
2181
case
PInvoke
.MCN_GETDAYSTATE:
2185
case
PInvoke
.MCN_VIEWCHANGE:
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (11)
82
PInvoke
.UiaDisconnectProvider(_previousButtonAccessibleObject, skipOSCheck: true);
85
PInvoke
.UiaDisconnectProvider(_nextButtonAccessibleObject, skipOSCheck: true);
88
PInvoke
.UiaDisconnectProvider(_todayLinkAccessibleObject, skipOSCheck: true);
91
PInvoke
.UiaDisconnectProvider(_focusedCellAccessibleObject, skipOSCheck: true);
102
PInvoke
.UiaDisconnectProvider(calendarAccessibleObject, skipOSCheck: true);
252
bool success = PInvokeCore.SendMessage(owner,
PInvoke
.MCM_GETCALENDARGRIDINFO, 0, ref gridInfo) != 0;
274
bool success = PInvokeCore.SendMessage(owner,
PInvoke
.MCM_GETCALENDARGRIDINFO, 0, ref gridInfo) != 0;
302
PInvokeCore.SendMessage(owner,
PInvoke
.MCM_GETCALENDARGRIDINFO, 0, ref gridInfo);
401
PInvokeCore.SendMessage(owner,
PInvoke
.MCM_HITTEST, 0, ref hitTestInfo);
518
PInvoke
.UiaDisconnectProvider(calendar, skipOSCheck: true);
521
PInvoke
.UiaDisconnectProvider(_focusedCellAccessibleObject, skipOSCheck: true);
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (20)
53
cp.ClassName =
PInvoke
.PROGRESS_CLASS;
56
cp.Style |= (int)
PInvoke
.PBS_SMOOTH;
60
cp.Style |= (int)
PInvoke
.PBS_MARQUEE;
87
PInvoke
.SetWindowTheme(HWND, " ", " ");
255
PInvokeCore.SendMessage(this,
PInvoke
.PBM_SETMARQUEE, (WPARAM)(BOOL)false, (LPARAM)_marqueeAnimationSpeed);
259
PInvokeCore.SendMessage(this,
PInvoke
.PBM_SETMARQUEE, (WPARAM)(BOOL)true, (LPARAM)_marqueeAnimationSpeed);
295
PInvokeCore.SendMessage(this,
PInvoke
.PBM_SETRANGE32, (WPARAM)_minimum, (LPARAM)_maximum);
333
PInvokeCore.SendMessage(this,
PInvoke
.PBM_SETRANGE32, (WPARAM)_minimum, (LPARAM)_maximum);
345
PInvokeCore.SendMessage(this,
PInvoke
.PBM_SETBKCOLOR, 0, BackColor.ToWin32());
354
PInvokeCore.SendMessage(this,
PInvoke
.PBM_SETBARCOLOR, 0, ForeColor.ToWin32());
423
PInvokeCore.SendMessage(this,
PInvoke
.PBM_SETSTEP, (WPARAM)_step);
556
PInvoke
.InitCommonControlsEx(new INITCOMMONCONTROLSEX()
601
PInvokeCore.SendMessage(this,
PInvoke
.PBM_SETRANGE32, (WPARAM)_minimum, (LPARAM)_maximum);
602
PInvokeCore.SendMessage(this,
PInvoke
.PBM_SETSTEP, (WPARAM)_step);
603
PInvokeCore.SendMessage(this,
PInvoke
.PBM_SETPOS, (WPARAM)_value);
604
PInvokeCore.SendMessage(this,
PInvoke
.PBM_SETBKCOLOR, (WPARAM)0, (LPARAM)BackColor);
605
PInvokeCore.SendMessage(this,
PInvoke
.PBM_SETBARCOLOR, (WPARAM)0, (LPARAM)ForeColor);
685
PInvokeCore.SendMessage(this,
PInvoke
.PBM_SETPOS, (WPARAM)_value);
699
PInvokeCore.SendMessage(this,
PInvoke
.PBM_SETBARCOLOR, 0, ForeColor.ToWin32());
700
PInvokeCore.SendMessage(this,
PInvoke
.PBM_SETBKCOLOR, 0, BackColor.ToWin32());
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (2)
3338
HWND hWndParent =
PInvoke
.GetParent(this);
3341
PInvoke
.SetFocus(hWndParent);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1037
PInvoke
.UiaDisconnectProvider(_accessibleObject);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridToolTip.cs (12)
64
info.SendMessage(this,
PInvoke
.TTM_UPDATETIPTEXTW);
79
PInvoke
.InitCommonControlsEx(new INITCOMMONCONTROLSEX
88
ClassName =
PInvoke
.TOOLTIPS_CLASS,
89
Style = (int)(
PInvoke
.TTS_ALWAYSTIP |
PInvoke
.TTS_NOPREFIX),
105
GetTOOLINFO((Control)sender).SendMessage(this,
PInvoke
.TTM_DELTOOLW);
125
PInvoke
.SetWindowPos(
132
if (info.SendMessage(this,
PInvoke
.TTM_ADDTOOLW) == 0)
140
PInvoke
.TTM_SETMAXTIPWIDTH,
158
info.SendMessage(this,
PInvoke
.TTM_UPDATETIPTEXTW);
162
PInvokeCore.SendMessage(this,
PInvoke
.TTM_UPDATE);
182
msg.ResultInternal = (LRESULT)
PInvoke
.HTTRANSPARENT;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (23)
603
PInvoke
.ClientToScreen(this, ref pt);
827
gotFocus = !
PInvoke
.SetFocus(this).IsNull;
1455
PInvoke
.ShowWindow(_dropDownHolder, SHOW_WINDOW_CMD.SW_SHOWNA);
2539
for (HWND hwnd = PInvokeCore.GetForegroundWindow(); !hwnd.IsNull; hwnd =
PInvoke
.GetParent(hwnd))
3091
if (
PInvoke
.IsChild(PInvokeCore.GetForegroundWindow(), this))
3144
Debug.Assert(_cumulativeVerticalWheelDelta > -
PInvoke
.WHEEL_DELTA, "cumulativeVerticalWheelDelta is too small");
3145
Debug.Assert(_cumulativeVerticalWheelDelta <
PInvoke
.WHEEL_DELTA, "cumulativeVerticalWheelDelta is too big");
3179
float partialNotches = _cumulativeVerticalWheelDelta / (float)
PInvoke
.WHEEL_DELTA;
3196
_cumulativeVerticalWheelDelta -= fullNotches * (int)
PInvoke
.WHEEL_DELTA;
3234
_cumulativeVerticalWheelDelta -= (int)(scrollBands * (
PInvoke
.WHEEL_DELTA / (float)wheelScrollLines));
3245
_cumulativeVerticalWheelDelta -= (int)(scrollBands * (
PInvoke
.WHEEL_DELTA / (float)wheelScrollLines));
3722
PInvoke
.GetTextExtentPoint32W(hdc.HDC, value, value.Length, textSize);
3727
PInvoke
.GetTextMetrics(hdc, &tm);
3798
PInvokeCore.SendMessage(toolTip,
PInvoke
.TTM_ADJUSTRECT, (WPARAM)1, ref rect);
3848
Control? focusedControl = FromHandle(
PInvoke
.GetFocus());
3855
focusedControl = FromHandle(
PInvoke
.GetFocus());
4880
HWND priorFocus =
PInvoke
.GetFocus();
4894
PInvoke
.SetFocus(priorFocus);
5251
case
PInvoke
.TTN_POP:
5253
case
PInvoke
.TTN_SHOW:
5337
uint flags =
PInvoke
.DLGC_WANTCHARS |
PInvoke
.DLGC_WANTARROWS;
5346
flags |=
PInvoke
.DLGC_WANTTAB;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (2)
167
PInvoke
.MsgWaitForMultipleObjectsEx(
668
if (Visible && m.WParamInternal.LOWORD ==
PInvoke
.WA_INACTIVE && !OwnsWindow(activatedWindow))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewTextBox.cs (5)
298
case
PInvoke
.TTN_SHOW:
356
m.ResultInternal = (LRESULT)(m.ResultInternal | (nint)(
PInvoke
.DLGC_WANTARROWS |
PInvoke
.DLGC_WANTCHARS));
359
m.ResultInternal = (LRESULT)(m.ResultInternal | (nint)(
PInvoke
.DLGC_WANTALLKEYS |
PInvoke
.DLGC_WANTTAB));
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.MouseHook.cs (4)
95
_mouseHookHandle =
PInvoke
.SetWindowsHookEx(
110
if (nCode ==
PInvoke
.HC_ACTION)
134
return
PInvoke
.CallNextHookEx(_mouseHookHandle, nCode, wparam, lparam);
146
PInvoke
.UnhookWindowsHookEx(_mouseHookHandle);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.PropertyGridViewAccessibleObject.cs (1)
432
PInvoke
.ScreenToClient(owner, ref point);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (78)
172
(WPARAM)(int)(value ?
PInvoke
.ECOOP_OR :
PInvoke
.ECOOP_XOR),
173
(LPARAM)(int)
PInvoke
.ECO_AUTOWORDSELECTION);
259
s_moduleHandle =
PInvoke
.LoadLibraryFromSystemPathIfAvailable(Libraries.RichEdit41);
271
string path =
PInvoke
.GetModuleFileNameLongPath(new HINSTANCE(s_moduleHandle));
286
cp.ClassName =
PInvoke
.MSFTEDIT_CLASS;
296
cp.Style |= (int)
PInvoke
.ES_DISABLENOSCROLL;
305
cp.Style |= (int)
PInvoke
.ES_DISABLENOSCROLL;
597
return StreamOut(
PInvoke
.SF_RTF);
602
return StreamOut(
PInvoke
.SF_RTF);
620
StreamIn(value,
PInvoke
.SF_RTF);
829
PInvokeCore.SendMessage(this, PInvokeCore.EM_SETCHARFORMAT,
PInvoke
.SCF_SELECTION, ref cf);
865
PInvokeCore.SendMessage(this, PInvokeCore.EM_SETCHARFORMAT, (WPARAM)
PInvoke
.SCF_SELECTION, ref cf);
924
PInvokeCore.SendMessage(this, PInvokeCore.EM_SETCHARFORMAT, (WPARAM)
PInvoke
.SCF_SELECTION, ref cf2);
1102
return StreamOut(
PInvoke
.SFF_SELECTION |
PInvoke
.SF_RTF);
1109
StreamIn(value,
PInvoke
.SFF_SELECTION |
PInvoke
.SF_RTF);
1200
if (value is not null && value.Length >
PInvoke
.MAX_TAB_STOPS)
1247
StreamIn(value,
PInvoke
.SFF_SELECTION |
PInvoke
.SF_TEXT |
PInvoke
.SF_UNICODE);
1296
(WPARAM)(int)(value ?
PInvoke
.ECOOP_OR :
PInvoke
.ECOOP_XOR),
1297
(LPARAM)(int)
PInvoke
.ECO_SELECTIONBAR);
1358
StreamIn(value,
PInvoke
.SF_TEXT |
PInvoke
.SF_UNICODE);
2125
return SetCharFormat(
PInvoke
.SCF_ALL, cf);
2135
PInvokeCore.SendMessage(this, PInvokeCore.EM_GETCHARFORMAT, (WPARAM)(fSelection ?
PInvoke
.SCF_SELECTION :
PInvoke
.SCF_DEFAULT), ref cf);
2329
flags =
PInvoke
.SF_RTF;
2333
flags =
PInvoke
.SF_TEXT;
2336
flags =
PInvoke
.SF_UNICODE |
PInvoke
.SF_TEXT;
2433
(nint)(
PInvoke
.ENM_PROTECTED |
PInvoke
.ENM_SELCHANGE |
2434
PInvoke
.ENM_DROPFILES |
PInvoke
.ENM_REQUESTRESIZE |
2435
PInvoke
.ENM_IMECHANGE |
PInvoke
.ENM_CHANGE |
2436
PInvoke
.ENM_UPDATE |
PInvoke
.ENM_SCROLL |
2437
PInvoke
.ENM_KEYEVENTS |
PInvoke
.ENM_MOUSEEVENTS |
2438
PInvoke
.ENM_SCROLLEVENTS |
PInvoke
.ENM_LINK));
2499
(WPARAM)(int)
PInvoke
.ECOOP_OR,
2500
(LPARAM)(int)
PInvoke
.ECO_SELECTIONBAR);
2649
RichTextBoxStreamType.RichText =>
PInvoke
.SF_RTF,
2650
RichTextBoxStreamType.PlainText =>
PInvoke
.SF_TEXT,
2651
RichTextBoxStreamType.UnicodePlainText =>
PInvoke
.SF_UNICODE |
PInvoke
.SF_TEXT,
2652
RichTextBoxStreamType.RichNoOleObjs =>
PInvoke
.SF_RTFNOOBJS,
2653
RichTextBoxStreamType.TextTextOleObjs =>
PInvoke
.SF_TEXTIZED,
2717
return PInvokeCore.SendMessage(this, PInvokeCore.EM_SETCHARFORMAT, (WPARAM)
PInvoke
.SCF_SELECTION, ref cf) != 0;
2772
(WPARAM)(selectionOnly ?
PInvoke
.SCF_SELECTION :
PInvoke
.SCF_ALL),
2802
if ((
PInvoke
.SFF_SELECTION & flags) != 0)
2824
if ((flags &
PInvoke
.SF_UNICODE) != 0)
2843
if ((flags &
PInvoke
.SFF_SELECTION) == 0)
2857
if ((flags &
PInvoke
.SF_RTF) != 0)
2890
if ((flags &
PInvoke
.SF_UNICODE) != 0)
2899
if ((flags &
PInvoke
.SF_RTF) != 0)
2961
if ((flags &
PInvoke
.SF_UNICODE) != 0)
2994
cookieVal = (flags &
PInvoke
.SF_UNICODE) != 0 ? OUTPUT | UNICODE : OUTPUT | ANSI;
2996
if ((flags &
PInvoke
.SF_RTF) != 0)
3234
case
PInvoke
.EN_HSCROLL:
3237
case
PInvoke
.EN_VSCROLL:
3262
case
PInvoke
.EN_LINK:
3265
case
PInvoke
.EN_DROPFILES:
3302
case
PInvoke
.EN_REQUESTRESIZE:
3316
case
PInvoke
.EN_SELCHANGE:
3321
case
PInvoke
.EN_PROTECTED:
3347
if ((unchecked((uint)(long)enprotected.wParam) &
PInvoke
.SFF_SELECTION) != 0)
3364
PInvoke
.MessageBeep(MESSAGEBOX_STYLE.MB_OK);
3404
if (compMode !=
PInvoke
.ICM_NOTOPEN)
3489
m.ResultInternal = (LRESULT)(AcceptsTab ? m.ResultInternal | (nint)
PInvoke
.DLGC_WANTTAB : m.ResultInternal & ~(nint)
PInvoke
.DLGC_WANTTAB);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (2)
39
HRESULT hr =
PInvoke
.CreateILockBytesOnHGlobal(default, fDeleteOnRelease: true, pLockBytes);
45
hr =
PInvoke
.StgCreateDocfileOnILockBytes(
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
703
PInvoke
.PatBlt(dc, r.X, r.Y, r.Width, r.Height, ROP_CODE.PATINVERT);
System\Windows\Forms\Controls\TabControl\TabControl.cs (43)
64
private readonly MessageId _tabBaseReLayoutMessage =
PInvoke
.RegisterWindowMessage($"{Application.WindowMessagesVersion}{TabBaseReLayoutMessageName}");
279
cp.ClassName =
PInvoke
.WC_TABCONTROL;
285
cp.Style |= (int)
PInvoke
.TCS_MULTILINE;
290
cp.Style |= (int)
PInvoke
.TCS_OWNERDRAWFIXED;
295
cp.Style |= (int)
PInvoke
.TCS_TOOLTIPS;
301
cp.Style |= (int)
PInvoke
.TCS_BOTTOM;
307
cp.Style |= (int)
PInvoke
.TCS_VERTICAL | (int)
PInvoke
.TCS_MULTILINE;
312
cp.Style |= (int)
PInvoke
.TCS_HOTTRACK;
317
cp.Style |= (int)
PInvoke
.TCS_TABS;
321
cp.Style |= (int)
PInvoke
.TCS_BUTTONS;
324
cp.Style |= (int)
PInvoke
.TCS_FLATBUTTONS;
331
cp.Style |= (int)
PInvoke
.TCS_RAGGEDRIGHT;
334
cp.Style |= (int)
PInvoke
.TCS_RIGHTJUSTIFY;
337
cp.Style |= (int)
PInvoke
.TCS_FIXEDWIDTH;
386
PInvokeCore.SendMessage(this,
PInvoke
.TCM_ADJUSTRECT, 0, ref rect);
480
PInvokeCore.SendMessage(this,
PInvoke
.TCM_SETIMAGELIST, 0, handle);
650
=> (int)PInvokeCore.SendMessage(this,
PInvoke
.TCM_GETROWCOUNT);
664
get => IsHandleCreated ? (int)PInvokeCore.SendMessage(this,
PInvoke
.TCM_GETCURSEL) : _selectedIndex;
692
PInvokeCore.SendMessage(this,
PInvoke
.TCM_SETCURSEL, (WPARAM)value);
935
int index = SendMessage(
PInvoke
.TCM_INSERTITEMW, TabCount + 1, tabPage);
944
PInvokeCore.SendMessage(this,
PInvoke
.TCM_SETITEMSIZE, 0, PARAM.FromLowHigh(_itemSize.Width, _itemSize.Height));
967
PInvoke
.InitCommonControlsEx(new INITCOMMONCONTROLSEX()
1127
PInvokeCore.SendMessage(this,
PInvoke
.TCM_GETITEMRECT, (WPARAM)index, ref rect);
1147
PInvokeCore.SendMessage(this,
PInvoke
.TCM_SETIMAGELIST, 0, ImageList!.Handle);
1172
index = IsHandleCreated ? SendMessage(
PInvoke
.TCM_INSERTITEMW, index, tabPage) : index;
1246
PInvokeCore.SendMessage(this,
PInvoke
.TCM_SETPADDING, 0, PARAM.FromPoint(_padding));
1255
PInvokeCore.SendMessage(this,
PInvoke
.TCM_SETIMAGELIST, 0, _imageList.Handle);
1260
HWND tooltipHwnd = (HWND)PInvokeCore.SendMessage(this,
PInvoke
.TCM_GETTOOLTIPS);
1263
PInvoke
.SetWindowPos(
1307
PInvoke
.SetWindowTheme(HWND, null, $"{DarkModeIdentifier}::{BannerContainerThemeIdentifier}");
1565
PInvokeCore.SendMessage(this,
PInvoke
.TCM_DELETEALLITEMS);
1600
PInvokeCore.SendMessage(this, (
PInvoke
.TCM_DELETEALLITEMS));
1618
PInvokeCore.SendMessage(this,
PInvoke
.TCM_DELETEITEM, (WPARAM)index);
1654
PInvokeCore.SendMessage(this,
PInvoke
.TCM_SETTOOLTIPS, (WPARAM)toolTip.Handle);
1667
SendMessage(
PInvoke
.TCM_SETITEMW, index, value);
1673
PInvokeCore.SendMessage(this,
PInvoke
.TCM_SETCURSEL, (WPARAM)index);
1798
PInvoke
.SetWindowTheme(handle, $"{DarkModeIdentifier}_{ExplorerThemeIdentifier}", null)
2002
PInvokeCore.SendMessage(this,
PInvoke
.TCM_SETCURSEL, (WPARAM)_lastSelection);
2087
case
PInvoke
.TCN_SELCHANGING:
2107
case
PInvoke
.TCN_SELCHANGE:
2120
case
PInvoke
.TTN_GETDISPINFOW:
2122
PInvokeCore.SendMessage(nmhdr->hwndFrom,
PInvoke
.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
System\Windows\Forms\Controls\TabControl\TabPage.cs (1)
655
PInvoke
.UiaDisconnectProvider(_tabAccessibilityObject);
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (8)
317
cp.Style |=
PInvoke
.ES_LEFT;
320
cp.Style |=
PInvoke
.ES_CENTER;
323
cp.Style |=
PInvoke
.ES_RIGHT;
1071
HIMC inputContext =
PInvoke
.ImmGetContext(this);
1077
PInvoke
.ImmNotifyIME(inputContext, NOTIFY_IME_ACTION.NI_COMPOSITIONSTR, action, 0);
1081
PInvoke
.ImmReleaseContext(this, inputContext);
1794
PInvoke
.RedrawWindow(this, lprcUpdate: null, HRGN.Null, REDRAW_WINDOW_FLAGS.RDW_INVALIDATE | REDRAW_WINDOW_FLAGS.RDW_FRAME);
2886
if (((nint)m.LParamInternal &
PInvoke
.PRF_NONCLIENT) != 0
System\Windows\Forms\Controls\TextBox\TextBox.cs (13)
278
cp.Style |=
PInvoke
.ES_LOWERCASE;
281
cp.Style |=
PInvoke
.ES_UPPERCASE;
294
cp.Style |=
PInvoke
.ES_LEFT;
297
cp.Style |=
PInvoke
.ES_CENTER;
300
cp.Style |=
PInvoke
.ES_RIGHT;
322
cp.Style |=
PInvoke
.ES_PASSWORD;
562
PInvoke
.RedrawWindow(this, lprcUpdate: null, HRGN.Null, REDRAW_WINDOW_FLAGS.RDW_INVALIDATE | REDRAW_WINDOW_FLAGS.RDW_FRAME);
793
PInvoke
.SHAutoComplete(this, (SHELL_AUTOCOMPLETE_FLAGS)AutoCompleteSource | mode);
810
PInvoke
.SHAutoComplete(this, (SHELL_AUTOCOMPLETE_FLAGS)AutoCompleteSource.AllSystemSources | SHELL_AUTOCOMPLETE_FLAGS.SHACF_AUTOSUGGEST_FORCE_OFF | SHELL_AUTOCOMPLETE_FLAGS.SHACF_AUTOAPPEND_FORCE_OFF);
822
if (((nint)m.LParamInternal &
PInvoke
.PRF_NONCLIENT) != 0 && Application.RenderWithVisualStyles
946
PInvoke
.InvalidateRect(this, lpRect: null, bErase: true);
955
PInvoke
.InvalidateRect(this, lpRect: null, bErase: true);
961
PInvoke
.ValidateRect(this, lpRect: null);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (17)
411
cp.ClassName =
PInvoke
.WC_EDIT;
412
cp.Style |=
PInvoke
.ES_AUTOHSCROLL |
PInvoke
.ES_AUTOVSCROLL;
415
cp.Style |=
PInvoke
.ES_NOHIDESEL;
420
cp.Style |=
PInvoke
.ES_READONLY;
438
cp.Style |=
PInvoke
.ES_MULTILINE;
441
cp.Style &= ~
PInvoke
.ES_AUTOHSCROLL;
1146
PInvoke
.SetWindowText(this, value);
1489
if (!ValidationCancelled &&
PInvoke
.WindowFromPoint(PointToScreen(mevent.Location)) == HWND)
1542
if (
PInvoke
.UiaClientsAreListening())
2021
if (hiword ==
PInvoke
.EN_CHANGE && CanRaiseTextChangedEvent)
2025
else if (hiword ==
PInvoke
.EN_UPDATE)
2038
PInvokeCore.SendMessage(this, PInvokeCore.EM_SETMARGINS, (WPARAM)(
PInvoke
.EC_LEFTMARGIN |
PInvoke
.EC_RIGHTMARGIN));
2046
? (LRESULT)(m.ResultInternal | (int)
PInvoke
.DLGC_WANTTAB)
2047
: (LRESULT)(m.ResultInternal & ~(int)(
PInvoke
.DLGC_WANTTAB |
PInvoke
.DLGC_WANTALLKEYS));
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (2)
229
return ((int)GetWindowStyle(Owner) &
PInvoke
.ES_AUTOHSCROLL) != 0;
466
return
PInvoke
.GetTextExtentPoint32W(hdc, &item, 1, (SIZE*)pSize);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (6)
163
HWND rootHwnd =
PInvoke
.GetAncestor(this, GET_ANCESTOR_FLAGS.GA_ROOT);
166
return !
PInvoke
.IsZoomed(rootHwnd);
572
HWND rootHwnd =
PInvoke
.GetAncestor(this, GET_ANCESTOR_FLAGS.GA_ROOT);
576
if (!rootHwnd.IsNull && !
PInvoke
.IsZoomed(rootHwnd))
596
m.ResultInternal = (LRESULT)(nint)
PInvoke
.HTBOTTOMRIGHT;
632
m.ResultInternal = (LRESULT)(nint)
PInvoke
.HTBOTTOMLEFT;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (17)
1752
SnapFocus(
PInvoke
.GetFocus());
2660
(LPARAM)(uint)(
PInvoke
.PRF_CHILDREN |
PInvoke
.PRF_CLIENT |
PInvoke
.PRF_ERASEBKGND |
PInvoke
.PRF_NONCLIENT));
4021
PInvoke
.SetFocus(default);
4430
if ((Handle != otherHwnd) && !
PInvoke
.IsChild(this, otherHwnd))
4434
HWND thisHwndRoot =
PInvoke
.GetAncestor(this, GET_ANCESTOR_FLAGS.GA_ROOT);
4435
HWND otherHwndRoot =
PInvoke
.GetAncestor(otherHwnd, GET_ANCESTOR_FLAGS.GA_ROOT);
4598
HWND hwndClicked =
PInvoke
.ChildWindowFromPointEx(
4608
m.ResultInternal = (LRESULT)(nint)
PInvoke
.MA_NOACTIVATE;
4613
HWND rootHwnd =
PInvoke
.GetAncestor(this, GET_ANCESTOR_FLAGS.GA_ROOT);
4617
HWND hwndActive =
PInvoke
.GetActiveWindow();
4622
m.ResultInternal = (LRESULT)(nint)
PInvoke
.MA_ACTIVATEANDEAT;
4632
SnapFocus(
PInvoke
.GetFocus());
4642
if (AllowClickThrough && m.MsgInternal == PInvokeCore.WM_MOUSEACTIVATE && m.ResultInternal ==
PInvoke
.MA_ACTIVATEANDEAT)
4644
m.ResultInternal = (LRESULT)(nint)
PInvoke
.MA_ACTIVATE;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.RestoreFocusMessageFilter.cs (3)
37
if (!
PInvoke
.IsChild(_ownerToolStrip, m.HWND))
39
HWND rootHwnd =
PInvoke
.GetAncestor(_ownerToolStrip, GET_ANCESTOR_FLAGS.GA_ROOT);
40
if (rootHwnd == m.HWND ||
PInvoke
.IsChild(rootHwnd, m.HWND))
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (6)
891
PInvoke
.SetWindowPos(
1620
else if (IsHandleCreated &&
PInvoke
.IsWindowEnabled(this))
1622
PInvoke
.SetWindowPos(
1797
if (!
PInvoke
.SetLayeredWindowAttributes(this, (COLORREF)0, OpacityAsByte, LAYERED_WINDOW_ATTRIBUTES_FLAGS.LWA_ALPHA))
1904
if ((nint)m.WParamInternal ==
PInvoke
.WA_ACTIVE)
1985
PInvoke
.RedrawWindow(
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (4)
214
int count =
PInvoke
.GetMenuItemCount(hmenu);
229
PInvoke
.GetMenuItemInfo(hmenu, i, fByPosition: true, ref info);
245
PInvoke
.GetMenuItemInfo(hmenu, i, fByPosition: true, ref info);
257
PInvoke
.GetMenuItemInfo(hmenu, i, fByPosition: true, ref info);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
2469
if (
PInvoke
.GetKeyState((int)Keys.LButton) < 0)
3092
PInvoke
.UiaDisconnectProvider(accessibleObject, skipOSCheck: true);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemAccessibleObject.cs (3)
8
using PInvoke = Windows.Win32.
PInvoke
;
91
/// First item should be <see cref="
PInvoke
.UiaAppendRuntimeId" /> since this is not a top-level
100
(int)
PInvoke
.UiaAppendRuntimeId,
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (7)
261
=>
PInvoke
.GetAncestor(control1, GET_ANCESTOR_FLAGS.GA_ROOT) ==
PInvoke
.GetAncestor(control2, GET_ANCESTOR_FLAGS.GA_ROOT);
831
HWND rootWindowOfToolStrip =
PInvoke
.GetAncestor(topMostToolStrip, GET_ANCESTOR_FLAGS.GA_ROOT);
832
HWND rootWindowOfControl =
PInvoke
.GetAncestor(activeControl, GET_ANCESTOR_FLAGS.GA_ROOT);
891
HMENU hMenu =
PInvoke
.GetMenu(toplevelControl);
921
if (
PInvoke
.GetKeyState((int)Keys.ShiftKey) < 0 && (keyData == Keys.None))
932
HWND topmostParentOfMenu =
PInvoke
.GetAncestor(menuStripToActivate, GET_ANCESTOR_FLAGS.GA_ROOT);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (8)
138
HWND hwndActive =
PInvoke
.GetActiveWindow();
210
PInvoke
.ShowCaret(HWND.Null);
411
HWND hwndActive =
PInvoke
.GetActiveWindow();
470
PInvoke
.HideCaret(HWND.Null);
497
=> hwndParent.Handle == hwndChild.Handle ||
PInvoke
.IsChild(hwndParent, hwndChild);
537
var activeWindowHandle = Control.GetHandleRef(
PInvoke
.GetActiveWindow());
655
DPI_AWARENESS_CONTEXT awarenessContext =
PInvoke
.GetWindowDpiAwarenessContext(hwnd);
656
DPI_AWARENESS awareness =
PInvoke
.GetAwarenessFromDpiAwarenessContext(awarenessContext);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.HostedWindowsFormsMessageHook.cs (4)
66
_messageHookHandle =
PInvoke
.SetWindowsHookEx(
83
if (nCode ==
PInvoke
.HC_ACTION && _isHooked
98
return
PInvoke
.CallNextHookEx(_messageHookHandle, nCode, wparam, lparam);
107
PInvoke
.UnhookWindowsHookEx(_messageHookHandle);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (4)
598
PInvoke
.GetMenuItemInfo(_nativeMenuHandle, (uint)_nativeMenuCommandID, fByPosition: false, ref info);
621
PInvoke
.GetMenuItemInfo(_nativeMenuHandle, (uint)_nativeMenuCommandID, fByPosition: false, ref info);
633
PInvoke
.GetMenuItemInfo(_nativeMenuHandle, (uint)_nativeMenuCommandID, fByPosition: false, ref info);
670
PInvoke
.GetMenuItemInfo(_nativeMenuHandle, (uint)_nativeMenuCommandID, fByPosition: false, ref info);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.FeedbackDropDown.cs (2)
59
PInvoke
.UpdateWindow(msg.hwnd);
105
m.ResultInternal = (LRESULT)
PInvoke
.HTTRANSPARENT;
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (1)
128
PInvoke
.RedrawWindow(
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (35)
155
cp.ClassName =
PInvoke
.TRACKBAR_CLASS;
159
cp.Style |= (int)
PInvoke
.TBS_NOTICKS;
162
cp.Style |= (int)(
PInvoke
.TBS_TOP);
166
cp.Style |= (int)(
PInvoke
.TBS_BOTTOM);
170
cp.Style |= (int)(
PInvoke
.TBS_BOTH);
177
cp.Style |= (int)
PInvoke
.TBS_VERT;
194
cp.Style |= (int)
PInvoke
.TBS_AUTOTICKS;
295
PInvokeCore.SendMessage(this,
PInvoke
.TBM_SETPAGESIZE, 0, value);
440
PInvokeCore.SendMessage(this,
PInvoke
.TBM_SETRANGEMAX, (WPARAM)(BOOL)true, (LPARAM)_maximum);
498
PInvokeCore.SendMessage(this,
PInvoke
.TBM_SETLINESIZE, 0, value);
582
PInvokeCore.SendMessage(this,
PInvoke
.TBM_SETTICFREQ, (WPARAM)value);
759
PInvoke
.InitCommonControlsEx(new INITCOMMONCONTROLSEX
797
PInvokeCore.SendMessage(this,
PInvoke
.TBM_CLEARTICS, (WPARAM)1, (LPARAM)0);
800
LRESULT lresult = PInvokeCore.SendMessage(this,
PInvoke
.TBM_SETTIC, lParam: (IntPtr)i);
864
PInvokeCore.SendMessage(this,
PInvoke
.TBM_SETRANGEMIN, (WPARAM)(BOOL)false, (LPARAM)_minimum);
865
PInvokeCore.SendMessage(this,
PInvoke
.TBM_SETRANGEMAX, (WPARAM)(BOOL)false, (LPARAM)_maximum);
868
PInvokeCore.SendMessage(this,
PInvoke
.TBM_SETTICFREQ, (WPARAM)_tickFrequency);
875
PInvokeCore.SendMessage(this,
PInvoke
.TBM_SETPAGESIZE, (WPARAM)0, (LPARAM)_largeChange);
876
PInvokeCore.SendMessage(this,
PInvoke
.TBM_SETLINESIZE, (WPARAM)0, (LPARAM)_smallChange);
938
Debug.Assert(_cumulativeWheelData > -
PInvoke
.WHEEL_DELTA, "cumulativeWheelData is too small");
939
Debug.Assert(_cumulativeWheelData <
PInvoke
.WHEEL_DELTA, "cumulativeWheelData is too big");
943
partialNotches = _cumulativeWheelData / (float)
PInvoke
.WHEEL_DELTA;
960
_cumulativeWheelData -= (int)(scrollBands * (
PInvoke
.WHEEL_DELTA / (float)wheelScrollLines));
966
_cumulativeWheelData -= (int)(scrollBands * (
PInvoke
.WHEEL_DELTA / (float)wheelScrollLines));
1063
PInvokeCore.SendMessage(this,
PInvoke
.TBM_SETRANGEMIN, (WPARAM)(BOOL)false, (LPARAM)_minimum);
1064
PInvokeCore.SendMessage(this,
PInvoke
.TBM_SETRANGEMAX, (WPARAM)(BOOL)true, (LPARAM)_maximum);
1122
PInvokeCore.SendMessage(this,
PInvoke
.TBM_SETPOS, (WPARAM)(BOOL)true, (LPARAM)reflectedValue);
1175
case
PInvoke
.TB_LINEUP:
1176
case
PInvoke
.TB_LINEDOWN:
1177
case
PInvoke
.TB_PAGEUP:
1178
case
PInvoke
.TB_PAGEDOWN:
1179
case
PInvoke
.TB_THUMBTRACK:
1180
case
PInvoke
.TB_TOP:
1181
case
PInvoke
.TB_BOTTOM:
1182
case
PInvoke
.TB_ENDTRACK:
System\Windows\Forms\Controls\TreeView\TreeNode.cs (25)
241
if (PInvokeCore.SendMessage(tv,
PInvoke
.TVM_GETITEMRECT, 1, ref rc) == 0)
270
if (PInvokeCore.SendMessage(tv,
PInvoke
.TVM_GETITEMRECT, 0, ref rc) == 0)
313
PInvokeCore.SendMessage(tv,
PInvoke
.TVM_SETITEMW, 0, ref item);
337
PInvokeCore.SendMessage(_treeView,
PInvoke
.TVM_GETITEMW, 0, ref item);
628
bool visible = PInvokeCore.SendMessage(tv,
PInvoke
.TVM_GETITEMRECT, 1, ref rc) != 0;
704
PInvoke
.TVM_GETNEXTITEM,
705
(WPARAM)
PInvoke
.TVGN_NEXTVISIBLE,
862
PInvoke
.TVM_GETNEXTITEM,
863
(WPARAM)
PInvoke
.TVGN_PREVIOUSVISIBLE,
972
PInvokeCore.SendMessage(tv,
PInvoke
.TVM_GETITEMW, 0, ref item);
1290
PInvokeCore.SendMessage(tv,
PInvoke
.TVM_EDITLABELW, 0, (LPARAM)HTREEITEMInternal);
1473
PInvokeCore.SendMessage(tv,
PInvoke
.TVM_EXPAND, (WPARAM)(uint)NM_TREEVIEW_ACTION.TVE_COLLAPSE, (LPARAM)Handle);
1592
PInvokeCore.SendMessage(tv,
PInvoke
.TVM_ENDEDITLABELNOW, (WPARAM)(BOOL)cancel);
1661
PInvokeCore.SendMessage(tv,
PInvoke
.TVM_ENSUREVISIBLE, 0, Handle);
1679
PInvokeCore.SendMessage(tv,
PInvoke
.TVM_EXPAND, (WPARAM)(uint)NM_TREEVIEW_ACTION.TVE_EXPAND, (LPARAM)Handle);
1877
nint editHandle = PInvokeCore.SendMessage(tv,
PInvoke
.TVM_GETEDITCONTROL);
1882
PInvokeCore.SendMessage(tv,
PInvoke
.TVM_ENDEDITLABELNOW, (WPARAM)(BOOL)false);
1885
HTREEITEMInternal = (HTREEITEM)PInvokeCore.SendMessage(tv,
PInvoke
.TVM_INSERTITEMW, 0, ref tvis);
1895
PInvokeCore.PostMessage(tv,
PInvoke
.TVM_EDITLABELW, default, (LPARAM)HTREEITEMInternal);
1898
PInvoke
.InvalidateRect(tv, lpRect: null, bErase: false);
1984
PInvokeCore.SendMessage(tv,
PInvoke
.TVM_DELETEITEM, 0, (LPARAM)HTREEITEMInternal);
1998
PInvoke
.UiaDisconnectProvider(_accessibleObject);
2032
PInvokeCore.SendMessage(tv,
PInvoke
.TVM_SETITEMW, 0, ref item);
2180
PInvokeCore.SendMessage(tv,
PInvoke
.TVM_SETITEMW, 0, ref item);
2215
PInvokeCore.SendMessage(tv,
PInvoke
.TVM_SETITEMW, 0, ref item);
System\Windows\Forms\Controls\TreeView\TreeView.cs (117)
201
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETBKCOLOR, 0, BackColor.ToWin32());
206
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETINDENT, (WPARAM)Indent);
312
cp.ClassName =
PInvoke
.WC_TREEVIEW;
334
cp.Style |= (int)
PInvoke
.LVS_NOSCROLL;
339
cp.Style |= (int)
PInvoke
.TVS_SHOWSELALWAYS;
344
cp.Style |= (int)
PInvoke
.TVS_EDITLABELS;
349
cp.Style |= (int)
PInvoke
.TVS_HASLINES;
354
cp.Style |= (int)
PInvoke
.TVS_HASBUTTONS;
359
cp.Style |= (int)
PInvoke
.TVS_LINESATROOT;
364
cp.Style |= (int)
PInvoke
.TVS_TRACKSELECT;
369
cp.Style |= (int)
PInvoke
.TVS_FULLROWSELECT;
374
cp.Style |= (int)
PInvoke
.TVS_NONEVENHEIGHT;
381
cp.Style |= (int)
PInvoke
.TVS_INFOTIP;
388
cp.Style |= (int)
PInvoke
.TVS_CHECKBOXES;
404
cp.Style |= (int)
PInvoke
.TVS_RTLREADING;
449
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETTEXTCOLOR, 0, ForeColor.ToWin32());
631
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETIMAGELIST, 0, value is null ? 0 : value.Handle);
744
return (int)PInvokeCore.SendMessage(this,
PInvoke
.TVM_GETINDENT);
759
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETINDENT, (WPARAM)value);
760
_indent = (int)PInvokeCore.SendMessage(this,
PInvoke
.TVM_GETINDENT);
782
return (int)PInvokeCore.SendMessage(this,
PInvoke
.TVM_GETITEMHEIGHT);
817
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETITEMHEIGHT, (WPARAM)value);
818
_itemHeight = (int)PInvokeCore.SendMessage(this,
PInvoke
.TVM_GETITEMHEIGHT);
861
int intColor = (int)PInvokeCore.SendMessage(this,
PInvoke
.TVM_GETLINECOLOR);
874
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETLINECOLOR, 0, _lineColor.ToWin32());
1093
IntPtr hItem = PInvokeCore.SendMessage(this,
PInvoke
.TVM_GETNEXTITEM, (WPARAM)
PInvoke
.TVGN_CARET);
1120
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SELECTITEM, (WPARAM)
PInvoke
.TVGN_CARET, (LPARAM)hnode);
1306
IntPtr hitem = PInvokeCore.SendMessage(this,
PInvoke
.TVM_GETNEXTITEM, (WPARAM)
PInvoke
.TVGN_FIRSTVISIBLE);
1322
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SELECTITEM, (WPARAM)
PInvoke
.TVGN_FIRSTVISIBLE, (LPARAM)hnode);
1342
public int VisibleCount => IsHandleCreated ? (int)PInvokeCore.SendMessage(this,
PInvoke
.TVM_GETVISIBLECOUNT) : 0;
1520
PInvoke
.InitCommonControlsEx(new INITCOMMONCONTROLSEX
1625
PInvokeCore.SendMessage(toolTip,
PInvoke
.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
1626
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETTOOLTIPS, (WPARAM)toolTip.Handle);
1645
nint hnode = PInvokeCore.SendMessage(this,
PInvoke
.TVM_HITTEST, 0, ref tvhi);
1686
nint hnode = PInvokeCore.SendMessage(this,
PInvoke
.TVM_HITTEST, 0, ref tvhi);
1695
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETIMAGELIST, 0, handle);
1859
int version = (int)PInvokeCore.SendMessage(this,
PInvoke
.CCM_GETVERSION);
1862
PInvokeCore.SendMessage(this,
PInvoke
.CCM_SETVERSION, 5);
1873
style |= (int)
PInvoke
.TVS_CHECKBOXES;
1880
style |= (int)
PInvoke
.TVS_INFOTIP;
1888
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETBKCOLOR, 0, c.ToWin32());
1895
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETTEXTCOLOR, 0, c.ToWin32());
1902
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETLINECOLOR, 0, _lineColor.ToWin32());
1907
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETIMAGELIST, 0, _imageList.Handle);
1917
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETINDENT, (WPARAM)_indent);
1922
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETITEMHEIGHT, (WPARAM)ItemHeight);
1938
PInvoke
.SetWindowPos(
1951
PInvoke
.SetWindowPos(
1992
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETIMAGELIST, (WPARAM)
PInvoke
.TVSIL_STATE, (LPARAM)newImageList.Handle);
2002
IntPtr handleOld = PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETIMAGELIST, (WPARAM)
PInvoke
.TVSIL_STATE, (LPARAM)handle);
2005
PInvoke
.ImageList.Destroy(new HandleRef<HIMAGELIST>(this, (HIMAGELIST)handleOld));
2013
IntPtr handle = PInvokeCore.SendMessage(this,
PInvoke
.TVM_GETIMAGELIST, (WPARAM)
PInvoke
.TVSIL_STATE);
2016
PInvoke
.ImageList.Destroy(new HandleRef<HIMAGELIST>(this, (HIMAGELIST)handle));
2019
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETIMAGELIST, (WPARAM)
PInvoke
.TVSIL_STATE);
2066
nint hnode = PInvokeCore.SendMessage(this,
PInvoke
.TVM_HITTEST, 0, ref tvhip);
2548
if (PInvokeCore.SendMessage(this,
PInvoke
.TVM_GETITEMRECT, 1, ref rc) != 0)
2550
PInvoke
.InvalidateRect(this, &rc, bErase: true);
2579
_labelEdit.AssignHandle(PInvokeCore.SendMessage(this,
PInvoke
.TVM_GETEDITCONTROL));
2650
PInvoke
.TVM_SETEXTENDEDSTYLE,
2651
(WPARAM)(nint)
PInvoke
.TVS_EX_DOUBLEBUFFER,
2652
(LPARAM)(nint)(DoubleBuffered ?
PInvoke
.TVS_EX_DOUBLEBUFFER : 0));
2687
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SELECTITEM, (WPARAM)
PInvoke
.TVGN_DROPHILITE);
2713
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_NOTIFYITEMDRAW; // yes, we do...
2725
m.ResultInternal = (LRESULT)(nint)(
PInvoke
.CDRF_SKIPDEFAULT);
2738
m.ResultInternal = (LRESULT)(nint)(
PInvoke
.CDRF_NEWFONT |
PInvoke
.CDRF_NOTIFYPOSTPAINT);
2754
if (
PInvoke
.GetScrollInfo(this, SCROLLBAR_CONSTANTS.SB_HORZ, ref si))
2772
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_SKIPDEFAULT;
2802
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_NEWFONT;
2860
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_NOTIFYSUBITEMDRAW;
2868
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_DODEFAULT;
2926
nint hnode = PInvokeCore.SendMessage(this,
PInvoke
.TVM_HITTEST, 0, ref tvhip);
2932
PInvokeCore.SendMessage(tooltipHandle,
PInvoke
.TTM_ADJUSTRECT, (WPARAM)(BOOL)true, ref bounds);
2933
PInvoke
.SetWindowPos(
2957
nint hnode = PInvokeCore.SendMessage(this,
PInvoke
.TVM_HITTEST, 0, ref tvhip);
2991
if (nmhdr->code ==
PInvoke
.NM_CUSTOMDRAW)
3001
case
PInvoke
.TVN_ITEMEXPANDINGW:
3004
case
PInvoke
.TVN_ITEMEXPANDEDW:
3007
case
PInvoke
.TVN_SELCHANGINGW:
3010
case
PInvoke
.TVN_SELCHANGEDW:
3013
case
PInvoke
.TVN_BEGINDRAGW:
3016
case
PInvoke
.TVN_BEGINRDRAGW:
3019
case
PInvoke
.TVN_BEGINLABELEDITW:
3022
case
PInvoke
.TVN_ENDLABELEDITW:
3025
case
PInvoke
.NM_CLICK:
3026
case
PInvoke
.NM_RCLICK:
3034
nint hnode = PInvokeCore.SendMessage(this,
PInvoke
.TVM_HITTEST, 0, ref tvhip);
3035
if (nmtv->hdr.code !=
PInvoke
.NM_CLICK || (tvhip.flags & TVHITTESTINFO_FLAGS.TVHT_ONITEM) != 0)
3037
button = nmtv->hdr.code ==
PInvoke
.NM_CLICK ? MouseButtons.Left : MouseButtons.Right;
3043
if (nmtv->hdr.code !=
PInvoke
.NM_CLICK
3054
if (nmtv->hdr.code ==
PInvoke
.NM_RCLICK)
3064
PInvokeCore.SendMessage(this, PInvokeCore.WM_CONTEXTMENU, (WPARAM)HWND, (LPARAM)
PInvoke
.GetMessagePos());
3072
if (nmtv->hdr.code !=
PInvoke
.NM_CLICK
3116
PInvokeCore.PostMessage(this,
PInvoke
.TVM_SELECTITEM, (WPARAM)
PInvoke
.TVGN_DROPHILITE, (LPARAM)treeNode.Handle);
3129
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SELECTITEM, (WPARAM)
PInvoke
.TVGN_DROPHILITE);
3147
if (((nint)m.LParamInternal &
PInvoke
.PRF_NONCLIENT) != 0
3190
case
PInvoke
.TVM_SETITEMW:
3206
PInvokeCore.SendMessage(this,
PInvoke
.TVM_GETITEMW, 0, ref item1);
3218
case
PInvoke
.TTN_GETDISPINFOW:
3220
PInvokeCore.SendMessage(nmhdr->hwndFrom,
PInvoke
.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
3224
case
PInvoke
.TTN_SHOW:
3275
_mouseDownNode = PInvokeCore.SendMessage(this,
PInvoke
.TVM_HITTEST, 0, ref tvhip);
3312
nint hnode = PInvokeCore.SendMessage(this,
PInvoke
.TVM_HITTEST, 0, ref tvhi);
3393
_mouseDownNode = PInvokeCore.SendMessage(this,
PInvoke
.TVM_HITTEST, 0, ref tvhit);
3399
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETINDENT, (WPARAM)Indent);
3452
if (m.LParamInternal ==
PInvoke
.UiaRootObjectId && SupportsUiaProviders && !IsAccessibilityObjectCreated && Focused)
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (1)
481
PInvoke
.MessageBeep(MESSAGEBOX_STYLE.MB_OK);
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (7)
692
if (
PInvoke
.WindowFromPoint(PointToScreen(mevent.Location)) == HWND && !ValidationCancelled)
742
Debug.Assert(_wheelDelta > -
PInvoke
.WHEEL_DELTA, "wheelDelta is too small");
743
Debug.Assert(_wheelDelta <
PInvoke
.WHEEL_DELTA, "wheelDelta is too big");
747
partialNotches = _wheelDelta / (float)
PInvoke
.WHEEL_DELTA;
768
_wheelDelta -= (int)(scrollBands * (
PInvoke
.WHEEL_DELTA / (float)wheelScrollLines));
779
_wheelDelta -= (int)(scrollBands * (
PInvoke
.WHEEL_DELTA / (float)wheelScrollLines));
956
PInvoke
.SetFocus(TextBox);
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (1)
222
if (!_parent.ValidationCancelled &&
PInvoke
.WindowFromPoint(PointToScreen(e.Location)) == HWND)
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.UpDownButtonsAccessibleObject.cs (2)
92
PInvoke
.UiaDisconnectProvider(_upButton, skipOSCheck: true);
95
PInvoke
.UiaDisconnectProvider(_downButton, skipOSCheck: true);
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownEdit.cs (1)
66
if (!_parent.ValidationCancelled &&
PInvoke
.WindowFromPoint(PointToScreen(e.Location)) == HWND)
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (2)
1104
HWND hwndFocus =
PInvoke
.GetFocus();
1105
return !hwndFocus.IsNull &&
PInvoke
.IsChild(this, hwndFocus);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (5)
337
time =
PInvoke
.GetTickCount()
340
PInvoke
.GetCursorPos(out Point p);
342
if (!
PInvoke
.IsAccelerator(new HandleRef<HACCEL>(this, controlInfo.hAccel), controlInfo.cAccel, &msg, lpwCmd: null))
777
PInvoke
.SetParent(hwnd, this);
1156
containerControl = FromHandle(
PInvoke
.GetParent(this)) as ContainerControl;
System\Windows\Forms\Controls\WebBrowser\WebBrowserHelper.cs (1)
44
internal static uint REGMSG_MSG { get; } =
PInvoke
.RegisterWindowMessage($"{Application.WindowMessagesVersion}_subclassCheck");
System\Windows\Forms\Controls\WebBrowser\WebBrowserSiteBase.cs (1)
221
*phwnd =
PInvoke
.GetParent(Host);
System\Windows\Forms\Design\ComponentEditorForm.PageSelector.cs (18)
76
_hbrushDither =
PInvoke
.CreatePatternBrush(hbitmapTemp);
117
PInvoke
.ExtTextOut(dc, 0, 0, ETO_OPTIONS.ETO_CLIPPED | ETO_OPTIONS.ETO_OPAQUE, &rc, lpString: null, 0, lpDx: null);
123
PInvoke
.GetTextExtentPoint32W(dc, pItemText, itemText.Length, (SIZE*)(void*)&size);
135
PInvoke
.DrawText(
145
PInvoke
.ImageList.Draw(
165
PInvoke
.ExtTextOut(dc, 0, 0, ETO_OPTIONS.ETO_OPAQUE, &rc2, lpString: null, 0, lpDx: null);
168
PInvoke
.ExtTextOut(dc, 0, 0, ETO_OPTIONS.ETO_OPAQUE, &rc2, lpString: null, 0, lpDx: null);
176
PInvoke
.ExtTextOut(dc, 0, 0, ETO_OPTIONS.ETO_OPAQUE, &rc2, lpString: null, 0, lpDx: null);
179
PInvoke
.ExtTextOut(dc, 0, 0, ETO_OPTIONS.ETO_OPAQUE, &rc2, lpString: null, 0, lpDx: null);
189
int itemHeight = (int)PInvokeCore.SendMessage(this,
PInvoke
.TVM_GETITEMHEIGHT);
191
PInvokeCore.SendMessage(this,
PInvoke
.TVM_SETITEMHEIGHT, (WPARAM)itemHeight);
206
m.ResultInternal = (LRESULT)(nint)(
PInvoke
.CDRF_NOTIFYITEMDRAW |
PInvoke
.CDRF_NOTIFYPOSTPAINT);
236
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_SKIPDEFAULT;
241
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_SKIPDEFAULT;
244
m.ResultInternal = (LRESULT)(nint)
PInvoke
.CDRF_DODEFAULT;
269
PInvoke
.PatBlt(dc, rc.left, rc.top, rc.Width, rc.Height, ROP_CODE.PATCOPY);
280
if (nmhdr->code ==
PInvoke
.NM_CUSTOMDRAW)
System\Windows\Forms\Dialogs\CommonDialogs\ColorDialog.cs (2)
108
protected virtual nint Instance =>
PInvoke
.GetModuleHandle((PCWSTR)null);
185
if (!
PInvoke
.ChooseColor(&cc))
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (5)
73
PInvoke
.SetFocus((HWND)wparam);
84
PInvoke
.SetFocus(_defaultControlHwnd);
101
PInvoke
.SetWindowPos(
204
ownerHwnd = Control.GetHandleRef(
PInvoke
.GetActiveWindow());
217
s_helpMessage =
PInvoke
.RegisterWindowMessage("commdlg_help");
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (10)
288
protected virtual nint Instance =>
PInvoke
.GetModuleHandle((PCWSTR)null);
499
_dialogHWnd =
PInvoke
.GetParent((HWND)hWnd);
506
case
PInvoke
.CDN_INITDONE:
509
case
PInvoke
.CDN_SELCHANGE:
511
int sizeNeeded = (int)PInvokeCore.SendMessage(_dialogHWnd,
PInvoke
.CDM_GETSPEC);
530
case
PInvoke
.CDN_SHAREVIOLATION:
536
case
PInvoke
.CDN_FILEOK:
567
PInvoke
.EndDialog(_dialogHWnd, 0);
671
HWND focusHandle =
PInvoke
.GetFocus();
679
PInvoke
.SetFocus(focusHandle);
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.Vista.cs (1)
64
using ComScope<IShellItem> initialDirectory = new(
PInvoke
.SHCreateShellItem(InitialDirectory));
System\Windows\Forms\Dialogs\CommonDialogs\FolderBrowserDialog.cs (10)
357
using ComScope<IShellItem> initialDirectory = new(
PInvoke
.SHCreateShellItem(_initialDirectory));
378
dialog->SetFolder(
PInvoke
.SHCreateItemFromParsingName(parent));
438
uint mergedOptions =
PInvoke
.BIF_NEWDIALOGSTYLE;
441
mergedOptions |=
PInvoke
.BIF_NONEWFOLDERBUTTON;
492
case
PInvoke
.BFFM_INITIALIZED:
498
PInvokeCore.SendMessage(hwnd,
PInvoke
.BFFM_SETEXPANDED, (WPARAM)(BOOL)true, instance._initialDirectory);
504
PInvokeCore.SendMessage(hwnd,
PInvoke
.BFFM_SETSELECTIONW, (WPARAM)(BOOL)true, instance.SelectedPath);
508
case
PInvoke
.BFFM_SELCHANGED:
517
bool isFileSystemFolder =
PInvoke
.SHGetPathFromIDListEx(selectedPidl, b, (uint)buffer.Length, GPFIDL_FLAGS.GPFIDL_UNCPRINTER);
518
PInvokeCore.SendMessage(hwnd,
PInvoke
.BFFM_ENABLEOK, 0, (nint)(BOOL)isFileSystemFolder);
System\Windows\Forms\Dialogs\CommonDialogs\FontDialog.cs (15)
315
int index = (int)
PInvoke
.SendDlgItemMessage((HWND)hWnd, (int)
PInvoke
.cmb4,
PInvoke
.CB_GETCURSEL, 0, 0);
316
if (index !=
PInvoke
.CB_ERR)
318
UpdateColor((COLORREF)(int)
PInvoke
.SendDlgItemMessage(
320
(int)
PInvoke
.cmb4,
321
PInvoke
.CB_GETITEMDATA,
346
HWND hWndCtl =
PInvoke
.GetDlgItem((HWND)hWnd, (int)
PInvoke
.cmb4);
347
PInvoke
.ShowWindow(hWndCtl, SHOW_WINDOW_CMD.SW_HIDE);
348
hWndCtl =
PInvoke
.GetDlgItem((HWND)hWnd, (int)
PInvoke
.stc4);
349
PInvoke
.ShowWindow(hWndCtl, SHOW_WINDOW_CMD.SW_HIDE);
393
hInstance =
PInvoke
.GetModuleHandle((PCWSTR)null),
417
if (!
PInvoke
.ChooseFont(&cf))
System\Windows\Forms\Dialogs\CommonDialogs\OpenFileDialog.cs (2)
117
bool result =
PInvoke
.GetOpenFileName(ofn);
121
switch (
PInvoke
.CommDlgExtendedError())
System\Windows\Forms\Dialogs\CommonDialogs\SaveFileDialog.cs (2)
142
bool result =
PInvoke
.GetSaveFileName(ofn);
147
switch (
PInvoke
.CommDlgExtendedError())
System\Windows\Forms\Dialogs\MessageBox.cs (4)
459
handle = owner is null ? Control.GetHandleRef(
PInvoke
.GetActiveWindow()) : Control.GetSafeHandle(owner);
465
if (
PInvoke
.GetModuleHandle(Libraries.Shell32) == 0)
467
if (
PInvoke
.LoadLibraryFromSystemPathIfAvailable(Libraries.Shell32) == HINSTANCE.Null)
482
return (DialogResult)
PInvoke
.MessageBox(handle.Handle, text, caption, style);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (3)
611
returnValue =
PInvoke
.TaskDialogIndirect(
906
caption = Path.GetFileName(
PInvoke
.GetModuleFileNameLongPath(HINSTANCE.Null));
909
PInvoke
.SetWindowText(_handle, caption);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogProgressBar.cs (4)
313
TaskDialogProgressBarState.Normal =>
PInvoke
.PBST_NORMAL,
314
TaskDialogProgressBarState.Paused =>
PInvoke
.PBST_PAUSED,
315
TaskDialogProgressBarState.Error =>
PInvoke
.PBST_ERROR,
359
taskDialog.SetProgressBarState(
PInvoke
.PBST_NORMAL);
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (1)
799
if (
PInvoke
.UiaClientsAreListening())
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (23)
57
toolInfo.SendMessage(_tipWindow,
PInvoke
.TTM_ADDTOOLW);
105
PInvoke
.InitCommonControlsEx(new INITCOMMONCONTROLSEX
114
ClassName =
PInvoke
.TOOLTIPS_CLASS,
115
Style = (int)
PInvoke
.TTS_ALWAYSTIP
123
PInvoke
.TTM_SETMAXTIPWIDTH,
126
PInvoke
.SetWindowPos(
131
PInvokeCore.SendMessage(_tipWindow,
PInvoke
.TTM_SETDELAYTIME, (WPARAM)
PInvoke
.TTDT_INITIAL);
155
PInvoke
.SetWindowPos(
174
PInvoke
.GetViewportExtEx(hdc, &originalExtents);
175
PInvoke
.SetViewportExtEx(hdc, -originalExtents.Width, originalExtents.Height, lpsz: null);
178
PInvoke
.SetViewportOrgEx(hdc, originalOrigin.X + _windowBounds.Width - 1, originalOrigin.Y, lppt: null);
263
info.SendMessage(_tipWindow,
PInvoke
.TTM_DELTOOLW);
358
toolInfo.SendMessage(_tipWindow,
PInvoke
.TTM_SETTOOLINFOW);
378
if (
PInvoke
.SetWindowRgn(this, windowRegionHandle, fRedraw: true) != 0)
384
PInvoke
.SetWindowPos(
393
PInvoke
.InvalidateRect(this, lpRect: null, bErase: false);
401
if (m.Msg == (int)PInvokeCore.WM_GETOBJECT && m.LParamInternal ==
PInvoke
.UiaRootObjectId)
405
m.ResultInternal =
PInvoke
.UiaReturnRawElementProvider(
430
if (nmhdr->code is
PInvoke
.TTN_SHOW or
PInvoke
.TTN_POP)
432
OnToolTipVisibilityChanging((nint)nmhdr->idFrom, nmhdr->code ==
PInvoke
.TTN_SHOW);
451
int currentDpi = (int)
PInvoke
.GetDpiForWindow(this);
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.ErrorWindowAccessibleObject.cs (1)
83
PInvoke
.UiaHostProviderFromHwnd(new HandleRef<HWND>(this, _owner.HWND), out IRawElementProviderSimple* provider);
System\Windows\Forms\ErrorProvider\ErrorProvider.IconRegion.cs (1)
57
PInvoke
.GetBitmapBits(mask, bits.Length, pbits);
System\Windows\Forms\Form.cs (85)
1364
PInvoke
.SetWindowPos(
1801
PInvoke
.SetWindowDisplayAffinity(HWND, affinity);
2066
PInvoke
.SetWindowPos(
2216
PInvoke
.ShowWindow(this, SHOW_WINDOW_CMD.SW_SHOW);
2324
PInvoke
.DwmSetWindowAttribute(
2523
PInvoke
.DwmGetWindowAttribute(
2536
PInvoke
.DwmSetWindowAttribute(
2572
PInvoke
.ShowWindow(this, SHOW_WINDOW_CMD.SW_NORMAL);
2575
PInvoke
.ShowWindow(this, SHOW_WINDOW_CMD.SW_MAXIMIZE);
2578
PInvoke
.ShowWindow(this, SHOW_WINDOW_CMD.SW_MINIMIZE);
2848
PInvoke
.SetForegroundWindow(this);
2985
PInvoke
.EnableMenuItem(hmenu,
PInvoke
.SC_MINIMIZE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_GRAYED);
2989
PInvoke
.EnableMenuItem(hmenu,
PInvoke
.SC_MINIMIZE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_ENABLED);
2994
PInvoke
.EnableMenuItem(hmenu,
PInvoke
.SC_MAXIMIZE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_GRAYED);
2998
PInvoke
.EnableMenuItem(hmenu,
PInvoke
.SC_MAXIMIZE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_ENABLED);
3003
PInvoke
.EnableMenuItem(hmenu,
PInvoke
.SC_CLOSE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_GRAYED);
3007
PInvoke
.EnableMenuItem(hmenu,
PInvoke
.SC_CLOSE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_ENABLED);
3012
PInvoke
.EnableMenuItem(hmenu,
PInvoke
.SC_RESTORE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_GRAYED);
3016
PInvoke
.EnableMenuItem(hmenu,
PInvoke
.SC_RESTORE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_ENABLED);
3021
PInvoke
.EnableMenuItem(hmenu,
PInvoke
.SC_SIZE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_GRAYED);
3025
PInvoke
.EnableMenuItem(hmenu,
PInvoke
.SC_SIZE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_ENABLED);
3039
HMENU hmenu =
PInvoke
.GetSystemMenu(this, bRevert: false);
3429
PInvokeCore.SendMessage(TaskbarOwner, PInvokeCore.WM_SETICON, (WPARAM)
PInvoke
.ICON_BIG, (LPARAM)icon.Handle);
3504
m.ResultInternal =
PInvoke
.DefFrameProc(
3515
m.ResultInternal =
PInvoke
.DefMDIChildProc(m.HWND, (uint)m.Msg, m.WParamInternal, m.LParamInternal);
3587
PInvoke
.DestroyMenu(dummyMenu);
3703
cp.Width =
PInvoke
.CW_USEDEFAULT;
3704
cp.Height =
PInvoke
.CW_USEDEFAULT;
3718
cp.X =
PInvoke
.CW_USEDEFAULT;
3719
cp.Y =
PInvoke
.CW_USEDEFAULT;
4415
PInvoke
.ClientToScreen(this, ref pointToSnap);
4731
PInvoke
.TranslateMDISysAccel(_ctlClient.HWND, win32Message))
4924
bool result =
PInvoke
.GetWindowPlacement(HWND, &wp);
4968
bool result =
PInvoke
.SetWindowPlacement(HWND, &wp);
5147
PInvoke
.SetActiveWindow(this);
5151
PInvoke
.SetActiveWindow(MdiParentInternal);
5497
HWND activeHwnd =
PInvoke
.GetActiveWindow();
5702
HWND captureHwnd =
PInvoke
.GetCapture();
5706
PInvoke
.ReleaseCapture();
5709
HWND activeHwnd =
PInvoke
.GetActiveWindow();
5772
if (!
PInvoke
.IsWindow(activeHwnd))
5777
if (
PInvoke
.IsWindow(activeHwnd) &&
PInvoke
.IsWindowVisible(activeHwnd))
5779
PInvoke
.SetActiveWindow(activeHwnd);
5781
else if (
PInvoke
.IsWindow(ownerHwnd) &&
PInvoke
.IsWindowVisible(ownerHwnd))
5783
PInvoke
.SetActiveWindow(ownerHwnd);
6139
result =
PInvoke
.SetLayeredWindowAttributes(this, (COLORREF)0, OpacityAsByte, LAYERED_WINDOW_ATTRIBUTES_FLAGS.LWA_ALPHA);
6144
result =
PInvoke
.SetLayeredWindowAttributes(this, (COLORREF)transparencyKey, 0, LAYERED_WINDOW_ATTRIBUTES_FLAGS.LWA_COLORKEY);
6148
result =
PInvoke
.SetLayeredWindowAttributes(this, (COLORREF)transparencyKey, OpacityAsByte, LAYERED_WINDOW_ATTRIBUTES_FLAGS.LWA_ALPHA | LAYERED_WINDOW_ATTRIBUTES_FLAGS.LWA_COLORKEY);
6167
PInvoke
.SetMenu(this, HMENU.Null);
6186
dummyMenu =
PInvoke
.CreateMenu();
6200
HMENU hMenu =
PInvoke
.GetMenu(this);
6204
PInvoke
.SetMenu(this, HMENU.Null);
6222
PInvoke
.DrawMenuBar(this);
6345
HMENU hMenu =
PInvoke
.GetMenu(this);
6456
PInvokeCore.SendMessage(this, PInvokeCore.WM_SETICON, (WPARAM)
PInvoke
.ICON_SMALL, (LPARAM)_smallIcon.Handle);
6459
PInvokeCore.SendMessage(this, PInvokeCore.WM_SETICON, (WPARAM)
PInvoke
.ICON_BIG, (LPARAM)icon.Handle);
6463
PInvokeCore.SendMessage(this, PInvokeCore.WM_SETICON, (WPARAM)
PInvoke
.ICON_SMALL);
6464
PInvokeCore.SendMessage(this, PInvokeCore.WM_SETICON, (WPARAM)
PInvoke
.ICON_BIG);
6474
PInvoke
.RedrawWindow(this, lprcUpdate: null, HRGN.Null, REDRAW_WINDOW_FLAGS.RDW_INVALIDATE | REDRAW_WINDOW_FLAGS.RDW_FRAME);
6498
PInvoke
.GetWindowPlacement(HWND, &wp);
6610
Active = m.WParamInternal.LOWORD !=
PInvoke
.WA_INACTIVE;
6638
PInvoke
.GetStartupInfo(out STARTUPINFOW si);
7005
m.ResultInternal = (LRESULT)(nint)(IsMirrored ?
PInvoke
.HTBOTTOMLEFT :
PInvoke
.HTBOTTOMRIGHT);
7018
if (result is >= ((int)
PInvoke
.HTLEFT) and <= ((int)
PInvoke
.HTBOTTOMRIGHT))
7020
m.ResultInternal = (LRESULT)(nint)
PInvoke
.HTBORDER;
7044
case
PInvoke
.SC_CLOSE:
7052
case
PInvoke
.SC_KEYMENU:
7059
case
PInvoke
.SC_SIZE:
7060
case
PInvoke
.SC_MOVE:
7064
case
PInvoke
.SC_CONTEXTHELP:
7098
MdiParentInternal.UpdateMdiControlStrip((nint)m.WParamInternal ==
PInvoke
.SIZE_MAXIMIZED);
System\Windows\Forms\Help\Help.cs (14)
123
uint requiredStringSize =
PInvoke
.GetShortPathName(localPath, null, 0);
130
requiredStringSize =
PInvoke
.GetShortPathName(localPath, pShortName, requiredStringSize);
137
HandleRef<HWND> handle = parent is not null ? (new(parent)) : Control.GetHandleRef(
PInvoke
.GetActiveWindow());
145
PInvoke
.HtmlHelp(handle, pathAndFileName, htmlCommand, stringHtmlParam);
149
PInvoke
.HtmlHelp(handle, pathAndFileName, htmlCommand, (nuint)intParam);
156
PInvoke
.HtmlHelp(handle, pathAndFileName, htmlCommand, in query);
163
PInvoke
.HtmlHelp(HWND.Null, pathAndFileName, HH_DISPLAY_TOPIC, null);
168
PInvoke
.HtmlHelp(handle, pathAndFileName, htmlCommand, in aLink);
174
PInvoke
.HtmlHelp(handle, pathAndFileName, htmlCommand, (string)param);
179
PInvoke
.HtmlHelp(handle, pathAndFileName, MapCommandToHTMLCommand(command, null, out htmlParam), null);
183
PInvoke
.HtmlHelp(handle, pathAndFileName, HH_DISPLAY_TEXT_POPUP, ref popup);
214
HandleRef<HWND> handle = parent is not null ? new(parent) : Control.GetHandleRef(
PInvoke
.GetActiveWindow());
217
PInvoke
.ShellExecute(handle.Handle, lpOperation: null, executable ?? fileName, executable is not null ? fileName : null, lpDirectory: null, SHOW_WINDOW_CMD.SW_NORMAL);
229
result =
PInvoke
.FindExecutable(lpFileLocal, lpDirectory: null, lpResult: b);
System\Windows\Forms\Input\Cursor.cs (12)
38
_handle =
PInvoke
.LoadCursor(HINSTANCE.Null, nResourceId);
122
PInvoke
.GetClipCursor(out RECT rect);
129
PInvoke
.ClipCursor((RECT*)null);
134
PInvoke
.ClipCursor(&rect);
147
HCURSOR cursor =
PInvoke
.GetCursor();
150
set =>
PInvoke
.SetCursor(value?._handle ?? HCURSOR.Null);
184
PInvoke
.GetCursorPos(out Point p);
187
set =>
PInvoke
.SetCursorPos(value.X, value.Y);
235
PInvoke
.DestroyCursor(_handle);
334
PInvoke
.IntersectClipRect(dc, targetX, targetY, targetX + clipWidth, targetY + clipHeight);
373
public static void Hide() =>
PInvoke
.ShowCursor(bShow: false);
463
public static void Show() =>
PInvoke
.ShowCursor(bShow: true);
System\Windows\Forms\Input\Cursors.cs (15)
40
public static Cursor AppStarting => s_appStarting ??= new(
PInvoke
.IDC_APPSTARTING, nameof(AppStarting));
41
public static Cursor Arrow => s_arrow ??= new(
PInvoke
.IDC_ARROW, nameof(Arrow));
42
public static Cursor Cross => s_cross ??= new(
PInvoke
.IDC_CROSS, nameof(Cross));
43
public static Cursor Default => s_defaultCursor ??= new(
PInvoke
.IDC_ARROW, nameof(Default));
44
public static Cursor IBeam => s_iBeam ??= new(
PInvoke
.IDC_IBEAM, nameof(IBeam));
45
public static Cursor No => s_no ??= new(
PInvoke
.IDC_NO, nameof(No));
46
public static Cursor SizeAll => s_sizeAll ??= new(
PInvoke
.IDC_SIZEALL, nameof(SizeAll));
47
public static Cursor SizeNESW => s_sizeNESW ??= new(
PInvoke
.IDC_SIZENESW, nameof(SizeNESW));
48
public static Cursor SizeNS => s_sizeNS ??= new(
PInvoke
.IDC_SIZENS, nameof(SizeNS));
49
public static Cursor SizeNWSE => s_sizeNWSE ??= new(
PInvoke
.IDC_SIZENWSE, nameof(SizeNWSE));
50
public static Cursor SizeWE => s_sizeWE ??= new(
PInvoke
.IDC_SIZEWE, nameof(SizeWE));
51
public static Cursor UpArrow => s_upArrow ??= new(
PInvoke
.IDC_UPARROW, nameof(UpArrow));
52
public static Cursor WaitCursor => s_wait ??= new(
PInvoke
.IDC_WAIT, nameof(WaitCursor));
53
public static Cursor Help => s_help ??= new(
PInvoke
.IDC_HELP, nameof(Help));
54
public static Cursor Hand => s_hand ??= new(
PInvoke
.IDC_HAND, nameof(Hand));
System\Windows\Forms\Input\InputLanguage.cs (8)
39
return new InputLanguage(
PInvoke
.GetKeyboardLayout(0));
47
HKL handleOld =
PInvoke
.ActivateKeyboardLayout(new HKL(value.Handle), 0);
80
int size =
PInvoke
.GetKeyboardLayoutList(0, null);
86
PInvoke
.GetKeyboardLayoutList(size, h);
209
if (langId is (int)
PInvoke
.LOCALE_TRANSIENT_KEYBOARD1
210
or (int)
PInvoke
.LOCALE_TRANSIENT_KEYBOARD2
211
or (int)
PInvoke
.LOCALE_TRANSIENT_KEYBOARD3
212
or (int)
PInvoke
.LOCALE_TRANSIENT_KEYBOARD4)
System\Windows\Forms\Internal\RegistryKeyExtensions.cs (1)
13
?
PInvoke
.RegLoadMUIString(key, keyName, out string localizedValue)
System\Windows\Forms\Internal\WinFormsUtils.cs (1)
28
int lastXY = (int)
PInvoke
.GetMessagePos();
System\Windows\Forms\Layout\ArrangeDirection.cs (4)
15
Down =
PInvoke
.ARW_DOWN,
20
Left =
PInvoke
.ARW_LEFT,
25
Right =
PInvoke
.ARW_RIGHT,
30
Up =
PInvoke
.ARW_UP,
System\Windows\Forms\Layout\ArrangeStartingPosition.cs (1)
27
Hide =
PInvoke
.ARW_HIDE,
System\Windows\Forms\Layout\Containers\ContainerControl.cs (7)
628
HWND focusHandle =
PInvoke
.GetFocus();
631
PInvoke
.SetFocus(_activeControl);
653
PInvoke
.SetFocus(containerControl);
690
PInvoke
.ClientToScreen(this, ref topLeftPoint);
723
PInvoke
.GetTextMetrics(dc, &tm);
732
PInvoke
.GetTextExtentPoint32W(dc, ps, FontMeasureString.Length, (SIZE*)(void*)&size);
1409
PInvoke
.SetWindowPos(
System\Windows\Forms\Layout\Containers\SplitContainer.cs (5)
451
PInvoke
.GetCursorPos(out Point p);
453
if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) ||
PInvoke
.GetCapture() == HWND)
455
PInvokeCore.SendMessage(this, PInvokeCore.WM_SETCURSOR, (WPARAM)HWND, (LPARAM)(int)
PInvoke
.HTCLIENT);
1478
PInvoke
.PatBlt(dc, r.X, r.Y, r.Width, r.Height, ROP_CODE.PATINVERT);
2270
if ((HWND)m.WParamInternal == InternalHandle && m.LParamInternal.LOWORD ==
PInvoke
.HTCLIENT)
System\Windows\Forms\MDI\MDIClient.cs (3)
252
bool result =
PInvoke
.GetWindowPlacement(child.HWND, &wp);
268
PInvoke
.SetWindowPlacement(child.HWND, &wp);
305
if (
PInvoke
.SetWindowRgn(this, rgn1, true) == 0)
System\Windows\Forms\MDI\MDIControlStrip.cs (7)
26
HMENU hMenu =
PInvoke
.GetSystemMenu(GetSafeHandle(target), bRevert: false);
30
_minimize = new ControlBoxMenuItem(hMenu,
PInvoke
.SC_MINIMIZE, target);
31
_close = new ControlBoxMenuItem(hMenu,
PInvoke
.SC_CLOSE, target);
32
_restore = new ControlBoxMenuItem(hMenu,
PInvoke
.SC_RESTORE, target);
80
HICON hIcon = (HICON)PInvokeCore.SendMessage(GetSafeHandle(_target), PInvokeCore.WM_GETICON, (WPARAM)
PInvoke
.ICON_SMALL);
116
HMENU hmenu =
PInvoke
.GetSystemMenu(GetSafeHandle(_target), bRevert: false);
138
_system.DropDown = ToolStripDropDownMenu.FromHMenu(
PInvoke
.GetSystemMenu(GetSafeHandle(_target), bRevert: false), _target);
System\Windows\Forms\NativeWindow.cs (10)
73
internal DPI_AWARENESS_CONTEXT DpiAwarenessContext { get; } =
PInvoke
.GetThreadDpiAwarenessContextInternal();
105
if (
PInvoke
.IsWindow(handle))
114
PInvoke
.GetExitCodeThread((HANDLE)threadHandle, &exitCode);
117
PInvoke
.SendMessageTimeout(
169
var hModule =
PInvoke
.GetModuleHandle(Libraries.User32);
175
s_defaultWindowProc =
PInvoke
.GetProcAddress(hModule, (PCSTR)ptr);
426
HINSTANCE modHandle =
PInvoke
.GetModuleHandle((PCWSTR)null);
439
createResult =
PInvoke
.CreateWindowEx(
483
DPI_AWARENESS_CONTEXT controlHandleDpiContext =
PInvoke
.GetWindowDpiAwarenessContext(HWND);
533
if (!
PInvoke
.DestroyWindow(HWND))
System\Windows\Forms\NativeWindow.WindowClass.cs (3)
145
if (!
PInvoke
.GetClassInfo(HINSTANCE.Null, n, &windowClass))
159
windowClass.hInstance =
PInvoke
.GetModuleHandle((PCWSTR)null);
165
if (
PInvoke
.RegisterClass(&windowClass) == 0)
System\Windows\Forms\NotifyIcon.cs (11)
32
private static uint WM_TASKBARCREATED { get; } =
PInvoke
.RegisterWindowMessage("TaskbarCreated");
597
PInvoke
.Shell_NotifyIconW(NOTIFY_ICON_MESSAGE.NIM_MODIFY, ref data);
608
PInvoke
.GetCursorPos(out Point pt);
613
PInvoke
.SetForegroundWindow(_window);
666
PInvoke
.Shell_NotifyIconW(NOTIFY_ICON_MESSAGE.NIM_ADD, ref data);
671
PInvoke
.Shell_NotifyIconW(NOTIFY_ICON_MESSAGE.NIM_MODIFY, ref data);
676
PInvoke
.Shell_NotifyIconW(NOTIFY_ICON_MESSAGE.NIM_DELETE, ref data);
769
case
PInvoke
.NIN_BALLOONSHOW:
772
case
PInvoke
.NIN_BALLOONHIDE:
775
case
PInvoke
.NIN_BALLOONTIMEOUT:
778
case
PInvoke
.NIN_BALLOONUSERCLICK:
System\Windows\Forms\PowerStatus.cs (1)
62
private void UpdateSystemPowerStatus() =>
PInvoke
.GetSystemPowerStatus(out _systemPowerStatus);
System\Windows\Forms\Printing\PageSetupDialog.cs (4)
289
result =
PInvoke
.GetLocaleInfoEx(
290
PInvoke
.LOCALE_NAME_SYSTEM_DEFAULT,
291
PInvoke
.LOCALE_IMEASURE,
334
if (!
PInvoke
.PageSetupDlg(&dialogSettings))
System\Windows\Forms\Printing\PrintDialog.cs (6)
296
?
PInvoke
.PrintDlg(&dialogSettings32)
297
:
PInvoke
.PrintDlg(&dialogSettings64);
302
var extendedResult =
PInvoke
.CommDlgExtendedError();
358
nStartPage =
PInvoke
.START_PAGE_GENERAL,
416
if (hr.Failed || dialogSettings.dwResultAction ==
PInvoke
.PD_RESULT_CANCEL)
447
return dialogSettings.dwResultAction ==
PInvoke
.PD_RESULT_PRINT;
System\Windows\Forms\Printing\PrinterSettingsExtensions.cs (2)
26
modeSize =
PInvoke
.DocumentProperties(HWND.Null, HANDLE.Null, n, null, (DEVMODEW*)null, 0);
38
modeSize =
PInvoke
.DocumentProperties(
System\Windows\Forms\Rendering\ControlPaint.cs (8)
156
HPALETTE palette =
PInvoke
.CreateHalftonePalette(dc);
343
return
PInvoke
.CreateBrushIndirect(&logicalBrush);
1044
PInvoke
.DrawEdge(hdc, ref rc, edge, flags);
1372
PInvoke
.DrawFrameControl(dc, ref rcCheck, DFC_TYPE.DFC_MENU, DFCS_STATE.DFCS_MENUCHECK);
1444
PInvoke
.DrawFrameControl(hdc, ref rcFrame, kind, state);
1834
PInvoke
.MoveToEx(desktopDC, start.X, start.Y, lppt: null);
1835
PInvoke
.LineTo(desktopDC, end.X, end.Y);
2049
PInvoke
.PatBlt(desktopDC, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, rop3);
System\Windows\Forms\Rendering\DCMapping.cs (2)
58
success =
PInvoke
.SetViewportOrgEx(
70
originalRegionType =
PInvoke
.GetRgnBox(originalRegion, &originalClipRect);
System\Windows\Forms\Rendering\FontCache.Data.cs (2)
41
Debug.Assert(
PInvoke
.GetMapMode(hdc) == HDC_MAP_MODE.MM_TEXT);
44
PInvoke
.GetTextMetrics(hdc, &tm);
System\Windows\Forms\Rendering\ScreenDcCache.cs (6)
102
HRGN hrgn =
PInvoke
.CreateRectRgn(0, 0, 0, 0);
103
Debug.Assert(
PInvoke
.GetClipRgn(hdc, hrgn) == 0, "Should not have a clipping region");
109
Debug.Assert(
PInvoke
.GetMapMode(hdc) == HDC_MAP_MODE.MM_TEXT);
110
Debug.Assert(
PInvoke
.GetROP2(hdc) == R2_MODE.R2_COPYPEN);
111
Debug.Assert(
PInvoke
.GetBkMode(hdc) == BACKGROUND_MODE.OPAQUE);
114
Debug.Assert(
PInvoke
.GetWorldTransform(hdc, (XFORM*)(void*)&matrix));
System\Windows\Forms\Rendering\TextExtensions.cs (4)
97
PInvoke
.DrawTextEx(hdc, text, &rect, dt, &dtparams);
171
int textHeight =
PInvoke
.DrawTextEx(hdc, text, &rect, flags, dtparams);
265
PInvoke
.DrawTextEx(hdc, text, &rect, dt, &dtparams);
294
PInvoke
.GetTextExtentPoint32W(hdc, pText, text.Length, (SIZE*)(void*)&size);
System\Windows\Forms\Rendering\TextRenderer.cs (1)
666
HFONT hfont = (HFONT)
PInvoke
.GetCurrentObject(hdc, OBJ_TYPE.OBJ_FONT);
System\Windows\Forms\Scrolling\ScrollableControl.cs (2)
791
PInvoke
.ScrollWindowEx(
906
PInvoke
.GetScrollInfo(this, fnBar, ref si);
System\Windows\Forms\Scrolling\ScrollBar.cs (7)
122
cp.ClassName =
PInvoke
.WC_SCROLLBAR;
536
while (Math.Abs(_wheelDelta) >=
PInvoke
.WHEEL_DELTA)
540
_wheelDelta -= (int)
PInvoke
.WHEEL_DELTA;
546
_wheelDelta += (int)
PInvoke
.WHEEL_DELTA;
619
PInvoke
.SetScrollInfo(this, SCROLLBAR_CONSTANTS.SB_CTL, ref si, true);
701
PInvoke
.GetScrollInfo(this, SCROLLBAR_CONSTANTS.SB_CTL, ref si);
734
if (
PInvoke
.GetFocus() == HWND)
System\Windows\Forms\Scrolling\ScrollProperties.cs (2)
56
PInvoke
.EnableScrollBar(
274
PInvoke
.SetScrollInfo(_parent, Orientation, ref si, true);
System\Windows\Forms\SendKeys\SendKeys.cs (18)
134
int vk =
PInvoke
.VkKeyScan(character);
164
uint oemVal =
PInvoke
.OemKeyScan((ushort)(0xFF & character));
224
s_hhook =
PInvoke
.SetWindowsHookEx(
227
PInvoke
.GetModuleHandle((PCWSTR)null),
242
HHOOK hookHandle =
PInvoke
.SetWindowsHookEx(
245
PInvoke
.GetModuleHandle((PCWSTR)null),
252
PInvoke
.UnhookWindowsHookEx(hookHandle);
316
PInvoke
.GetKeyboardState(b);
327
PInvoke
.SetKeyboardState(b);
666
bool blockInputSuccess =
PInvoke
.BlockInput(true);
689
eventsSent +=
PInvoke
.SendInput(currentInput, INPUTSize) - 1;
711
eventsSent +=
PInvoke
.SendInput(currentInput[..1], INPUTSize);
733
PInvoke
.BlockInput(false);
872
PInvoke
.SendInput(keyboardInput, INPUTSize);
879
PInvoke
.SendInput(keyboardInput, INPUTSize);
886
PInvoke
.SendInput(keyboardInput, INPUTSize);
893
PInvoke
.SendInput(keyboardInput, INPUTSize);
1008
PInvoke
.UnhookWindowsHookEx(s_hhook);
System\Windows\Forms\SendKeys\SendKeys.SendKeysHookProc.cs (5)
30
if (
PInvoke
.GetAsyncKeyState((int)Keys.Pause) != 0)
37
case
PInvoke
.HC_SKIP:
50
case
PInvoke
.HC_GETNEXT:
62
eventmsg->time =
PInvoke
.GetTickCount();
67
PInvoke
.CallNextHookEx(s_hhook, nCode, wparam, lparam);
System\Windows\Forms\SystemInformation.cs (15)
69
?
PInvoke
.GetCurrentSystemMetrics(SM_CXVSCROLL, (uint)dpi)
82
?
PInvoke
.GetCurrentSystemMetrics(SM_CYHSCROLL, (uint)dpi)
101
? new(
PInvoke
.GetCurrentSystemMetrics(SM_CXBORDER, (uint)dpi),
102
PInvoke
.GetCurrentSystemMetrics(SM_CYBORDER, (uint)dpi))
212
=>
PInvoke
.GetCurrentSystemMetrics(SM_CYVSCROLL, (uint)dpi);
224
?
PInvoke
.GetCurrentSystemMetrics(SM_CXHSCROLL, (uint)dpi)
268
public static int DoubleClickTime => (int)
PInvoke
.GetDoubleClickTime();
494
HWINSTA hwinsta =
PInvoke
.GetProcessWindowStation();
500
if (
PInvoke
.GetUserObjectInformation(
507
if ((flags.dwFlags &
PInvoke
.WSF_VISIBLE) == 0)
695
public static int CaretBlinkTime => (int)
PInvoke
.GetCaretBlinkTime();
702
public static int MouseWheelScrollDelta => (int)
PInvoke
.WHEEL_DELTA;
737
PInvoke
.EnumDisplaySettings(lpszDeviceName: null, ENUM_DISPLAY_SETTINGS_MODE.ENUM_CURRENT_SETTINGS, ref dm);
802
HDESK desktop =
PInvoke
.OpenInputDesktop(0, false, DESKTOP_ACCESS_FLAGS.DESKTOP_SWITCHDESKTOP);
808
PInvoke
.CloseDesktop(desktop);
System\Windows\Forms\Timer.cs (3)
262
_timerID =
PInvoke
.SetTimer(this, s_timerID, (uint)interval);
290
if (_stoppingTimer || hwnd.IsNull || !
PInvoke
.IsWindow(hwnd))
300
PInvoke
.KillTimer(hwnd, _timerID);
System\Windows\Forms\ToolTip\KeyboardToolTipStateMachine.cs (4)
154
return Control.FromHandle(
PInvoke
.GetFocus());
188
StartTimer(toolTip.GetDelayTime(
PInvoke
.TTDT_RESHOW),
199
toolTip.GetDelayTime(
PInvoke
.TTDT_AUTOPOP);
225
StartTimer(toolTip.GetDelayTime(
PInvoke
.TTDT_INITIAL),
System\Windows\Forms\ToolTip\ToolTip.cs (86)
93
_delayTimes[(int)
PInvoke
.TTDT_AUTOMATIC] = DefaultDelay;
117
PInvokeCore.SendMessage(this,
PInvoke
.TTM_ACTIVATE, (WPARAM)(BOOL)value);
140
get => _delayTimes[(int)
PInvoke
.TTDT_AUTOMATIC];
145
SetDelayTime((int)
PInvoke
.TTDT_AUTOMATIC, value);
161
get => _delayTimes[(int)
PInvoke
.TTDT_AUTOPOP];
166
SetDelayTime(
PInvoke
.TTDT_AUTOPOP, value);
183
PInvokeCore.SendMessage(this,
PInvoke
.TTM_SETTIPBKCOLOR, (WPARAM)_backColor);
201
cp.ClassName =
PInvoke
.TOOLTIPS_CLASS;
204
cp.Style = (int)
PInvoke
.TTS_ALWAYSTIP;
209
cp.Style |= (int)
PInvoke
.TTS_BALLOON;
214
cp.Style |= (int)
PInvoke
.TTS_NOPREFIX;
219
cp.Style |= (int)
PInvoke
.TTS_NOANIMATE;
224
cp.Style |= (int)
PInvoke
.TTS_NOFADE;
252
PInvokeCore.SendMessage(this,
PInvoke
.TTM_SETTIPTEXTCOLOR, (WPARAM)_foreColor);
308
HWND hwnd =
PInvoke
.GetActiveWindow();
309
HWND rootHwnd =
PInvoke
.GetAncestor(control, GET_ANCESTOR_FLAGS.GA_ROOT);
332
get => _delayTimes[(int)
PInvoke
.TTDT_INITIAL];
337
SetDelayTime(
PInvoke
.TTDT_INITIAL, value);
357
get => _delayTimes[(int)
PInvoke
.TTDT_RESHOW];
362
SetDelayTime(
PInvoke
.TTDT_RESHOW, value);
437
PInvokeCore.SendMessage(this,
PInvoke
.TTM_SETTITLEW, (uint)_toolTipIcon, title);
441
PInvokeCore.SendMessage(this,
PInvoke
.TTM_UPDATE);
465
PInvokeCore.SendMessage(this,
PInvoke
.TTM_SETTITLEW, (uint)_toolTipIcon, _toolTipTitle);
469
PInvokeCore.SendMessage(this,
PInvoke
.TTM_UPDATE);
608
int delay = _delayTimes[(int)
PInvoke
.TTDT_AUTOMATIC];
609
_delayTimes[(int)
PInvoke
.TTDT_RESHOW] = delay / ReshowRatio;
610
_delayTimes[(int)
PInvoke
.TTDT_AUTOPOP] = delay * AutoPopRatio;
611
_delayTimes[(int)
PInvoke
.TTDT_INITIAL] = delay;
702
PInvoke
.InitCommonControlsEx(new INITCOMMONCONTROLSEX
719
PInvoke
.SetWindowTheme(HWND, string.Empty, string.Empty);
732
PInvokeCore.SendMessage(this,
PInvoke
.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
738
if (_delayTimes[(int)
PInvoke
.TTDT_AUTOMATIC] != DefaultDelay)
740
SetDelayTime(
PInvoke
.TTDT_AUTOMATIC, _delayTimes[(int)
PInvoke
.TTDT_AUTOMATIC]);
744
_delayTimes[(int)
PInvoke
.TTDT_AUTOPOP] = GetDelayTime(
PInvoke
.TTDT_AUTOPOP);
745
_delayTimes[(int)
PInvoke
.TTDT_INITIAL] = GetDelayTime(
PInvoke
.TTDT_INITIAL);
746
_delayTimes[(int)
PInvoke
.TTDT_RESHOW] = GetDelayTime(
PInvoke
.TTDT_RESHOW);
751
int delayTime = _delayTimes[(int)
PInvoke
.TTDT_AUTOPOP];
754
SetDelayTime(
PInvoke
.TTDT_AUTOPOP, delayTime);
757
delayTime = _delayTimes[(int)
PInvoke
.TTDT_INITIAL];
760
SetDelayTime(
PInvoke
.TTDT_INITIAL, delayTime);
763
delayTime = _delayTimes[(int)
PInvoke
.TTDT_RESHOW];
766
SetDelayTime(
PInvoke
.TTDT_RESHOW, delayTime);
771
PInvokeCore.SendMessage(this,
PInvoke
.TTM_ACTIVATE, (WPARAM)(BOOL)_active);
775
PInvokeCore.SendMessage(this,
PInvoke
.TTM_SETTIPBKCOLOR, (WPARAM)BackColor);
780
PInvokeCore.SendMessage(this,
PInvoke
.TTM_SETTIPTEXTCOLOR, (WPARAM)ForeColor);
787
PInvokeCore.SendMessage(this,
PInvoke
.TTM_SETTITLEW, (WPARAM)(int)_toolTipIcon, title);
829
IntPtr result = GetTOOLINFO(control, caption).SendMessage(this,
PInvoke
.TTM_ADDTOOLW);
913
new ToolInfoWrapper<Control>(control).SendMessage(this,
PInvoke
.TTM_DELTOOLW);
964
return (int)PInvokeCore.SendMessage(this,
PInvoke
.TTM_GETDELAYTIME, (WPARAM)type);
1036
HWND hwndControl =
PInvoke
.WindowFromPoint(screenCoords);
1061
HWND found =
PInvoke
.ChildWindowFromPointEx(baseHwnd, pt, CWP_FLAGS.CWP_SKIPINVISIBLE);
1175
_auto = type ==
PInvoke
.TTDT_AUTOMATIC;
1181
PInvokeCore.SendMessage(this,
PInvoke
.TTM_SETDELAYTIME, (WPARAM)type, (LPARAM)time);
1182
if (type ==
PInvoke
.TTDT_AUTOPOP && time != InfiniteDelay)
1191
_delayTimes[(int)
PInvoke
.TTDT_AUTOPOP] = GetDelayTime(
PInvoke
.TTDT_AUTOPOP);
1192
_delayTimes[(int)
PInvoke
.TTDT_INITIAL] = GetDelayTime(
PInvoke
.TTDT_INITIAL);
1193
_delayTimes[(int)
PInvoke
.TTDT_RESHOW] = GetDelayTime(
PInvoke
.TTDT_RESHOW);
1248
toolInfo.SendMessage(this,
PInvoke
.TTM_SETTOOLINFOW);
1533
result = info.SendMessage(this,
PInvoke
.TTM_GETBUBBLESIZE);
1709
PInvokeCore.SendMessage(this,
PInvoke
.TTM_TRACKPOSITION, 0, PARAM.FromLowHigh(pointX, pointY));
1738
info.SendMessage(this,
PInvoke
.TTM_TRACKACTIVATE);
1739
info.SendMessage(this,
PInvoke
.TTM_DELTOOLW);
1796
if (toolInfo.SendMessage(this,
PInvoke
.TTM_GETTOOLINFOW) != IntPtr.Zero)
1821
IntPtr result = toolInfo.SendMessage(this,
PInvoke
.TTM_SETTOOLINFOW);
1822
result = toolInfo.SendMessage(this,
PInvoke
.TTM_TRACKACTIVATE, true);
1857
IntPtr result = toolInfo.SendMessage(this,
PInvoke
.TTM_ADDTOOLW);
1858
result = toolInfo.SendMessage(this,
PInvoke
.TTM_TRACKACTIVATE, true);
1949
PInvoke
.SetWindowPos(
1962
if (toolInfo.SendMessage(this,
PInvoke
.TTM_GETCURRENTTOOLW) != 0)
2015
message.ResultInternal = (LRESULT)(nint)
PInvoke
.MA_NOACTIVATE;
2073
PInvokeCore.SendMessage(this,
PInvoke
.TTM_ADJUSTRECT, (WPARAM)(BOOL)true, ref rect);
2090
PInvokeCore.SendMessage(this,
PInvoke
.TTM_SETMAXTIPWIDTH, 0, maxwidth);
2096
PInvoke
.SetWindowPos(
2107
PInvoke
.SetWindowPos(
2127
PInvoke
.ShowWindow(this, SHOW_WINDOW_CMD.SW_HIDE);
2240
PInvokeCore.SendMessage(this,
PInvoke
.TTM_SETMAXTIPWIDTH, 0, screen.WorkingArea.Width);
2275
if (nmhdr->code ==
PInvoke
.TTN_SHOW && !_trackPosition)
2279
else if (nmhdr->code ==
PInvoke
.TTN_POP)
2307
case (int)
PInvoke
.TTM_WINDOWFROMPOINT:
System\Windows\Forms\UserControl.cs (2)
248
HWND hwndFocus =
PInvoke
.GetFocus();
254
return HWND == hwndFocus ||
PInvoke
.IsChild(this, hwndFocus);
System\Windows\Forms\VisualStyles\HitTestCode.cs (10)
8
Nowhere = (int)
PInvoke
.HTNOWHERE,
9
Client = (int)
PInvoke
.HTCLIENT,
10
Left = (int)
PInvoke
.HTLEFT,
11
Right = (int)
PInvoke
.HTRIGHT,
12
Top = (int)
PInvoke
.HTTOP,
13
Bottom = (int)
PInvoke
.HTBOTTOM,
14
TopLeft = (int)
PInvoke
.HTTOPLEFT,
15
TopRight = (int)
PInvoke
.HTTOPRIGHT,
16
BottomLeft = (int)
PInvoke
.HTBOTTOMLEFT,
17
BottomRight = (int)
PInvoke
.HTBOTTOMRIGHT
System\Windows\Forms\VisualStyles\VisualStyleInformation.cs (13)
34
public static bool IsEnabledByUser =>
PInvoke
.IsAppThemed();
45
PInvoke
.GetCurrentThemeName(pFilename, filename.Length, null, 0, null, 0);
67
PInvoke
.GetCurrentThemeName(null, 0, pColorScheme, colorScheme.Length, null, 0);
89
PInvoke
.GetCurrentThemeName(null, 0, null, 0, pSize, size.Length);
103
?
PInvoke
.GetThemeDocumentationProperty(ThemeFilename, "DisplayName")
110
?
PInvoke
.GetThemeDocumentationProperty(ThemeFilename, "Company")
117
?
PInvoke
.GetThemeDocumentationProperty(ThemeFilename, "Author")
124
?
PInvoke
.GetThemeDocumentationProperty(ThemeFilename, "Copyright")
131
?
PInvoke
.GetThemeDocumentationProperty(ThemeFilename, "Url")
138
?
PInvoke
.GetThemeDocumentationProperty(ThemeFilename, "Version")
145
?
PInvoke
.GetThemeDocumentationProperty(ThemeFilename, "Description")
153
&&
PInvoke
.GetThemeSysBool(
169
PInvoke
.GetThemeSysInt(
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (35)
100
result = part == 0 || (bool)
PInvoke
.IsThemePartDefined(hTheme, part, 0);
106
using
PInvoke
.OpenThemeDataScope handle = new(HWND.Null, className);
110
result =
PInvoke
.IsThemePartDefined(handle, part, 0);
229
_lastHResult =
PInvoke
.DrawThemeBackground(htheme, dc, Part, State, bounds, null);
233
_lastHResult =
PInvoke
.DrawThemeBackground(HTHEME, dc, Part, State, bounds, null);
256
_lastHResult =
PInvoke
.DrawThemeBackground(htheme, dc, Part, State, bounds, clipRectangle);
260
_lastHResult =
PInvoke
.DrawThemeBackground(HTHEME, dc, Part, State, bounds, clipRectangle);
282
_lastHResult =
PInvoke
.DrawThemeEdge(
348
_lastHResult =
PInvoke
.DrawThemeParentBackground(childControl.HWND, hdc, bounds);
389
_lastHResult =
PInvoke
.DrawThemeText(
420
_lastHResult =
PInvoke
.GetThemeBackgroundContentRect(HTHEME, dc, Part, State, bounds, out RECT rect);
437
_lastHResult =
PInvoke
.GetThemeBackgroundExtent(HTHEME, hdc, Part, State, contentBounds, out RECT extents);
457
_lastHResult =
PInvoke
.GetThemeBackgroundRegion(HTHEME, hdc, Part, State, bounds, &hrgn);
481
_lastHResult =
PInvoke
.GetThemeBool(HTHEME, Part, State, (THEME_PROPERTY_SYMBOL_ID)prop, out BOOL value);
493
_lastHResult =
PInvoke
.GetThemeColor(HTHEME, Part, State, (THEME_PROPERTY_SYMBOL_ID)prop, out COLORREF color);
505
_lastHResult =
PInvoke
.GetThemeEnumValue(HTHEME, Part, State, (THEME_PROPERTY_SYMBOL_ID)prop, out int value);
520
_lastHResult =
PInvoke
.GetThemeFilename(HTHEME, Part, State, (THEME_PROPERTY_SYMBOL_ID)prop, pFilename, filename.Length);
537
_lastHResult =
PInvoke
.GetThemeFont(this, hdc, Part, State, (int)prop, out LOGFONT logfont);
564
_lastHResult =
PInvoke
.GetThemeInt(HTHEME, Part, State, (THEME_PROPERTY_SYMBOL_ID)prop, out int value);
587
_lastHResult =
PInvoke
.GetThemePartSize(htheme, dc, Part, State, null, (THEMESIZE)type, out SIZE dpiSize);
591
_lastHResult =
PInvoke
.GetThemePartSize(HTHEME, dc, Part, State, null, (THEMESIZE)type, out SIZE size);
606
_lastHResult =
PInvoke
.GetThemePartSize(HTHEME, hdc, Part, State, bounds, (THEMESIZE)type, out SIZE size);
618
_lastHResult =
PInvoke
.GetThemePosition(HTHEME, Part, State, (THEME_PROPERTY_SYMBOL_ID)prop, out Point point);
633
_lastHResult =
PInvoke
.GetThemeMargins(HTHEME, hdc, Part, State, (THEME_PROPERTY_SYMBOL_ID)prop, null, out MARGINS margins);
649
_lastHResult =
PInvoke
.GetThemeString(HTHEME, Part, State, (int)prop, pString, aString.Length);
664
_lastHResult =
PInvoke
.GetThemeTextExtent(
687
_lastHResult =
PInvoke
.GetThemeTextExtent(
709
_lastHResult =
PInvoke
.GetThemeTextMetrics(HTHEME, hdc, Part, State, out TEXTMETRICW tm);
721
_lastHResult =
PInvoke
.HitTestThemeBackground(
755
_lastHResult =
PInvoke
.HitTestThemeBackground(
774
return
PInvoke
.IsThemeBackgroundPartiallyTransparent(HTHEME, Part, State);
865
private static
PInvoke
.OpenThemeDataScope OpenThemeData(HWND hwnd, string classList)
867
PInvoke
.OpenThemeDataScope htheme = new(hwnd, classList);
889
HTHEME hTheme =
PInvoke
.OpenThemeData(hWndRef, className);
900
PInvoke
.CloseThemeData(Handle);
System.Windows.Forms.Design (193)
System\ComponentModel\Design\CollectionEditor.FilterListBox.cs (4)
58
PInvoke
.SetFocus(PropertyGrid);
69
PInvokeCore.SendMessage(
PInvoke
.GetFocus(), PInvokeCore.WM_KEYDOWN, _lastKeyDown.WParamInternal, _lastKeyDown.LParamInternal);
85
PInvoke
.SetFocus(PropertyGrid);
96
HWND hwnd =
PInvoke
.GetFocus();
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (2)
94
PInvoke
.GetTextExtentPoint32W(hdc, ps, s.Length, (SIZE*)(void*)&textSize);
100
PInvoke
.GetTextMetrics(hdc, &tm);
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (4)
91
PInvoke
.MsgWaitForMultipleObjectsEx(
144
HWND hWndCapture =
PInvoke
.GetCapture();
148
PInvoke
.ReleaseCapture();
172
&& m.WParamInternal.LOWORD ==
PInvoke
.WA_INACTIVE
System\ComponentModel\Design\DesignerActionUI.cs (1)
752
PInvoke
.SetActiveWindow(_designerActionHost);
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (5)
56
HWND focusedControl =
PInvoke
.GetFocus();
62
focusedControl =
PInvoke
.GetFocus();
89
HWND hwndActivating =
PInvoke
.GetActiveWindow();
226
if ((nint)m.WParamInternal ==
PInvoke
.WA_INACTIVE)
258
HWND focusedControlPtr =
PInvoke
.GetFocus();
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
187
PInvoke
.DrawText(hdc, t, Text.Length, ref rect, DRAW_TEXT_FORMAT.DT_CALCRECT);
System\ComponentModel\Design\MultilineStringEditor.OleCallback.cs (3)
31
HRESULT hr =
PInvoke
.CreateILockBytesOnHGlobal(default, fDeleteOnRelease: true, pLockBytes);
37
hr =
PInvoke
.StgCreateDocfileOnILockBytes(
63
HRESULT hr =
PInvoke
.ReadClassStg(lpstg, out Guid realClsid);
System\ComponentModel\Design\ObjectSelectorEditor.cs (4)
68
uint exstyle = (uint)PInvokeCore.SendMessage(hwnd,
PInvoke
.TVM_GETEXTENDEDSTYLE);
69
exstyle |=
PInvoke
.TVS_EX_DOUBLEBUFFER |
PInvoke
.TVS_EX_FADEINOUTEXPANDOS;
70
PInvokeCore.SendMessage(hwnd,
PInvoke
.TVM_SETEXTENDEDSTYLE, (WPARAM)0, (LPARAM)exstyle);
System\ComponentModel\Design\ObjectSelectorEditor.Selector.cs (2)
194
m.ResultInternal = (LRESULT)(m.ResultInternal | (int)
PInvoke
.DLGC_WANTALLKEYS);
205
if (nmtv->code ==
PInvoke
.NM_CLICK)
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.ColorCellAccessibleObject.cs (1)
40
PInvoke
.ClientToScreen(palette, ref pt);
System\Drawing\Design\ColorEditor.ColorPalette.cs (3)
221
PInvoke
.NotifyWinEvent(
242
HWND hwndFocus =
PInvoke
.GetFocus();
259
PInvoke
.SetFocus(hwndFocus);
System\Drawing\Design\ColorEditor.CustomColorDialog.cs (39)
64
PInvoke
.SendDlgItemMessage(
66
(int)
PInvoke
.COLOR_HUE,
68
(WPARAM)(
PInvoke
.EC_LEFTMARGIN |
PInvoke
.EC_RIGHTMARGIN),
70
PInvoke
.SendDlgItemMessage(
72
(int)
PInvoke
.COLOR_SAT,
74
(WPARAM)(
PInvoke
.EC_LEFTMARGIN |
PInvoke
.EC_RIGHTMARGIN),
76
PInvoke
.SendDlgItemMessage(
78
(int)
PInvoke
.COLOR_LUM,
80
(WPARAM)(
PInvoke
.EC_LEFTMARGIN |
PInvoke
.EC_RIGHTMARGIN),
82
PInvoke
.SendDlgItemMessage(
84
(int)
PInvoke
.COLOR_RED,
86
(WPARAM)(
PInvoke
.EC_LEFTMARGIN |
PInvoke
.EC_RIGHTMARGIN),
88
PInvoke
.SendDlgItemMessage(
90
(int)
PInvoke
.COLOR_GREEN,
92
(WPARAM)(
PInvoke
.EC_LEFTMARGIN |
PInvoke
.EC_RIGHTMARGIN),
94
PInvoke
.SendDlgItemMessage(
96
(int)
PInvoke
.COLOR_BLUE,
98
(WPARAM)(
PInvoke
.EC_LEFTMARGIN |
PInvoke
.EC_RIGHTMARGIN),
100
HWND hwndCtl =
PInvoke
.GetDlgItem((HWND)hwnd, (int)
PInvoke
.COLOR_MIX);
101
PInvoke
.EnableWindow(hwndCtl, false);
102
PInvoke
.SetWindowPos(
107
hwndCtl =
PInvoke
.GetDlgItem((HWND)hwnd, (int)MESSAGEBOX_RESULT.IDOK);
108
PInvoke
.EnableWindow(hwndCtl, false);
109
PInvoke
.SetWindowPos(
118
if (PARAM.LOWORD(wParam) == (int)
PInvoke
.COLOR_ADD)
121
byte red = (byte)
PInvoke
.GetDlgItemInt((HWND)hwnd, (int)
PInvoke
.COLOR_RED, &success, false);
124
byte green = (byte)
PInvoke
.GetDlgItemInt((HWND)hwnd, (int)
PInvoke
.COLOR_GREEN, &success, false);
127
byte blue = (byte)
PInvoke
.GetDlgItemInt((HWND)hwnd, (int)
PInvoke
.COLOR_BLUE, &success, false);
135
(LPARAM)
PInvoke
.GetDlgItem((HWND)hwnd, (int)MESSAGEBOX_RESULT.IDOK));
System\Drawing\Design\FontEditor.cs (2)
38
HWND hwndFocus =
PInvoke
.GetFocus();
50
PInvoke
.SetFocus(hwndFocus);
System\Drawing\Design\IconEditor.cs (2)
73
HWND hwndFocus =
PInvoke
.GetFocus();
86
PInvoke
.SetFocus(hwndFocus);
System\Drawing\Design\ImageEditor.cs (2)
102
HWND hwndFocus =
PInvoke
.GetFocus();
115
PInvoke
.SetFocus(hwndFocus);
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (6)
210
PInvoke
.GetCursorPos(out Point point);
246
PInvoke
.GetCursorPos(out Point point);
295
PInvoke
.GetUpdateRgn(m.HWND, hrgn, true);
300
PInvoke
.GetUpdateRect(m.HWND, &clip, true);
323
? (LRESULT)
PInvoke
.HTTRANSPARENT
324
: (LRESULT)(int)
PInvoke
.HTCLIENT;
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.MouseHook.cs (7)
79
_mouseHookHandle =
PInvoke
.SetWindowsHookEx(
93
if (_isHooked && nCode ==
PInvoke
.HC_ACTION && lparam != 0)
125
return
PInvoke
.CallNextHookEx(_mouseHookHandle, nCode, wparam, lparam);
134
if (!
PInvoke
.UnhookWindowsHookEx(_mouseHookHandle))
163
|| (hwnd != adornerWindow.DesignerFrame.Handle &&
PInvoke
.IsChild(adornerWindow.DesignerFrame, hwnd)))
185
_lastLButtonDownTimeStamp =
PInvoke
.GetMessageTime();
189
int lButtonDoubleClickTimeStamp =
PInvoke
.GetMessageTime();
System\Windows\Forms\Design\Behavior\BehaviorService.cs (6)
51
private static MessageId WM_GETALLSNAPLINES { get; } =
PInvoke
.RegisterWindowMessage("WM_GETALLSNAPLINES");
52
private static MessageId WM_GETRECENTSNAPLINES { get; } =
PInvoke
.RegisterWindowMessage("WM_GETRECENTSNAPLINES");
456
if (uiService?.GetDialogOwnerWindow() is { } hWnd && hWnd.Handle != 0 && hWnd.Handle !=
PInvoke
.GetActiveWindow())
458
PInvoke
.SetActiveWindow(new HandleRef<HWND>(hWnd, (HWND)hWnd.Handle));
587
cursor = new Cursor(
PInvoke
.GetCursor());
711
PInvoke
.TrackMouseEvent(ref _trackMouseEvent);
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (2)
483
PInvoke
.ClientToScreen(_behaviorService.AdornerWindowControl, ref mouseLocAbs);
548
PInvoke
.ClientToScreen(_behaviorService.AdornerWindowControl, ref _lastMouseAbs);
System\Windows\Forms\Design\CommandSet.cs (3)
689
PInvoke
.GetCursorPos(out Point p);
690
HWND hwnd =
PInvoke
.WindowFromPoint(p);
693
PInvokeCore.SendMessage(hwnd, PInvokeCore.WM_SETCURSOR, hwnd, (nint)
PInvoke
.HTCLIENT);
System\Windows\Forms\Design\ComponentTray.cs (5)
253
PInvoke
.NotifyWinEvent(
257
(int)
PInvoke
.CHILDID_SELF);
268
PInvoke
.NotifyWinEvent(
272
(int)
PInvoke
.CHILDID_SELF);
2165
_ctrlSelect =
PInvoke
.GetKeyState((int)Keys.ControlKey) != 0;
System\Windows\Forms\Design\ControlDesigner.cs (8)
2067
PInvoke
.GetUpdateRgn(m.HWND, hrgn, false);
2068
PInvoke
.GetUpdateRect(m.HWND, &clip, false);
2349
uint elapsed =
PInvoke
.GetTickCount() - _lastClickMessageTime;
2366
_lastClickMessageTime =
PInvoke
.GetTickCount();
2437
HookChildHandles(
PInvoke
.GetWindow(hwndChild, GET_WINDOW_CMD.GW_CHILD));
2440
hwndChild =
PInvoke
.GetWindow(hwndChild, GET_WINDOW_CMD.GW_HWNDNEXT);
2456
s_currentProcessId =
PInvoke
.GetCurrentProcessId();
2475
HookChildHandles(
PInvoke
.GetWindow(Control, GET_WINDOW_CMD.GW_CHILD));
System\Windows\Forms\Design\DesignerFrame.cs (6)
91
PInvoke
.RedrawWindow(_designer, lprcUpdate: null, HRGN.Null, REDRAW_WINDOW_FLAGS.RDW_FRAME);
121
PInvoke
.NotifyWinEvent(
125
(int)
PInvoke
.CHILDID_SELF);
406
PInvoke
.SetParent(control, this);
407
PInvoke
.SetWindowPos(
516
PInvoke
.SetWindowPos(
System\Windows\Forms\Design\DesignerUtils.cs (17)
158
int lastXY = (int)
PInvoke
.GetMessagePos();
255
PInvoke
.RoundRect(hDC, bounds.Left, bounds.Top, bounds.Right, bounds.Bottom, 2, 2);
284
PInvoke
.RoundRect(
447
(LPARAM)(uint)(
PInvoke
.PRF_CHILDREN |
PInvoke
.PRF_CLIENT |
PInvoke
.PRF_ERASEBKGND |
PInvoke
.PRF_NONCLIENT));
535
PInvoke
.GetTextMetrics(dc, &metrics);
822
=> (uint)PInvokeCore.SendMessage(handle,
PInvoke
.TVM_GETEXTENDEDSTYLE);
835
PInvoke
.SetWindowTheme(hwnd, "Explorer", pszSubIdList: null);
837
exstyle |=
PInvoke
.TVS_EX_DOUBLEBUFFER |
PInvoke
.TVS_EX_FADEINOUTEXPANDOS;
838
PInvokeCore.SendMessage(treeView,
PInvoke
.TVM_SETEXTENDEDSTYLE, 0, (nint)exstyle);
850
PInvoke
.SetWindowTheme(hwnd, "Explorer", null);
853
PInvoke
.LVM_SETEXTENDEDLISTVIEWSTYLE,
854
(WPARAM)
PInvoke
.LVS_EX_DOUBLEBUFFER,
855
(LPARAM)
PInvoke
.LVS_EX_DOUBLEBUFFER);
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (1)
307
HRESULT hr =
PInvoke
.LoadTypeLib(inprocServer, &pTLB);
System\Windows\Forms\Design\DocumentDesigner.cs (9)
1082
PInvoke
.RedrawWindow(control, lprcUpdate: null, HRGN.Null, REDRAW_WINDOW_FLAGS.RDW_FRAME);
1113
PInvoke
.NotifyWinEvent(
1117
(int)
PInvoke
.CHILDID_SELF);
1121
PInvoke
.NotifyWinEvent(
1125
(int)
PInvoke
.CHILDID_SELF);
1148
PInvoke
.NotifyWinEvent(
1152
(int)
PInvoke
.CHILDID_SELF);
1158
PInvoke
.NotifyWinEvent(
1162
(int)
PInvoke
.CHILDID_SELF);
System\Windows\Forms\Design\FolderNameEditor.FolderBrowser.cs (3)
53
uint mergedOptions = (uint)Style |
PInvoke
.BIF_NEWDIALOGSTYLE;
54
if ((mergedOptions & (int)
PInvoke
.BIF_NEWDIALOGSTYLE) != 0)
63
owner is not null ? (HWND)owner.Handle :
PInvoke
.GetActiveWindow(),
System\Windows\Forms\Design\FolderNameEditor.FolderBrowserFolder.cs (12)
17
Desktop = (int)
PInvoke
.CSIDL_DESKTOP,
18
Favorites = (int)
PInvoke
.CSIDL_FAVORITES,
19
MyComputer = (int)
PInvoke
.CSIDL_DRIVES,
20
MyDocuments = (int)
PInvoke
.CSIDL_PERSONAL,
21
MyPictures = (int)
PInvoke
.CSIDL_MYPICTURES,
22
NetAndDialUpConnections = (int)
PInvoke
.CSIDL_CONNECTIONS,
23
NetworkNeighborhood = (int)
PInvoke
.CSIDL_NETWORK,
24
Printers = (int)
PInvoke
.CSIDL_PRINTERS,
25
Recent = (int)
PInvoke
.CSIDL_RECENT,
26
SendTo = (int)
PInvoke
.CSIDL_SENDTO,
27
StartMenu = (int)
PInvoke
.CSIDL_STARTMENU,
28
Templates = (int)
PInvoke
.CSIDL_TEMPLATES
System\Windows\Forms\Design\FolderNameEditor.FolderBrowserStyles.cs (7)
11
BrowseForComputer = (int)
PInvoke
.BIF_BROWSEFORCOMPUTER,
12
BrowseForEverything = (int)
PInvoke
.BIF_BROWSEINCLUDEFILES,
13
BrowseForPrinter = (int)
PInvoke
.BIF_BROWSEFORPRINTER,
14
RestrictToDomain = (int)
PInvoke
.BIF_DONTGOBELOWDOMAIN,
15
RestrictToFilesystem = (int)
PInvoke
.BIF_RETURNONLYFSDIRS,
16
RestrictToSubfolders = (int)
PInvoke
.BIF_RETURNFSANCESTORS,
17
ShowTextBox = (int)
PInvoke
.BIF_EDITBOX
System\Windows\Forms\Design\FormDocumentDesigner.cs (2)
401
PInvoke
.RedrawWindow(control, lprcUpdate: null, HRGN.Null, REDRAW_WINDOW_FLAGS.RDW_FRAME);
413
PInvoke
.RedrawWindow(control, lprcUpdate: null, HRGN.Null, REDRAW_WINDOW_FLAGS.RDW_FRAME);
System\Windows\Forms\Design\GroupBoxDesigner.cs (2)
113
if (m.ResultInternal ==
PInvoke
.HTTRANSPARENT)
115
m.ResultInternal = (LRESULT)(nint)
PInvoke
.HTCLIENT;
System\Windows\Forms\Design\ImageListImageEditor.cs (2)
67
HWND hwndFocus =
PInvoke
.GetFocus();
85
PInvoke
.SetFocus(hwndFocus);
System\Windows\Forms\Design\ListBoxDesigner.cs (2)
186
PInvokeCore.SendMessage(listBox,
PInvoke
.LB_RESETCONTENT);
187
PInvokeCore.SendMessage(listBox,
PInvoke
.LB_ADDSTRING, 0, name);
System\Windows\Forms\Design\ListViewDesigner.cs (4)
77
HWND hwndHit =
PInvoke
.ChildWindowFromPointEx(listView, listViewPoint, CWP_FLAGS.CWP_SKIPINVISIBLE);
81
HWND headerHwnd = (HWND)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETHEADER);
86
PInvokeCore.SendMessage(headerHwnd,
PInvoke
.HDM_HITTEST, 0, ref _hdrhit);
138
if (nmhdr->code ==
PInvoke
.HDN_ENDTRACKW)
System\Windows\Forms\Design\OleDragDropHandler.cs (2)
493
PInvoke
.TranslateMessage(msg);
494
PInvoke
.DispatchMessage(&msg);
System\Windows\Forms\Design\PbrsForward.cs (1)
94
?
PInvoke
.GetFocus()
System\Windows\Forms\Design\ScrollableControlDesigner.cs (2)
34
if (hitTest is ((int)
PInvoke
.HTVSCROLL) or ((int)
PInvoke
.HTHSCROLL))
System\Windows\Forms\Design\TabControlDesigner.cs (2)
605
if (m.ResultInternal ==
PInvoke
.HTTRANSPARENT)
607
m.ResultInternal = (LRESULT)(nint)
PInvoke
.HTCLIENT;
System\Windows\Forms\Design\ToolStripAdornerWindowService.cs (1)
288
m.ResultInternal = (LRESULT)
PInvoke
.HTTRANSPARENT;
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (1)
325
&& !
PInvoke
.IsChild(_toolStripContainer, associatedControl))
System\Windows\Forms\Design\ToolStripItemDesigner.cs (2)
961
PInvoke
.NotifyWinEvent(
973
PInvoke
.NotifyWinEvent(
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (2)
183
PInvoke
.NotifyWinEvent(
188
PInvoke
.NotifyWinEvent(
System\Windows\Forms\Design\TreeViewDesigner.cs (1)
54
PInvokeCore.SendMessage(Control,
PInvoke
.TVM_HITTEST, 0, ref _tvhit);
System.Windows.Forms.IntegrationTests.Common (3)
GlobalUsings.cs (1)
5
global using PInvoke = Windows.Win32.
PInvoke
;
TestHelpers.cs (2)
415
/// <seealso cref="
PInvoke
.SetForegroundWindow{T}(T)"/>
440
PInvoke
.SetForegroundWindow(mainWindowHandle);
System.Windows.Forms.Interop.Tests (3)
PropertyGridTests.cs (3)
88
handle =
PInvoke
.CreateActCtx(&context);
99
if (!
PInvoke
.ActivateActCtx(handle, &cookie))
110
if (!
PInvoke
.DeactivateActCtx(0, cookie))
System.Windows.Forms.Primitives (57)
Interop\Richedit\Interop.PARAFORMAT.cs (1)
22
public fixed int rgxTabs[(int)
PInvoke
.MAX_TAB_STOPS];
Microsoft\VisualStudio\Shell\IVsPerPropertyBrowsing.cs (1)
183
/// <see cref="ITypeInfo.GetDocumentation(int, BSTR*, BSTR*, out uint, BSTR*)"/> with <see cref="
PInvoke
.MEMBERID_NIL"/>.
System\Windows\Forms\AccessibilityExtensions.cs (2)
11
/// <inheritdoc cref="
PInvoke
.LresultFromObject(Guid*, WPARAM, IUnknown*)"/>
18
return
PInvoke
.LresultFromObject(
System\Windows\Forms\Automation\UiaTextProvider.cs (1)
125
return (int)
PInvoke
.SendInput(1, i, sizeof(INPUT));
System\Windows\Forms\Automation\UiaTextRange.cs (5)
362
PInvoke
.GetCaretPos(out Point endlinePoint);
879
=> (int)(((int)windowStyle &
PInvoke
.ES_UPPERCASE) != 0 ? CapStyle.AllCap : CapStyle.None);
897
=> (int)(((int)windowStyle &
PInvoke
.ES_CENTER) != 0
899
: ((int)windowStyle &
PInvoke
.ES_RIGHT) != 0
916
PInvoke
.UiaGetReservedNotSupportedValue(&unknown).ThrowOnFailure();
System\Windows\Forms\DeviceContextExtensions.cs (8)
47
PInvoke
.FillRect(
92
PInvoke
.MoveToEx(hdc, lines[i], lines[i + 1], &oldPoint);
93
PInvoke
.LineTo(hdc, lines[i + 2], lines[i + 3]);
94
PInvoke
.MoveToEx(hdc, oldPoint.X, oldPoint.Y, lppt: null);
101
/// Calls <see cref="
PInvoke
.GetNearestColor(HDC, COLORREF)"/> to get the nearest color for the given
119
Color newColor = ColorTranslator.FromWin32((int)
PInvoke
.GetNearestColor(hdc, (COLORREF)(uint)ColorTranslator.ToWin32(color)).Value);
146
PInvoke
.Ellipse(hdc, left, top, right, bottom);
156
PInvoke
.FillRect(
System\Windows\Forms\FileDialogCustomPlace.cs (2)
70
int result =
PInvoke
.SHGetKnownFolderPath(reference, 0, HANDLE.Null, (PWSTR*)path);
78
return
PInvoke
.SHCreateShellItem(filePathString);
System\Windows\Forms\Internals\ScaleHelper.cs (15)
71
return (int)
PInvoke
.GetDpiForSystem();
81
HRESULT result =
PInvoke
.GetProcessDpiAwareness(
109
DPI_AWARENESS_CONTEXT dpiAwareness =
PInvoke
.GetThreadDpiAwarenessContextInternal();
311
PInvoke
.GetSystemMetricsForDpi(SYSTEM_METRICS_INDEX.SM_CXSMICON, OneHundredPercentLogicalDpi),
312
PInvoke
.GetSystemMetricsForDpi(SYSTEM_METRICS_INDEX.SM_CXSMICON, OneHundredPercentLogicalDpi))
373
DPI_AWARENESS_CONTEXT dpiAwareness =
PInvoke
.GetThreadDpiAwarenessContextInternal();
402
PInvoke
.GetProcessDpiAwareness(HANDLE.Null, out PROCESS_DPI_AWARENESS processDpiAwareness);
416
return
PInvoke
.IsProcessDPIAware() ? HighDpiMode.SystemAware : HighDpiMode.DpiUnaware;
429
int width =
PInvoke
.GetCurrentSystemMetrics(SYSTEM_METRICS_INDEX.SM_CXSMICON, (uint)dpi);
430
int height =
PInvoke
.GetCurrentSystemMetrics(SYSTEM_METRICS_INDEX.SM_CYSMICON, (uint)dpi);
451
PInvoke
.IsValidDpiAwarenessContext(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2)
456
PInvoke
.IsValidDpiAwarenessContext(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED)
462
success =
PInvoke
.SetProcessDpiAwarenessContext(dpiAwareness);
474
success =
PInvoke
.SetProcessDpiAwareness(dpiAwareness).Succeeded;
488
success =
PInvoke
.SetProcessDPIAware();
System\Windows\Forms\Internals\ScaleHelper.DpiAwarenessScope.cs (7)
42
_originalDpiAwarenessContext =
PInvoke
.GetThreadDpiAwarenessContext();
45
if (!
PInvoke
.AreDpiAwarenessContextsEqual(_originalDpiAwarenessContext, context))
47
if (
PInvoke
.SetThreadDpiAwarenessContext(context) == 0)
55
_originalDpiHostingBehavior =
PInvoke
.GetThreadDpiHostingBehavior();
61
_originalDpiHostingBehavior =
PInvoke
.SetThreadDpiHostingBehavior(behavior);
77
&&
PInvoke
.SetThreadDpiHostingBehavior(_originalDpiHostingBehavior) == DPI_HOSTING_BEHAVIOR.DPI_HOSTING_BEHAVIOR_INVALID)
83
&&
PInvoke
.SetThreadDpiAwarenessContext(_originalDpiAwarenessContext) == IntPtr.Zero)
System\Windows\Forms\Internals\ThemingScope.cs (7)
29
&& !(
PInvoke
.GetCurrentActCtx(¤t) && current == s_hActCtx))
32
bool success =
PInvoke
.ActivateActCtx(s_hActCtx, &cookie);
42
bool success =
PInvoke
.DeactivateActCtx(0, _cookie);
60
dwFlags =
PInvoke
.ACTCTX_FLAG_HMODULE_VALID |
PInvoke
.ACTCTX_FLAG_RESOURCE_NAME_VALID,
66
s_hActCtx =
PInvoke
.CreateActCtx(act);
106
s_hActCtx =
PInvoke
.CreateActCtx(act);
Windows\Win32\Interop.RegisteredMessage.cs (2)
17
s_wmMouseEnterMessage =
PInvoke
.RegisterWindowMessage("WinFormsMouseEnter");
30
s_wmUnSubclass =
PInvoke
.RegisterWindowMessage("WinFormsUnSubclass");
Windows\Win32\UI\HiDpi\DPI_AWARENESS_CONTEXT.cs (1)
20
&& (bool)
PInvoke
.AreDpiAwarenessContextsEqual(this, dpiContext));
Windows\Win32\UI\Shell\FolderBrowserHelper.cs (5)
12
/// Helper for the legacy <see cref="
PInvoke
.SHGetPathFromIDListEx(ITEMIDLIST*, PWSTR, uint, GPFIDL_FLAGS)" /> API.
24
PInvoke
.SHGetSpecialFolderLocation(rootFolderCsidl, out ITEMIDLIST* rootFolderId);
27
PInvoke
.SHGetSpecialFolderLocation((int)Environment.SpecialFolder.Desktop, out rootFolderId);
53
ITEMIDLIST* resultId =
PInvoke
.SHBrowseForFolder(&bi);
64
bool success =
PInvoke
.SHGetPathFromIDListEx(resultId, b, (uint)buffer.Length, GPFIDL_FLAGS.GPFIDL_UNCPRINTER);
System.Windows.Forms.Primitives.Tests (60)
Interop\Mocks\MockCursor.cs (2)
19
_handle =
PInvoke
.LoadCursor(HINSTANCE.Null, nResourceId);
30
PInvoke
.DestroyCursor(_handle);
Interop\Ole32\IPictureTests.cs (2)
19
using MockCursor arrow = new(
PInvoke
.IDC_ARROW);
35
using MockCursor arrow = new(
PInvoke
.IDC_ARROW);
Interop\Shell32\ShellItemTests.cs (1)
16
HRESULT result =
PInvoke
.SHParseDisplayName(path, pbc: null, out ITEMIDLIST* ppidl, 0, &rgflnOut);
Interop\User32\GetWindowTextTests.cs (3)
38
PInvoke
.DestroyWindow(windowHandle);
65
PInvoke
.SetWindowText(hWnd, text);
73
PInvoke
.SetWindowText(hWnd, text);
System\Windows\Forms\Automation\UiaTextProviderTests.cs (13)
20
| (WINDOW_STYLE)(
PInvoke
.ES_MULTILINE |
PInvoke
.ES_LEFT |
PInvoke
.ES_AUTOHSCROLL |
PInvoke
.ES_AUTOVSCROLL));
24
Assert.NotEqual(0, ((int)actual &
PInvoke
.ES_MULTILINE));
34
| (WINDOW_STYLE)(
PInvoke
.ES_LEFT |
PInvoke
.ES_AUTOHSCROLL |
PInvoke
.ES_AUTOVSCROLL));
38
Assert.Equal(0, ((int)actual &
PInvoke
.ES_MULTILINE));
47
| (WINDOW_STYLE)(
PInvoke
.ES_MULTILINE |
PInvoke
.ES_LEFT |
PInvoke
.ES_AUTOHSCROLL |
PInvoke
.ES_AUTOVSCROLL));
System\Windows\Forms\Automation\UiaTextRangeTests.cs (15)
466
PInvoke
.UiaGetReservedNotSupportedValue(&unknown).ThrowOnFailure();
533
providerMock.Setup(m => m.WindowStyle).Returns(
PInvoke
.ES_LEFT);
1119
[InlineData(
PInvoke
.ES_CENTER, (int)HorizontalTextAlignment.Centered)]
1120
[InlineData(
PInvoke
.ES_LEFT, (int)HorizontalTextAlignment.Left)]
1121
[InlineData(
PInvoke
.ES_RIGHT, (int)HorizontalTextAlignment.Right)]
1134
[InlineData((
PInvoke
.ES_UPPERCASE |
PInvoke
.ES_LEFT |
PInvoke
.ES_MULTILINE |
PInvoke
.ES_READONLY |
PInvoke
.ES_AUTOHSCROLL), (int)CapStyle.AllCap)]
1135
[InlineData((
PInvoke
.ES_LOWERCASE |
PInvoke
.ES_LEFT |
PInvoke
.ES_MULTILINE |
PInvoke
.ES_READONLY |
PInvoke
.ES_AUTOHSCROLL), (int)CapStyle.None)]
System\Windows\Forms\DeviceContextHdcScopeTests.cs (13)
34
GDI_REGION_TYPE regionType =
PInvoke
.GetClipBox(scope, &clipRect);
49
GDI_REGION_TYPE regionType =
PInvoke
.GetClipBox(scope, &clipRect);
64
GDI_REGION_TYPE regionType =
PInvoke
.GetClipBox(scope, &clipRect);
79
GDI_REGION_TYPE regionType =
PInvoke
.GetClipBox(scope, &clipRect);
95
GDI_REGION_TYPE originalRegionType =
PInvoke
.GetClipBox(hdc, &originalClipRect);
117
GDI_REGION_TYPE regionType =
PInvoke
.GetClipBox(scope, &clipRect);
130
PInvoke
.GetClipBox(hdc, ¤tClipRect);
144
GDI_REGION_TYPE regionType =
PInvoke
.GetClipBox(scope, &clipRect);
154
PInvoke
.GetClipBox(hdc, ¤tClipRect);
167
GDI_REGION_TYPE regionType =
PInvoke
.GetClipBox(scope, &clipRect);
177
PInvoke
.GetClipBox(hdc, ¤tClipRect);
190
GDI_REGION_TYPE regionType =
PInvoke
.GetClipBox(scope, &clipRect);
200
PInvoke
.GetClipBox(hdc, ¤tClipRect);
System\Windows\Forms\DeviceContextScopeTests.cs (9)
31
type =
PInvoke
.GetRgnBox(test, &rect2);
49
type =
PInvoke
.GetRgnBox(regionScope, &rect);
69
HGDIOBJ current =
PInvoke
.GetCurrentObject(dcScope, OBJ_TYPE.OBJ_BRUSH);
71
HDC_MAP_MODE currentMode =
PInvoke
.GetMapMode(dcScope);
81
current =
PInvoke
.GetCurrentObject(dcScope, OBJ_TYPE.OBJ_BRUSH);
88
currentMode =
PInvoke
.GetMapMode(dcScope);
90
current =
PInvoke
.GetCurrentObject(dcScope, OBJ_TYPE.OBJ_BRUSH);
95
currentMode =
PInvoke
.GetMapMode(dcScope);
104
current =
PInvoke
.GetCurrentObject(dcScope, OBJ_TYPE.OBJ_BRUSH);
Windows\Win32\RegionTests.cs (2)
24
int result =
PInvoke
.GetClipRgn(hdc, hregion);
59
GDI_REGION_TYPE type =
PInvoke
.GetRgnBox(retrievedRegion, &rect);
System.Windows.Forms.Primitives.TestUtilities (27)
DeviceContextState.cs (11)
28
MapMode =
PInvoke
.GetMapMode(hdc);
29
BackColor =
PInvoke
.GetBkColor(hdc);
30
TextColor =
PInvoke
.GetTextColor(hdc);
31
Rop2Mode =
PInvoke
.GetROP2(hdc);
32
TextAlign =
PInvoke
.GetTextAlign(hdc);
33
BackgroundMode =
PInvoke
.GetBkMode(hdc);
36
PInvoke
.GetWorldTransform(hdc, (XFORM*)(void*)&transform);
40
PInvoke
.GetBrushOrgEx(hdc, &point);
43
var hfont =
PInvoke
.GetCurrentObject(hdc, OBJ_TYPE.OBJ_FONT);
47
var hpen =
PInvoke
.GetCurrentObject(hdc, OBJ_TYPE.OBJ_PEN);
51
var hbrush =
PInvoke
.GetCurrentObject(hdc, OBJ_TYPE.OBJ_BRUSH);
PlatformDetection.Windows.cs (2)
156
Assert.True(OpenProcessToken(
PInvoke
.GetCurrentProcess(), TOKEN_READ, out IntPtr processToken));
167
PInvoke
.CloseHandle((HANDLE)processToken);
Win32\EditClass.cs (1)
8
public EditClass() : base(
PInvoke
.WC_EDIT)
Win32\Window.cs (1)
46
PInvoke
.DestroyWindow(Handle);
Win32\WindowClass.cs (10)
13
=> new(
PInvoke
.CW_USEDEFAULT,
PInvoke
.CW_USEDEFAULT,
PInvoke
.CW_USEDEFAULT,
PInvoke
.CW_USEDEFAULT);
71
cursor =
PInvoke
.LoadCursor(HINSTANCE.Null, (PCWSTR)(char*)
PInvoke
.IDC_ARROW);
115
ATOM atom =
PInvoke
.RegisterClass(in _wndClass);
164
window =
PInvoke
.CreateWindowEx(
182
window =
PInvoke
.CreateWindowEx(
224
PInvoke
.PostQuitMessage(0);
Windows\Win32\System\Com\ComClassFactory.cs (2)
27
_instance =
PInvoke
.LoadLibraryEx(filePath, default);
41
FARPROC proc =
PInvoke
.GetProcAddress(_instance, ExportMethodName);
System.Windows.Forms.Tests (1080)
SerializableTypesTests.cs (2)
96
Assert.True(
PInvoke
.ImageList.GetIconSize(new HandleRef<HIMAGELIST>(this, nativeImageList.HIMAGELIST), out int x, out int y));
99
Assert.True(
PInvoke
.ImageList.GetImageInfo(new HandleRef<HIMAGELIST>(this, nativeImageList.HIMAGELIST), 0, out IMAGEINFO imageInfo));
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (2)
2169
Assert.Equal((int)AccessibleRole.Window, iAccessible.get_accRole((int)
PInvoke
.CHILDID_SELF));
2737
const int expectedIdChild = (int)
PInvoke
.CHILDID_SELF;
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (3)
270
int actual = (int)PInvokeCore.SendMessage(comboBox,
PInvoke
.CB_GETTOPINDEX);
344
PInvokeCore.SendMessage(comboBox,
PInvoke
.CB_SETTOPINDEX, (WPARAM)(itemsCount - 1));
360
int actual = (int)PInvokeCore.SendMessage(comboBox,
PInvoke
.CB_GETTOPINDEX);
System\Windows\Forms\AccessibleObjects\DataGridViewAccessibleObjectTests.cs (1)
207
PInvoke
.SetFocus(dataGridView);
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (2)
297
PInvokeCore.SendMessage(list,
PInvoke
.LVM_GETGROUPRECT, (WPARAM)listGroup.ID, ref groupRect);
333
PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPRECT, (WPARAM)group.ID, ref groupRect);
System\Windows\Forms\AccessibleObjects\ListViewLabelEditAccessibleObjectTests.cs (3)
172
PInvoke
.SetFocus(listView);
174
PInvokeCore.SendMessage(listView,
PInvoke
.LVM_EDITLABELW, wParam: 0);
187
PInvokeCore.SendMessage(this,
PInvoke
.LVM_CANCELEDITLABEL);
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarBodyAccessibleObjectTests.cs (4)
50
PInvokeCore.SendMessage(control,
PInvoke
.MCM_SETCURRENTVIEW, 0, view);
76
PInvokeCore.SendMessage(control,
PInvoke
.MCM_SETCURRENTVIEW, 0, view);
142
PInvokeCore.SendMessage(control,
PInvoke
.MCM_SETCURRENTVIEW, 0, (nint)view);
285
PInvokeCore.SendMessage(control,
PInvoke
.MCM_SETCURRENTVIEW, 0, (nint)view);
System\Windows\Forms\AccessibleObjects\MonthCalendar.CalendarCellAccessibleObjectTests.cs (1)
155
PInvokeCore.SendMessage(control,
PInvoke
.MCM_SETCURRENTVIEW, 0, view);
System\Windows\Forms\AccessibleObjects\PrintPreviewControl.PrintPreviewControlAccessibleObjectTests.cs (1)
49
PInvoke
.SetFocus(control);
System\Windows\Forms\Application.ParkingWindowTests.cs (14)
71
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContextInternal(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
83
DPI_AWARENESS_CONTEXT dpiContext =
PInvoke
.GetWindowDpiAwarenessContext(parkingWindow.HWND);
90
PInvoke
.SetThreadDpiAwarenessContextInternal(originalAwarenessContext);
106
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContextInternal(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
118
DPI_AWARENESS_CONTEXT dpiContext =
PInvoke
.GetWindowDpiAwarenessContext(parkingWindow.HWND);
125
PInvoke
.SetThreadDpiAwarenessContextInternal(originalAwarenessContext);
141
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContextInternal(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
152
DPI_AWARENESS_CONTEXT dpiContext =
PInvoke
.GetWindowDpiAwarenessContext(parkingWindow.HWND);
158
PInvoke
.SetThreadDpiAwarenessContextInternal(originalAwarenessContext);
174
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContextInternal(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
184
DPI_AWARENESS_CONTEXT dpiContext =
PInvoke
.GetWindowDpiAwarenessContext(parkingWindow.HWND);
195
dpiContext =
PInvoke
.GetWindowDpiAwarenessContext(parkingWindow.HWND);
202
dpiContext =
PInvoke
.GetWindowDpiAwarenessContext(parkingWindow.HWND);
209
PInvoke
.SetThreadDpiAwarenessContextInternal(originalAwarenessContext);
System\Windows\Forms\ButtonBaseTests.cs (18)
5708
Assert.Equal(expected, (int)PInvokeCore.SendMessage(control,
PInvoke
.BM_GETSTATE));
5733
Assert.Equal(expected, (int)PInvokeCore.SendMessage(control,
PInvoke
.BM_GETSTATE));
5987
Assert.Equal(expected, (int)PInvokeCore.SendMessage(control,
PInvoke
.BM_GETSTATE));
6012
Assert.Equal(expected, (int)PInvokeCore.SendMessage(control,
PInvoke
.BM_GETSTATE));
8303
Msg = (int)
PInvoke
.BM_CLICK,
8335
Msg = (int)
PInvoke
.BM_CLICK,
8373
Msg = (int)
PInvoke
.BM_CLICK,
8415
Msg = (int)
PInvoke
.BM_CLICK,
9098
yield return new object[] { FlatStyle.Flat, PARAM.FromLowHigh(0, (int)
PInvoke
.BN_CLICKED), IntPtr.Zero, 0 };
9099
yield return new object[] { FlatStyle.Flat, PARAM.FromLowHigh(123, (int)
PInvoke
.BN_CLICKED), IntPtr.Zero, 0 };
9103
yield return new object[] { FlatStyle.Popup, PARAM.FromLowHigh(0, (int)
PInvoke
.BN_CLICKED), IntPtr.Zero, 0 };
9104
yield return new object[] { FlatStyle.Popup, PARAM.FromLowHigh(123, (int)
PInvoke
.BN_CLICKED), IntPtr.Zero, 0 };
9108
yield return new object[] { FlatStyle.Standard, PARAM.FromLowHigh(0, (int)
PInvoke
.BN_CLICKED), IntPtr.Zero, 0 };
9109
yield return new object[] { FlatStyle.Standard, PARAM.FromLowHigh(123, (int)
PInvoke
.BN_CLICKED), IntPtr.Zero, 0 };
9113
yield return new object[] { FlatStyle.System, PARAM.FromLowHigh(0, (int)
PInvoke
.BN_CLICKED), (IntPtr)250, 1 };
9114
yield return new object[] { FlatStyle.System, PARAM.FromLowHigh(123, (int)
PInvoke
.BN_CLICKED), (IntPtr)250, 1 };
9208
Msg = (int)
PInvoke
.BM_SETSTATE,
9237
Msg = (int)
PInvoke
.BM_SETSTATE,
System\Windows\Forms\ButtonTests.cs (8)
3563
yield return new object[] { FlatStyle.Flat, PARAM.FromLowHigh(0, (int)
PInvoke
.BN_CLICKED), (IntPtr)250, 1 };
3564
yield return new object[] { FlatStyle.Flat, PARAM.FromLowHigh(123, (int)
PInvoke
.BN_CLICKED), (IntPtr)250, 1 };
3568
yield return new object[] { FlatStyle.Popup, PARAM.FromLowHigh(0, (int)
PInvoke
.BN_CLICKED), (IntPtr)250, 1 };
3569
yield return new object[] { FlatStyle.Popup, PARAM.FromLowHigh(123, (int)
PInvoke
.BN_CLICKED), (IntPtr)250, 1 };
3573
yield return new object[] { FlatStyle.Standard, PARAM.FromLowHigh(0, (int)
PInvoke
.BN_CLICKED), (IntPtr)250, 1 };
3574
yield return new object[] { FlatStyle.Standard, PARAM.FromLowHigh(123, (int)
PInvoke
.BN_CLICKED), (IntPtr)250, 1 };
3578
yield return new object[] { FlatStyle.System, PARAM.FromLowHigh(0, (int)
PInvoke
.BN_CLICKED), (IntPtr)250, 1 };
3579
yield return new object[] { FlatStyle.System, PARAM.FromLowHigh(123, (int)
PInvoke
.BN_CLICKED), (IntPtr)250, 1 };
System\Windows\Forms\ColumnHeaderTests.cs (10)
223
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETCOLUMNORDERARRAY, 3, ref result[0]));
449
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETCOLUMNW, 0, ref column));
479
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETCOLUMNW, 0, ref column));
669
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETCOLUMNW, 0, ref column));
701
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETCOLUMNW, 0, ref column));
1017
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETCOLUMNW, 0, ref column));
1206
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETCOLUMNW, (WPARAM)columnIndex, ref column));
1364
Assert.Equal(value, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETCOLUMNWIDTH));
1382
Assert.True(PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETCOLUMNWIDTH) > 0);
1615
if (MakeInvalid && m.Msg == (int)
PInvoke
.LVM_SETCOLUMNW)
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (4)
733
Assert.Equal(0, ((int)actual &
PInvoke
.ES_RIGHT));
734
Assert.NotEqual(0, ((int)actual &
PInvoke
.ES_NOHIDESEL));
735
Assert.NotEqual(0, ((int)actual &
PInvoke
.ES_AUTOHSCROLL));
752
Assert.Equal(
PInvoke
.ES_LEFT, (int)actual);
System\Windows\Forms\ComponentModel\Com2Interop\COM2FontConverterTests.cs (2)
37
PInvoke
.OleCreateFontIndirect(&fontDesc, IID.Get<IFont>(), iFont).ThrowOnFailure();
69
PInvoke
.OleCreateFontIndirect(&fontDesc, IID.Get<IFont>(), iFont).ThrowOnFailure();
System\Windows\Forms\ComponentModel\Com2Interop\ComNativeDescriptorTests.cs (3)
163
HRESULT hr =
PInvoke
.CreateStdAccessibleObject(
205
Assert.Equal((int)
PInvoke
.CHILDID_SELF, accFocus.GetValue(comWrapper));
298
*pvarChild = (VARIANT)(int)
PInvoke
.CHILDID_SELF;
System\Windows\Forms\ControlTests.ControlCollection.cs (1)
450
Assert.Equal(owner.Handle,
PInvoke
.GetParent(control));
System\Windows\Forms\ControlTests.Methods.cs (8)
12642
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContextInternal(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
12671
PInvoke
.SetThreadDpiAwarenessContextInternal(originalAwarenessContext);
12679
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContextInternal(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
12716
PInvoke
.SetThreadDpiAwarenessContextInternal(originalAwarenessContext);
12724
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContextInternal(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
12753
PInvoke
.SetThreadDpiAwarenessContextInternal(originalAwarenessContext);
12761
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContextInternal(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
12798
PInvoke
.SetThreadDpiAwarenessContextInternal(originalAwarenessContext);
System\Windows\Forms\ControlTests.Properties.cs (56)
9276
Assert.True(
PInvoke
.GetKeyboardState(b));
9282
PInvoke
.SetKeyboardState(b);
10509
{ (int)
PInvoke
.UIS_CLEAR | ((int)
PInvoke
.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined },
10510
{ (int)
PInvoke
.UIS_CLEAR | ((int)
PInvoke
.UISF_HIDEACCEL << 16), SystemInformation.MenuAccessKeysUnderlined },
10511
{ (int)
PInvoke
.UIS_CLEAR | ((int)
PInvoke
.UISF_HIDEFOCUS << 16), true },
10512
{ (int)
PInvoke
.UIS_CLEAR | ((int)(
PInvoke
.UISF_HIDEACCEL |
PInvoke
.UISF_HIDEFOCUS) << 16), true },
10513
{ (int)
PInvoke
.UIS_SET | ((int)
PInvoke
.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined },
10514
{ (int)
PInvoke
.UIS_SET | ((int)
PInvoke
.UISF_HIDEACCEL << 16), SystemInformation.MenuAccessKeysUnderlined },
10515
{ (int)
PInvoke
.UIS_SET | ((int)
PInvoke
.UISF_HIDEFOCUS << 16), false },
10516
{ (int)
PInvoke
.UIS_SET | ((int)(
PInvoke
.UISF_HIDEACCEL |
PInvoke
.UISF_HIDEFOCUS) << 16), false },
10517
{ (int)
PInvoke
.UIS_INITIALIZE | ((int)
PInvoke
.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined },
10518
{ (int)
PInvoke
.UIS_INITIALIZE | ((int)
PInvoke
.UISF_HIDEACCEL << 16), SystemInformation.MenuAccessKeysUnderlined },
10519
{ (int)
PInvoke
.UIS_INITIALIZE | ((int)
PInvoke
.UISF_HIDEFOCUS << 16), SystemInformation.MenuAccessKeysUnderlined },
10520
{ (int)
PInvoke
.UIS_INITIALIZE | ((int)(
PInvoke
.UISF_HIDEACCEL |
PInvoke
.UISF_HIDEFOCUS) << 16), SystemInformation.MenuAccessKeysUnderlined }
10568
{ (int)
PInvoke
.UIS_CLEAR | ((int)
PInvoke
.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined },
10569
{ (int)
PInvoke
.UIS_CLEAR | ((int)
PInvoke
.UISF_HIDEACCEL << 16), true },
10570
{ (int)
PInvoke
.UIS_CLEAR | ((int)
PInvoke
.UISF_HIDEFOCUS << 16), SystemInformation.MenuAccessKeysUnderlined },
10571
{ (int)
PInvoke
.UIS_CLEAR | ((int)(
PInvoke
.UISF_HIDEACCEL |
PInvoke
.UISF_HIDEFOCUS) << 16), true },
10572
{ (int)
PInvoke
.UIS_SET | ((int)
PInvoke
.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined },
10573
{ (int)
PInvoke
.UIS_SET | ((int)
PInvoke
.UISF_HIDEACCEL << 16), false },
10574
{ (int)
PInvoke
.UIS_SET | ((int)
PInvoke
.UISF_HIDEFOCUS << 16), SystemInformation.MenuAccessKeysUnderlined },
10575
{ (int)
PInvoke
.UIS_SET | ((int)(
PInvoke
.UISF_HIDEACCEL |
PInvoke
.UISF_HIDEFOCUS) << 16), false },
10576
{ (int)
PInvoke
.UIS_INITIALIZE | ((int)
PInvoke
.UISF_ACTIVE << 16), SystemInformation.MenuAccessKeysUnderlined },
10577
{ (int)
PInvoke
.UIS_INITIALIZE | ((int)
PInvoke
.UISF_HIDEACCEL << 16), SystemInformation.MenuAccessKeysUnderlined },
10578
{ (int)
PInvoke
.UIS_INITIALIZE | ((int)
PInvoke
.UISF_HIDEFOCUS << 16), SystemInformation.MenuAccessKeysUnderlined },
10579
{ (int)
PInvoke
.UIS_INITIALIZE | ((int)(
PInvoke
.UISF_HIDEACCEL |
PInvoke
.UISF_HIDEFOCUS) << 16), SystemInformation.MenuAccessKeysUnderlined }
System\Windows\Forms\CursorTests.cs (2)
200
oldDpiAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContextInternal(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
222
PInvoke
.SetThreadDpiAwarenessContextInternal(oldDpiAwarenessContext);
System\Windows\Forms\FormTests.cs (12)
199
HICON hSmallIcon = (HICON)PInvokeCore.SendMessage(form, PInvokeCore.WM_GETICON, (WPARAM)
PInvoke
.ICON_SMALL);
202
HICON hLargeIcon = (HICON)PInvokeCore.SendMessage(form, PInvokeCore.WM_GETICON, (WPARAM)
PInvoke
.ICON_BIG);
991
PInvokeCore.SendMessage(form, PInvokeCore.WM_SYSCOMMAND, (WPARAM)
PInvoke
.SC_MAXIMIZE);
1000
PInvokeCore.SendMessage(form, PInvokeCore.WM_SYSCOMMAND, (WPARAM)
PInvoke
.SC_RESTORE);
1082
HICON hSmallIcon = (HICON)PInvokeCore.SendMessage(form, PInvokeCore.WM_GETICON, (WPARAM)
PInvoke
.ICON_SMALL);
1083
HICON hLargeIcon = (HICON)PInvokeCore.SendMessage(form, PInvokeCore.WM_GETICON, (WPARAM)
PInvoke
.ICON_BIG);
1283
HICON hSmallIcon = (HICON)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)
PInvoke
.ICON_SMALL);
1285
HICON hLargeIcon = (HICON)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)
PInvoke
.ICON_BIG);
1290
hSmallIcon = (HICON)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)
PInvoke
.ICON_SMALL);
1292
hLargeIcon = (HICON)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)
PInvoke
.ICON_BIG);
1297
hSmallIcon = (HICON)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)
PInvoke
.ICON_SMALL);
1299
hLargeIcon = (HICON)PInvokeCore.SendMessage(control, PInvokeCore.WM_GETICON, (WPARAM)
PInvoke
.ICON_BIG);
System\Windows\Forms\ListBox.ObjectCollectionTests.cs (542)
521
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
522
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
524
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
526
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
538
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
539
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
541
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
543
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
555
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
556
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
558
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
560
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
572
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
573
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
575
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
577
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
610
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
611
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
613
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
615
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
627
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
628
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
630
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
632
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
644
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
645
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
647
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
649
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
661
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
662
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
664
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
666
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
1491
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
1492
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
1504
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
1505
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
1507
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
1519
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
1520
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
1522
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
1524
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
1536
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
1537
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
1539
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
1541
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
1543
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
1570
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
1571
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
1583
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
1584
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
1586
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
1598
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
1599
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
1601
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
1603
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
1615
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
1616
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
1618
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
1620
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
1622
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
1652
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
1653
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
1665
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
1666
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
1668
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
1680
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
1681
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
1683
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
1685
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
1697
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
1698
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
1700
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
1702
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
1704
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
1734
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
1735
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
1747
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
1748
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
1750
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
1762
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
1763
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
1765
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
1767
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
1779
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
1780
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
1782
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
1784
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
1786
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
2156
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
2170
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
2171
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
2173
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
2175
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
2177
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
2341
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
2342
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
2344
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
2346
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
2348
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
2360
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
2361
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
2363
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
2365
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
2367
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
2393
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
2394
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
2396
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
2398
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
2400
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
2412
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
2413
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
2415
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
2417
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
2419
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
2448
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
2449
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
2451
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
2453
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
2455
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
2467
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
2468
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
2470
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
2472
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
2474
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
2503
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
2504
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
2506
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
2508
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
2510
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
2522
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
2523
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
2525
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
2527
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
2529
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
2849
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
2860
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
2861
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
2863
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
2865
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
2867
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
3018
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3019
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
3021
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
3023
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
3025
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
3039
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3040
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
3042
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
3044
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
3046
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
3075
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3076
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
3078
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
3080
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
3082
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
3096
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3097
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
3099
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
3101
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
3103
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
3135
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3136
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
3138
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
3140
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
3142
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
3156
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3157
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
3159
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
3161
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
3163
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
3195
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3196
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
3198
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
3200
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
3202
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
3216
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3217
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
3219
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
3221
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
3223
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
3586
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3600
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3601
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
3603
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
3605
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
3607
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
3812
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3824
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3849
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3861
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3887
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3899
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3925
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
3937
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4314
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4315
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4327
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4328
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4330
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
4342
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4343
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4345
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
4347
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
4359
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4360
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4362
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
4364
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
4366
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
4393
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4394
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4406
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4407
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4409
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
4421
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4422
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4424
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
4426
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
4438
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4439
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4441
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
4443
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
4445
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
4475
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4476
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4488
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4489
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4491
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
4503
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4504
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4506
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
4508
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
4520
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4521
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4523
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
4525
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
4527
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
4557
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4558
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4570
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4571
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4573
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
4585
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4586
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4588
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
4590
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
4602
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4603
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4605
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
4607
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
4609
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
4969
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4983
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
4984
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
4986
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
4988
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
4990
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
5261
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
5262
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
5264
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
5276
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
5277
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
5279
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
5291
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
5292
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
5304
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
5336
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
5337
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
5339
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
5352
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
5353
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
5355
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
5368
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
5369
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
5381
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
5413
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
5414
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
5416
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
5428
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
5429
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
5431
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
5443
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
5444
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
5456
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
5491
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
5492
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
5494
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
5507
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
5508
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
5510
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
5523
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
5524
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
5536
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
6178
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
6179
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
6181
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
6193
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
6194
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
6206
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
6238
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
6239
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
6241
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
6254
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
6255
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
6267
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
6299
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
6300
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
6302
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
6314
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
6315
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
6327
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
6362
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
6363
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
6365
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
6378
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
6379
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
6391
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
7324
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
7325
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
7327
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
7329
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
7341
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
7342
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
7344
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
7346
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
7358
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
7359
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
7361
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
7363
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
7375
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
7376
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
7378
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
7380
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
7415
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
7416
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
7418
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
7420
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
7432
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
7433
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
7435
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
7437
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
7449
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
7450
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
7452
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
7454
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
7466
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
7467
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
7469
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
7471
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
8296
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8297
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8309
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8310
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8312
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
8324
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8325
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8327
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
8329
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
8341
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8342
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8344
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
8346
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
8348
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
8375
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8376
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8388
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8389
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8391
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
8403
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8404
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8406
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
8408
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
8420
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8421
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8423
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
8425
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
8427
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
8457
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8458
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8470
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8471
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8473
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
8485
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8486
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8488
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
8490
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
8502
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8503
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8505
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
8507
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
8509
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
8539
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8540
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8552
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8553
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8555
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
8567
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8568
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8570
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
8572
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
8584
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8585
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8587
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
8589
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
8591
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
8961
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8975
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
8976
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
8978
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
8980
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
8982
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
9134
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9146
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9171
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9183
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9209
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9221
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9247
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9259
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9636
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9637
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
9649
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9650
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
9652
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
9664
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9665
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
9667
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
9669
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
9681
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9682
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
9684
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
9686
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
9688
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
9715
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9716
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
9728
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9729
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
9731
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
9743
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9744
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
9746
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
9748
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
9760
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9761
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
9763
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
9765
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
9767
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
9797
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9798
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
9810
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9811
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
9813
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
9825
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9826
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
9828
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
9830
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
9842
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9843
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
9845
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
9847
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
9849
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
9879
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9880
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
9892
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9893
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
9895
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
9907
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9908
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
9910
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
9912
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
9924
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
9925
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
9927
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
9929
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
9931
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
10291
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10305
Assert.Equal(4, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10306
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
10308
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
10310
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 2, (nint)textBuffer);
10312
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 3, (nint)textBuffer);
10583
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10584
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
10586
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
10598
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10599
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
10601
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
10613
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10614
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
10626
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10658
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10659
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
10661
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
10674
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10675
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
10677
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
10690
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10691
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
10703
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10735
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10736
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
10738
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
10750
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10751
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
10753
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
10765
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10766
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
10778
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10813
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10814
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
10816
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
10829
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10830
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
10832
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
10845
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
10846
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
10858
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
11500
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
11501
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
11503
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
11515
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
11516
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
11528
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
11560
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
11561
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
11563
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
11576
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
11577
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
11589
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
11621
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
11622
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
11624
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
11636
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
11637
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
11649
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
11684
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
11685
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
11687
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 1, (nint)textBuffer);
11700
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
11701
PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETTEXT, 0, (nint)textBuffer);
11713
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.LB_GETCOUNT));
12209
if (m.Msg == (int)
PInvoke
.LB_ADDSTRING)
12225
if (m.Msg == (int)
PInvoke
.LB_INSERTSTRING)
System\Windows\Forms\ListBoxTests.cs (33)
771
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETITEMRECT, 0, ref rc));
1464
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETHORIZONTALEXTENT));
1467
Assert.Equal(expected, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETHORIZONTALEXTENT));
1803
Assert.Equal(expected, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETITEMHEIGHT) == 25);
2632
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETCURSEL));
2636
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETCURSEL));
2640
Assert.Equal(-1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETCURSEL));
2659
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETCURSEL));
2661
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETSELITEMS, (WPARAM)buffer.Length, ref buffer[0]));
2666
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETCURSEL));
2667
Assert.Equal(2, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETSELITEMS, (WPARAM)buffer.Length, ref buffer[0]));
2672
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETCURSEL));
2673
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETSELITEMS, (WPARAM)buffer.Length, ref buffer[0]));
3145
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETCURSEL));
3149
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETCURSEL));
3153
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETCURSEL));
3157
Assert.Equal(-1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETCURSEL));
3176
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETCURSEL));
3178
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETSELITEMS, (WPARAM)buffer.Length, ref buffer[0]));
3183
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETCURSEL));
3185
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETSELITEMS, (WPARAM)buffer.Length, ref buffer[0]));
3190
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETCURSEL));
3191
Assert.Equal(2, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETSELITEMS, (WPARAM)buffer.Length, ref buffer[0]));
3196
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETCURSEL));
3197
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETSELITEMS, (WPARAM)buffer.Length, ref buffer[0]));
3327
PInvokeCore.SendMessage(control, MessageId.WM_REFLECT | PInvokeCore.WM_COMMAND, WPARAM.MAKEWPARAM(0, (int)
PInvoke
.LBN_SELCHANGE));
3340
if (MakeCustom && m.Msg == (int)
PInvoke
.LB_GETSELCOUNT)
3345
else if (MakeCustom && m.Msg == (int)
PInvoke
.LB_GETSELITEMS)
4433
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LB_GETTOPINDEX));
5267
if (MakeCustom && m.Msg == (int)
PInvoke
.LB_GETITEMHEIGHT)
5295
if (MakeInvalid && m.Msg == (int)
PInvoke
.LB_GETITEMHEIGHT)
5410
if (m.Msg == (int)
PInvoke
.LB_GETITEMRECT)
5439
if (MakeInvalid && m.Msg == (int)
PInvoke
.LB_GETITEMRECT)
System\Windows\Forms\ListViewGroupTests.cs (22)
222
PInvokeCore.SendMessage(listView,
PInvoke
.LVM_SETIMAGELIST, (WPARAM)
PInvoke
.LVSIL_GROUPHEADER, groupImageList.Handle));
230
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPCOUNT));
237
Assert.Equal(1, PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPINFOBYINDEX, 0, ref lvgroup));
362
PInvokeCore.SendMessage(listView,
PInvoke
.LVM_SETIMAGELIST, (WPARAM)
PInvoke
.LVSIL_GROUPHEADER, groupImageList.Handle));
370
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPCOUNT));
377
Assert.Equal(1, PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPINFOBYINDEX, 0, ref lvgroup));
507
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPCOUNT));
517
Assert.Equal(1, PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPINFOBYINDEX, 0, ref lvgroup));
620
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPCOUNT));
629
Assert.Equal(1, PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPINFOBYINDEX, 0, ref lvgroup));
763
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPCOUNT));
773
Assert.Equal(1, PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPINFOBYINDEX, 0, ref lvgroup));
881
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPCOUNT));
891
Assert.Equal(1, PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPINFOBYINDEX, 0, ref lvgroup));
1015
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPCOUNT));
1025
Assert.Equal(1, PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPINFOBYINDEX, 0, ref lvgroup));
1138
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPCOUNT));
1146
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPINFOBYINDEX, 0, ref lvgroup));
1286
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPCOUNT));
1295
Assert.Equal(1, PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPINFOBYINDEX, 0, ref lvgroup));
System\Windows\Forms\ListViewInsertionMarkTests.cs (31)
101
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARK, 0, ref insertMark));
105
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARKCOLOR));
113
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARK, 0, ref insertMark));
117
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARKCOLOR));
125
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARK, 0, ref insertMark));
129
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARKCOLOR));
152
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARK, 0, ref insertMark));
156
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARKCOLOR));
164
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARK, 0, ref insertMark));
168
Assert.Equal(0x785634, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARKCOLOR));
176
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARK, 0, ref insertMark));
180
Assert.Equal(0x785634, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARKCOLOR));
240
if (m.Msg == (int)
PInvoke
.LVM_GETINSERTMARKRECT)
269
if (MakeInvalid && m.Msg == (int)
PInvoke
.LVM_GETINSERTMARKRECT)
377
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARK, 0, ref insertMark));
381
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARKCOLOR));
389
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARK, 0, ref insertMark));
393
Assert.Equal(0x785634, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARKCOLOR));
474
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARK, 0, ref insertMark));
478
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARKCOLOR));
487
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARK, 0, ref insertMark));
491
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARKCOLOR));
499
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARK, 0, ref insertMark));
503
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARKCOLOR));
529
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARK, 0, ref insertMark));
533
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARKCOLOR));
542
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARK, 0, ref insertMark));
546
Assert.Equal(0x785634, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARKCOLOR));
554
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARK, 0, ref insertMark));
558
Assert.Equal(0x785634, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETINSERTMARKCOLOR));
613
if (m.Msg == (int)
PInvoke
.LVM_INSERTMARKHITTEST)
System\Windows\Forms\ListViewTests.cs (17)
517
Assert.Equal(0x563412, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETBKCOLOR));
1379
Assert.Equal(0x785634, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETTEXTCOLOR));
1849
Assert.Equal(0x563412, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETBKCOLOR));
1860
Assert.Equal(0x785634, (int)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETTEXTCOLOR));
1871
Assert.Equal(0, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPCOUNT));
1933
Assert.Equal(2, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPCOUNT));
1944
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPINFOBYINDEX, 0, ref lvgroup1));
1959
Assert.Equal(1, (int)PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETGROUPINFOBYINDEX, 1, ref lvgroup2));
1979
Assert.Equal(expected, (nint)PInvokeCore.SendMessage(control,
PInvoke
.LVM_GETTEXTBKCOLOR));
1988
Assert.Equal(version, (int)PInvokeCore.SendMessage(control,
PInvoke
.CCM_GETVERSION));
2018
if (m.Msg == (int)
PInvoke
.CCM_GETVERSION)
2025
else if (m.Msg == (int)
PInvoke
.CCM_SETVERSION)
4170
if (m.Msg == (int)
PInvoke
.LVM_GETITEMRECT)
4200
if (MakeInvalid && m.Msg == (int)
PInvoke
.LVM_GETITEMRECT)
5445
PInvoke
.SetFocus(listView);
5458
nint editControlHandle = PInvokeCore.SendMessage(listView,
PInvoke
.LVM_GETEDITCONTROL);
5462
PInvokeCore.SendMessage(listView,
PInvoke
.LVM_CANCELEDITLABEL);
System\Windows\Forms\MdiControlStripTests.cs (2)
308
IntPtr menuHandle =
PInvoke
.GetMenu((HWND)mdiParent.Handle);
309
int menuItemCount =
PInvoke
.GetMenuItemCount((HMENU)menuHandle);
System\Windows\Forms\MixedDpiHostingTests.cs (4)
22
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContextInternal(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
38
DPI_AWARENESS_CONTEXT controlDpiContext =
PInvoke
.GetWindowDpiAwarenessContext(control.HWND);
39
DPI_AWARENESS_CONTEXT formDpiContext =
PInvoke
.GetWindowDpiAwarenessContext(form.HWND);
47
PInvoke
.SetThreadDpiAwarenessContextInternal(originalAwarenessContext);
System\Windows\Forms\MonthCalendarTests.cs (20)
1031
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.MCM_GETSELRANGE, 0, ref range[0]));
1058
Assert.Equal(10, (int)PInvokeCore.SendMessage(control,
PInvoke
.MCM_GETMAXSELCOUNT));
1070
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.MCM_GETTODAY, 0, ref date));
1089
Assert.Equal(0x785634, (int)PInvokeCore.SendMessage(control,
PInvoke
.MCM_GETCOLOR, (WPARAM)(int)
PInvoke
.MCSC_TEXT));
1100
Assert.Equal(0x563412, (int)PInvokeCore.SendMessage(control,
PInvoke
.MCM_GETCOLOR, (WPARAM)(int)
PInvoke
.MCSC_MONTHBK));
1111
Assert.Equal(0x785634, (int)PInvokeCore.SendMessage(control,
PInvoke
.MCM_GETCOLOR, (WPARAM)(int)
PInvoke
.MCSC_TITLEBK));
1122
Assert.Equal(0x785634, (int)PInvokeCore.SendMessage(control,
PInvoke
.MCM_GETCOLOR, (WPARAM)(int)
PInvoke
.MCSC_TITLETEXT));
1133
Assert.Equal(0x785634, (int)PInvokeCore.SendMessage(control,
PInvoke
.MCM_GETCOLOR, (WPARAM)(int)
PInvoke
.MCSC_TRAILINGTEXT));
1150
Assert.Equal(expected, (int)PInvokeCore.SendMessage(control,
PInvoke
.MCM_GETFIRSTDAYOFWEEK));
1161
Assert.Equal(0x10001, (int)PInvokeCore.SendMessage(control,
PInvoke
.MCM_GETFIRSTDAYOFWEEK));
1174
Assert.Equal(3, (int)PInvokeCore.SendMessage(control,
PInvoke
.MCM_GETRANGE, 0, ref range[0]));
1201
Assert.Equal(10, (int)PInvokeCore.SendMessage(control,
PInvoke
.MCM_GETMONTHDELTA));
2473
if (m.Msg == (int)
PInvoke
.MCM_GETMINREQRECT)
2501
if (MakeInvalid && m.Msg == (int)
PInvoke
.MCM_GETMINREQRECT)
4371
PInvokeCore.SendMessage(monthCalendar,
PInvoke
.MCM_SETCURRENTVIEW, 0, view);
System\Windows\Forms\RichTextBoxTests.cs (56)
567
PInvokeCore.SendMessage(control, PInvokeCore.EM_SETOPTIONS, (WPARAM)(int)
PInvoke
.ECOOP_OR, (LPARAM)(int)
PInvoke
.ECO_AUTOWORDSELECTION);
1609
result = PInvokeCore.SendMessage(control, PInvokeCore.EM_GETCHARFORMAT, (WPARAM)
PInvoke
.SCF_ALL, ref format);
1626
result = PInvokeCore.SendMessage(control, PInvokeCore.EM_GETCHARFORMAT, (WPARAM)
PInvoke
.SCF_ALL, ref format1);
1752
Assert.NotEqual(0, (int)PInvokeCore.SendMessage(control, PInvokeCore.EM_GETCHARFORMAT, (WPARAM)
PInvoke
.SCF_ALL, ref format));
1767
Assert.NotEqual(0, (int)PInvokeCore.SendMessage(control, PInvokeCore.EM_GETCHARFORMAT, (WPARAM)
PInvoke
.SCF_ALL, ref format));
1776
Assert.NotEqual(0, (int)PInvokeCore.SendMessage(control, PInvokeCore.EM_GETCHARFORMAT, (WPARAM)
PInvoke
.SCF_ALL, ref format));
3783
Assert.NotEqual(0, (int)PInvokeCore.SendMessage(control, PInvokeCore.EM_GETPARAFORMAT, (WPARAM)
PInvoke
.SCF_SELECTION, ref format));
3856
ExpectedWParam = (IntPtr)
PInvoke
.SCF_SELECTION,
3876
ExpectedWParam = (IntPtr)
PInvoke
.SCF_SELECTION,
3978
Assert.NotEqual(0, (int)PInvokeCore.SendMessage(control, PInvokeCore.EM_GETCHARFORMAT, (WPARAM)
PInvoke
.SCF_SELECTION, ref format));
4240
Assert.NotEqual(0, (int)PInvokeCore.SendMessage(control, PInvokeCore.EM_GETPARAFORMAT, (WPARAM)
PInvoke
.SCF_SELECTION, ref format));
4340
ExpectedWParam = (IntPtr)
PInvoke
.SCF_SELECTION,
4434
Assert.NotEqual(0, (int)PInvokeCore.SendMessage(control, PInvokeCore.EM_GETCHARFORMAT, (WPARAM)
PInvoke
.SCF_SELECTION, ref format));
4530
ExpectedWParam = (IntPtr)
PInvoke
.SCF_SELECTION,
4623
Assert.NotEqual(0, (int)PInvokeCore.SendMessage(control, PInvokeCore.EM_GETCHARFORMAT, (WPARAM)
PInvoke
.SCF_SELECTION, ref format));
4750
ExpectedWParam = (IntPtr)
PInvoke
.SCF_SELECTION,
4790
ExpectedWParam = (IntPtr)
PInvoke
.SCF_SELECTION,
4938
Assert.NotEqual(0, (int)PInvokeCore.SendMessage(control, PInvokeCore.EM_GETCHARFORMAT, (WPARAM)
PInvoke
.SCF_SELECTION, ref format));
5158
Assert.NotEqual(0, (int)PInvokeCore.SendMessage(control, PInvokeCore.EM_GETPARAFORMAT, (WPARAM)
PInvoke
.SCF_SELECTION, ref format));
5349
Assert.NotEqual(0, (int)PInvokeCore.SendMessage(control, PInvokeCore.EM_GETPARAFORMAT, (WPARAM)
PInvoke
.SCF_SELECTION, ref format));
5647
ExpectedWParam = (IntPtr)
PInvoke
.SCF_SELECTION,
5747
Assert.NotEqual(0, (int)PInvokeCore.SendMessage(control, PInvokeCore.EM_GETCHARFORMAT, (WPARAM)
PInvoke
.SCF_SELECTION, ref format));
5933
Assert.NotEqual(0, (int)PInvokeCore.SendMessage(control, PInvokeCore.EM_GETPARAFORMAT, (WPARAM)
PInvoke
.SCF_SELECTION, ref format));
6380
Assert.NotEqual(0, (int)PInvokeCore.SendMessage(control, PInvokeCore.EM_GETPARAFORMAT, (WPARAM)
PInvoke
.SCF_SELECTION, ref format));
6388
Assert.NotEqual(0, (int)PInvokeCore.SendMessage(control, PInvokeCore.EM_GETPARAFORMAT, (WPARAM)
PInvoke
.SCF_SELECTION, ref format));
6581
PInvokeCore.SendMessage(control, PInvokeCore.EM_SETOPTIONS, (WPARAM)(int)
PInvoke
.ECOOP_OR, (LPARAM)(nint)
PInvoke
.ECO_SELECTIONBAR);
6903
string textOldWay = control.TestAccessor().Dynamic.StreamOut(
PInvoke
.SF_TEXT |
PInvoke
.SF_UNICODE);
9925
yield return new object[] { PARAM.FromLowHigh(0, (int)
PInvoke
.EN_CHANGE), lParam, 1 };
9926
yield return new object[] { PARAM.FromLowHigh(0, (int)
PInvoke
.EN_UPDATE), lParam, 0 };
9927
yield return new object[] { PARAM.FromLowHigh(123, (int)
PInvoke
.EN_CHANGE), lParam, 1 };
9928
yield return new object[] { PARAM.FromLowHigh(123, (int)
PInvoke
.EN_HSCROLL), lParam, 0 };
9929
yield return new object[] { PARAM.FromLowHigh(123, (int)
PInvoke
.EN_VSCROLL), lParam, 0 };
10017
yield return new object[] { PARAM.FromLowHigh(0, (int)
PInvoke
.EN_CHANGE), 1, 0, 0 };
10018
yield return new object[] { PARAM.FromLowHigh(0, (int)
PInvoke
.EN_UPDATE), 0, 0, 0 };
10019
yield return new object[] { PARAM.FromLowHigh(123, (int)
PInvoke
.EN_CHANGE), 1, 0, 0 };
10020
yield return new object[] { PARAM.FromLowHigh(123, (int)
PInvoke
.EN_HSCROLL), 0, 1, 0 };
10021
yield return new object[] { PARAM.FromLowHigh(123, (int)
PInvoke
.EN_VSCROLL), 0, 0, 1 };
10084
yield return new object[] { hWnd, (int)
PInvoke
.EN_LINK };
10085
yield return new object[] { hWnd, (int)
PInvoke
.EN_DROPFILES };
10086
yield return new object[] { hWnd, (int)
PInvoke
.EN_REQUESTRESIZE };
10087
yield return new object[] { hWnd, (int)
PInvoke
.EN_SELCHANGE };
10088
yield return new object[] { hWnd, (int)
PInvoke
.EN_PROTECTED };
10129
code = (int)
PInvoke
.EN_DROPFILES
10176
code = (int)
PInvoke
.EN_SELCHANGE
10228
Marshal.WriteInt32(ptr, IntPtr.Size * 2, (int)
PInvoke
.EN_PROTECTED);
10303
code = (int)
PInvoke
.EN_DROPFILES
10364
code = (int)
PInvoke
.EN_REQUESTRESIZE
10410
code = (int)
PInvoke
.EN_SELCHANGE
10464
Marshal.WriteInt32(ptr, IntPtr.Size * 2, (int)
PInvoke
.EN_PROTECTED);
10532
PInvokeCore.SendMessage(control, PInvokeCore.EM_SETMARGINS, (WPARAM)(
PInvoke
.EC_LEFTMARGIN |
PInvoke
.EC_RIGHTMARGIN), LPARAM.MAKELPARAM(1, 2));
11023
length =
PInvoke
.GetClassName(hWnd, lpClassName, buffer.Length);
11066
_nativeDllHandle =
PInvoke
.LoadLibraryFromSystemPathIfAvailable(NativeDll);
System\Windows\Forms\ScrollBarTests.cs (18)
440
Assert.True(
PInvoke
.GetScrollInfo(control.HWND, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
617
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
747
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
762
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
797
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
812
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
883
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
905
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
946
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
969
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
1069
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
1091
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
1132
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
1154
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
1614
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
1636
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
1678
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
1700
Assert.True(
PInvoke
.GetScrollInfo((HWND)control.Handle, SCROLLBAR_CONSTANTS.SB_CTL, ref si));
System\Windows\Forms\TabControl.ControlCollectionTests.cs (14)
770
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
780
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
788
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
796
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 2, ref item));
838
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
848
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
856
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
864
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 2, ref item));
1482
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
1492
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
1500
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
1540
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
1550
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
1558
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (31)
776
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
786
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
794
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
802
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 2, ref item));
846
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
856
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
864
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
872
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 2, ref item));
1540
Assert.Equal(0, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
2802
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
2812
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
2820
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
2828
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 2, ref item));
2870
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
2880
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
2888
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
2896
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 2, ref item));
3557
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
3567
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
3575
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
3583
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 2, ref item));
3629
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
3639
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
3647
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
3655
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 2, ref item));
4602
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
4612
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
4620
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
4662
Assert.Equal(2, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
4672
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
4680
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
System\Windows\Forms\TabControlTests.cs (18)
1016
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.TCM_GETIMAGELIST));
1028
Assert.Equal(imageList.Handle, (nint)PInvokeCore.SendMessage(control,
PInvoke
.TCM_GETIMAGELIST));
1036
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.TCM_GETITEMCOUNT));
1058
Assert.Equal(3, (int)PInvokeCore.SendMessage(control,
PInvoke
.TCM_GETITEMCOUNT));
1068
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TCM_GETITEMW, 0, ref item));
1076
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TCM_GETITEMW, 1, ref item));
1084
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TCM_GETITEMW, 2, ref item));
1303
Assert.Equal(imageList.Handle, (nint)PInvokeCore.SendMessage(control,
PInvoke
.TCM_GETIMAGELIST));
1307
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.TCM_GETIMAGELIST));
1424
Assert.Equal(imageList1.Handle, (nint)PInvokeCore.SendMessage(control,
PInvoke
.TCM_GETIMAGELIST));
1435
Assert.Equal(imageList2.Handle, (nint)PInvokeCore.SendMessage(control,
PInvoke
.TCM_GETIMAGELIST));
3739
if (m.Msg == (int)
PInvoke
.TCM_GETITEMRECT)
3769
if (MakeInvalid && m.Msg == (int)
PInvoke
.TCM_GETITEMRECT)
4933
Assert.Equal(3, (int)PInvokeCore.SendMessage(control,
PInvoke
.TCM_GETITEMCOUNT));
4943
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TCM_GETITEMW, 0, ref item));
4951
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TCM_GETITEMW, 1, ref item));
4959
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TCM_GETITEMW, 2, ref item));
5190
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.TCM_GETITEMCOUNT));
System\Windows\Forms\TabPageTests.cs (32)
1387
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
1397
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
1405
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
1413
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 2, ref item));
1454
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
1464
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
1472
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
1480
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 2, ref item));
1762
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
1772
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
1780
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
1788
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 2, ref item));
1826
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
1836
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
1844
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
1852
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 2, ref item));
3018
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
3028
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
3036
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
3044
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 2, ref item));
3085
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
3095
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
3103
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
3111
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 2, ref item));
3391
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
3401
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
3409
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
3417
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 2, ref item));
3455
Assert.Equal(3, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMCOUNT));
3465
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 0, ref item));
3473
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 1, ref item));
3481
Assert.Equal(1, (int)PInvokeCore.SendMessage(owner,
PInvoke
.TCM_GETITEMW, 2, ref item));
System\Windows\Forms\TextBoxBase.TextBoxBaseUiaTextProviderTests.cs (4)
595
Assert.Equal(0, ((int)actual &
PInvoke
.ES_RIGHT));
596
Assert.NotEqual(0, ((int)actual &
PInvoke
.ES_AUTOVSCROLL));
597
Assert.NotEqual(0, ((int)actual &
PInvoke
.ES_AUTOHSCROLL));
607
Assert.Equal(
PInvoke
.ES_LEFT, (int)actual);
System\Windows\Forms\ToolStripMenuItemTests.cs (4)
103
yield return new object[] {
PInvoke
.SC_MINIMIZE };
104
yield return new object[] {
PInvoke
.SC_CLOSE };
105
yield return new object[] {
PInvoke
.SC_RESTORE };
114
HMENU hmenu =
PInvoke
.GetSystemMenu(form, bRevert: false);
System\Windows\Forms\ToolTipTests.cs (1)
895
Assert.Equal(tabControl.TabCount, (int)PInvokeCore.SendMessage(toolTip,
PInvoke
.TTM_GETTOOLCOUNT));
System\Windows\Forms\TreeNodeTests.cs (30)
675
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref item));
943
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref item));
1216
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref item));
1243
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref item));
1274
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref item));
1489
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref column));
1519
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref column));
1551
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref column));
2394
if (MakeCustom && m.Msg == (int)
PInvoke
.TVM_GETNEXTITEM)
2396
Assert.Equal((IntPtr)
PInvoke
.TVGN_NEXTVISIBLE, m.WParam);
2787
if (MakeCustom && m.Msg == (int)
PInvoke
.TVM_GETNEXTITEM)
2789
Assert.Equal((IntPtr)
PInvoke
.TVGN_PREVIOUSVISIBLE, m.WParam);
3198
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref item));
3227
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref item));
3258
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref item));
3473
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref column));
3503
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref column));
3535
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref column));
3863
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref item));
3893
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref item));
3925
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref item));
4226
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref column));
4264
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref column));
4304
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref column));
4462
Assert.Equal(1, (int)PInvokeCore.SendMessage(control,
PInvoke
.TVM_GETITEMW, 0, ref item));
4863
if (MakeInvalid && m.Msg == (int)
PInvoke
.TVM_SETITEMW)
4879
if (m.Msg == (int)
PInvoke
.TVM_GETITEMW)
4900
if (MakeInvalid && m.Msg == (int)
PInvoke
.TVM_GETITEMW)
4919
if (m.Msg == (int)
PInvoke
.TVM_GETITEMRECT)
4938
if (MakeInvalid && m.Msg == (int)
PInvoke
.TVM_GETITEMRECT)
System\Windows\Forms\TreeViewTests.cs (3)
1681
Assert.Equal(version, (int)PInvokeCore.SendMessage(control,
PInvoke
.CCM_GETVERSION));
1711
if (m.Msg == (int)
PInvoke
.CCM_GETVERSION)
1718
else if (m.Msg == (int)
PInvoke
.CCM_SETVERSION)
TextBoxBaseTests.cs (8)
2407
Assert.Equal(value, ((int)style &
PInvoke
.ES_READONLY) != 0);
7524
yield return new object[] { PARAM.FromLowHigh(0, (int)
PInvoke
.EN_CHANGE), lParam, 1 };
7525
yield return new object[] { PARAM.FromLowHigh(0, (int)
PInvoke
.EN_UPDATE), lParam, 0 };
7526
yield return new object[] { PARAM.FromLowHigh(123, (int)
PInvoke
.EN_CHANGE), lParam, 1 };
7527
yield return new object[] { PARAM.FromLowHigh(123, (int)
PInvoke
.EN_HSCROLL), lParam, 0 };
7528
yield return new object[] { PARAM.FromLowHigh(123, (int)
PInvoke
.EN_VSCROLL), lParam, 0 };
7652
(WPARAM)(
PInvoke
.EC_LEFTMARGIN |
PInvoke
.EC_RIGHTMARGIN),
TrackBarTests.cs (33)
782
Assert.Equal(11, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETRANGEMAX));
793
Assert.Equal(11, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETRANGEMIN));
812
Assert.Equal(expected, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETPOS));
824
Assert.Equal(5, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETPOS));
835
Assert.Equal(11, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETPAGESIZE));
846
Assert.Equal(11, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETLINESIZE));
1015
Assert.Equal(value, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETPAGESIZE));
1024
Assert.Equal(value, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETPAGESIZE));
1089
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETRANGEMIN));
1090
Assert.Equal(value, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETRANGEMAX));
1091
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETPOS));
1104
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETRANGEMIN));
1105
Assert.Equal(value, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETRANGEMAX));
1106
Assert.Equal(0, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETPOS));
1152
Assert.Equal(5, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETRANGEMIN));
1153
Assert.Equal(5, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETRANGEMAX));
1154
Assert.Equal(5, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETPOS));
1228
Assert.Equal(value, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETRANGEMIN));
1229
Assert.Equal(10, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETRANGEMAX));
1230
Assert.Equal(5, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETPOS));
1242
Assert.Equal(value, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETRANGEMIN));
1243
Assert.Equal(10, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETRANGEMAX));
1244
Assert.Equal(5, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETPOS));
1290
Assert.Equal(12, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETRANGEMIN));
1291
Assert.Equal(12, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETRANGEMAX));
1292
Assert.Equal(12, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETPOS));
1749
Assert.Equal(value, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETLINESIZE));
1758
Assert.Equal(value, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETLINESIZE));
2134
Assert.Equal(expectedPos, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETPOS));
2147
Assert.Equal(expectedPos, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETPOS));
3101
Assert.Equal(expectedMinimum, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETRANGEMIN));
3102
Assert.Equal(expectedMaximum, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETRANGEMAX));
3103
Assert.Equal(expectedValue, (int)PInvokeCore.SendMessage(control,
PInvoke
.TBM_GETPOS));
System.Windows.Forms.TestUtilities (5)
ControlExtensions.cs (2)
18
int prf =
PInvoke
.PRF_CHILDREN |
PInvoke
.PRF_CLIENT)
GlobalUsings.cs (1)
5
global using PInvoke = Windows.Win32.
PInvoke
;
PropertyGridInternal\SubPropertyGrid.cs (1)
17
private static MessageId WM_DELAYEDEXECUTION { get; } =
PInvoke
.RegisterWindowMessage("WinFormsSubPropertyGridDelayedExecution");
SystemEventsHelper.cs (1)
25
HWND window =
PInvoke
.FindWindow(windowClassName, null);
System.Windows.Forms.UI.IntegrationTests (46)
Dpi\FormDpiTests.cs (14)
25
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContextInternal(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
48
PInvoke
.SetThreadDpiAwarenessContextInternal(originalAwarenessContext);
62
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
82
PInvoke
.SetThreadDpiAwarenessContext(originalAwarenessContext);
96
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
118
PInvoke
.SetThreadDpiAwarenessContext(originalAwarenessContext);
132
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
154
PInvoke
.SetThreadDpiAwarenessContext(originalAwarenessContext);
168
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
186
PInvoke
.SetThreadDpiAwarenessContext(originalAwarenessContext);
200
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
215
PInvoke
.SetThreadDpiAwarenessContext(originalAwarenessContext);
228
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_SYSTEM_AWARE);
242
PInvoke
.SetThreadDpiAwarenessContext(originalAwarenessContext);
Dpi\SplitContainerTests.cs (2)
39
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContextInternal(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
72
PInvoke
.SetThreadDpiAwarenessContextInternal(originalAwarenessContext);
Dpi\ToolStripItemTests.Dpi.cs (2)
28
DPI_AWARENESS_CONTEXT originalAwarenessContext =
PInvoke
.SetThreadDpiAwarenessContextInternal(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2);
57
PInvoke
.SetThreadDpiAwarenessContextInternal(originalAwarenessContext);
DragDropTests.cs (1)
624
PInvoke
.SetWindowPos(
Infra\ControlTestBase.cs (4)
108
Assert.Equal(HWND.Null,
PInvoke
.GetCapture());
118
if (
PInvoke
.GetAsyncKeyState((int)code) < 0)
190
if (!
PInvoke
.GetCursorPos(out Point actualPoint))
201
if (!
PInvoke
.GetCursorPos(out Point _))
Infra\SendInput.cs (5)
83
PInvoke
.SetWindowPos(window, HWND.HWND_TOPMOST, 0, 0, 0, 0, SET_WINDOW_POS_FLAGS.SWP_NOSIZE | SET_WINDOW_POS_FLAGS.SWP_NOMOVE);
86
if (!
PInvoke
.SetForegroundWindow(window))
97
PInvoke
.SetActiveWindow(window);
100
PInvoke
.SetFocus(window);
103
PInvoke
.SetWindowPos(window, HWND.HWND_NOTOPMOST, 0, 0, 0, 0, SET_WINDOW_POS_FLAGS.SWP_NOSIZE | SET_WINDOW_POS_FLAGS.SWP_NOMOVE);
Input\InputBuilder.cs (1)
20
wScan = (ushort)(
PInvoke
.MapVirtualKey((uint)keyCode, MAP_VIRTUAL_KEY_TYPE.MAPVK_VK_TO_VSC) & 0xFFU),
Input\KeyboardSimulator.cs (6)
27
PInvoke
.SendInput(inputs, Marshal.SizeOf<INPUT>());
38
PInvoke
.SendInput(inputs, Marshal.SizeOf<INPUT>());
50
PInvoke
.SendInput(inputs, Marshal.SizeOf<INPUT>());
62
PInvoke
.SendInput(inputs, Marshal.SizeOf<INPUT>());
80
PInvoke
.SendInput(inputs, Marshal.SizeOf<INPUT>());
111
PInvoke
.SendInput(inputs, Marshal.SizeOf<INPUT>());
Input\MouseSimulator.cs (8)
88
PInvoke
.SendInput(inputs, Marshal.SizeOf<INPUT>());
99
PInvoke
.SendInput(inputs, Marshal.SizeOf<INPUT>());
111
PInvoke
.SendInput(inputs, Marshal.SizeOf<INPUT>());
125
PInvoke
.SendInput(inputs, Marshal.SizeOf<INPUT>());
135
Assert.True(
PInvoke
.GetPhysicalCursorPos(out var point));
145
PInvoke
.SendInput(inputs, Marshal.SizeOf<INPUT>());
156
PInvoke
.SendInput(inputs, Marshal.SizeOf<INPUT>());
167
PInvoke
.SendInput(inputs, Marshal.SizeOf<INPUT>());
MonthCalendarTests.cs (2)
69
code =
PInvoke
.MCN_SELCHANGE,
168
Assert.NotEqual(default, PInvokeCore.SendMessage(control,
PInvoke
.MCM_GETCALENDARGRIDINFO, default, ref result));
RichTextBoxTests.cs (1)
206
PInvokeCore.SendMessage(control, PInvokeCore.EM_SETCHARFORMAT, (WPARAM)
PInvoke
.SCF_SELECTION, ref format);
WinFormsControlsTest (4)
RichTextBoxes.cs (1)
53
(WPARAM)
PInvoke
.SCF_SELECTION,
ScalingBeforeChanges.cs (3)
86
PInvoke
.SetWindowPos(
123
dpi =
PInvoke
.GetDpiForWindow(this);
129
dpi =
PInvoke
.GetDpiForWindow(this);