2485 references to PInvoke
System.Windows.Forms (2074)
System\Windows\Forms\Accessibility\AccessibleObject.cs (23)
107private protected static VARIANT CHILDID_SELF { get; } = (VARIANT)(int)PInvoke.CHILDID_SELF; 703internal virtual int GetChildId() => (int)PInvoke.CHILDID_SELF; 932*pidChild = (int)PInvoke.CHILDID_SELF; 1829result = accessible.Value->accDoDefaultAction((VARIANT)(int)PInvoke.CHILDID_SELF); 2017if (!childID.Equals((int)PInvoke.CHILDID_SELF)) 2047? (int)PInvoke.CHILDID_SELF 2632if (SysNavigate(navdir, (VARIANT)(int)PInvoke.CHILDID_SELF, out AccessibleObject? accessibleObject)) 2660return (VARIANT)(int)PInvoke.CHILDID_SELF; 2728HRESULT result = PInvoke.CreateStdAccessibleObject( 2756result = PInvoke.CreateStdAccessibleObject( 2791if ((int)childID != (int)PInvoke.CHILDID_SELF) 2807|| childID.data.intVal == (int)PInvoke.CHILDID_SELF; 2834if (id == (int)PInvoke.CHILDID_SELF) 2990args = [(int)PInvoke.CHILDID_SELF]; 3217&& PInvoke.UiaRaiseNotificationEvent( 3235if (PInvoke.UiaClientsAreListening() && !AppContextSwitches.NoClientNotifications) 3238HRESULT result = PInvoke.UiaRaiseAutomationEvent(provider, eventId); 3247if (PInvoke.UiaClientsAreListening() && !AppContextSwitches.NoClientNotifications) 3250HRESULT result = PInvoke.UiaRaiseAutomationPropertyChangedEvent(provider, propertyId, oldValue, newValue); 3261=> PInvoke.UiaClientsAreListening() 3267if (PInvoke.UiaClientsAreListening() && !AppContextSwitches.NoClientNotifications) 3274result = PInvoke.UiaRaiseStructureChangedEvent(provider, structureChangeType, default, length); 3280result = PInvoke.UiaRaiseStructureChangedEvent(provider, structureChangeType, pRuntimeId, length);
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (2)
470PInvoke.NotifyWinEvent( 544PInvoke.UiaHostProviderFromHwnd(new HandleRef<HWND>(this, HandleInternal), out IRawElementProviderSimple* provider);
System\Windows\Forms\Accessibility\LabelEditAccessibleObject.cs (1)
51PInvoke.UiaHostProviderFromHwnd(target.HWND, out IRawElementProviderSimple* provider);
System\Windows\Forms\Accessibility\LabelEditNativeWindow.cs (13)
39if (!PInvoke.UiaClientsAreListening()) 48_valueChangeHook = PInvoke.SetWinEventHook( 51PInvoke.GetModuleHandle((PCWSTR)null), 55PInvoke.WINEVENT_INCONTEXT); 57_textSelectionChangedHook = PInvoke.SetWinEventHook( 60PInvoke.GetModuleHandle((PCWSTR)null), 64PInvoke.WINEVENT_INCONTEXT); 97PInvoke.UnhookWinEvent(_valueChangeHook); 98PInvoke.UnhookWinEvent(_textSelectionChangedHook); 109PInvoke.UiaReturnRawElementProvider(HWND, wParam: 0, lParam: 0, (IRawElementProviderSimple*)null); 112PInvoke.UiaDisconnectProvider(AccessibilityObject); 152if (m.LParamInternal == PInvoke.UiaRootObjectId) 156m.ResultInternal = PInvoke.UiaReturnRawElementProvider(
System\Windows\Forms\Accessibility\LabelEditUiaTextProvider.cs (2)
54public override bool IsScrollable => ((int)GetWindowStyle(_owningChildEdit) & PInvoke.ES_AUTOHSCROLL) != 0; 385return PInvoke.GetTextExtentPoint32W(hdc.HDC, &item, 1, (SIZE*)psizle);
System\Windows\Forms\ActiveX\AxHost.cs (13)
50= PInvoke.RegisterWindowMessage($"{Application.WindowMessagesVersion}_subclassCheck"); 954uiDeactivate = !PInvoke.IsChild(this, _hwndFocus); 1751PInvoke.GetCursorPos(out Point point); 1763(int)(PInvoke.KF_ALTDOWN | 0x18)), // 0x18 => O key scan code 1764time = PInvoke.GetTickCount(), 1768if (PInvoke.IsAccelerator(new HandleRef<HACCEL>(this, ctlInfo.hAccel), ctlInfo.cAccel, &msg, lpwCmd: null)) 2219HRESULT hr = PInvoke.CoGetClassObject( 2274HRESULT hr = PInvoke.CoGetClassObject( 2411_ = PInvoke.GetFocus(); 2978PInvoke.OleCreatePropertyFrameIndirect(&parameters).AssertSuccess(); 3025PInvoke.OleCreatePropertyFrame( 3682HRESULT hr = PInvoke.OleCreateFontIndirect(in fontDesc, in IID.GetRef<IFont>(), out void* lplpvObj); 3737PInvoke.OleCreateFontIndirect(in fontdesc, in IID.GetRef<IFontDisp>(), out void* lplpvObj).ThrowOnFailure();
System\Windows\Forms\ActiveX\AxHost.State.cs (4)
156if (PInvoke.CreateILockBytesOnHGlobal(hglobal, true, &lockBytes).Failed) 165? PInvoke.StgCreateDocfileOnILockBytes( 170: PInvoke.StgOpenStorageOnILockBytes( 277PInvoke.GetHGlobalFromILockBytes(lockBytes, &hglobal).ThrowOnFailure();
System\Windows\Forms\ActiveX\AxHost.VBFormat.cs (1)
38HRESULT hr = PInvoke.VarFormat(
System\Windows\Forms\ActiveX\Control.ActiveXFontMarshaler.cs (1)
49PInvoke.OleCreateFontIndirect(
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (28)
297HRESULT hr = PInvoke.CreateOleAdviseHolder(&holder); 461PInvoke.LPtoDP(hdcDraw, [p1, p2]); 464PInvoke.SetWindowOrgEx(hdcDraw, 0, 0, &pW); 465PInvoke.SetWindowExtEx(hdcDraw, _control.Width, _control.Height, (SIZE*)&sWindowExt); 466PInvoke.SetViewportOrgEx(hdcDraw, p1.X, p1.Y, &pVp); 467PInvoke.SetViewportExtEx(hdcDraw, p2.X, p2.Y, (SIZE*)&sViewportExt); 473nint flags = PInvoke.PRF_CHILDREN | PInvoke.PRF_CLIENT | PInvoke.PRF_ERASEBKGND | PInvoke.PRF_NONCLIENT; 488PInvoke.SetWindowOrgEx(hdcDraw, pW.X, pW.Y, lppt: null); 489PInvoke.SetWindowExtEx(hdcDraw, sWindowExt.Width, sWindowExt.Height, lpsz: null); 490PInvoke.SetViewportOrgEx(hdcDraw, pVp.X, pVp.Y, lppt: null); 491PInvoke.SetViewportExtEx(hdcDraw, sViewportExt.Width, sViewportExt.Height, lpsz: null); 598hr = dispatch.Value->TryGetProperty(dispid, &property, PInvoke.LCID.USER_DEFAULT.RawValue); 631short scan = PInvoke.VkKeyScan(ch); 675PInvoke.DestroyAcceleratorTable(new HandleRef<HACCEL>(_control, _accelTable)); 681_accelTable = PInvoke.CreateAcceleratorTable(pAccelerators, _accelCount); 855if (PInvoke.SetParent(_control, hwndParent).IsNull) 1666PInvoke.DestroyAcceleratorTable(new HandleRef<HACCEL>(_control, _accelTable)); 1810HWND hWndParent = PInvoke.GetParent(_control); 1879PInvoke.TranslateMessage(lpmsg); 1880if (PInvoke.IsWindowUnicode(lpmsg->hwnd)) 1882PInvoke.DispatchMessage(lpmsg); 1886PInvoke.DispatchMessageA(lpmsg); 1910if (PInvoke.GetKeyState((int)VIRTUAL_KEY.VK_SHIFT) < 0) 1915if (PInvoke.GetKeyState((int)VIRTUAL_KEY.VK_CONTROL) < 0) 1920if (PInvoke.GetKeyState((int)VIRTUAL_KEY.VK_MENU) < 0)
System\Windows\Forms\Application.ComponentManager.cs (6)
239PInvoke.GetMessage(&msg, HWND.Null, 0, 0); 247PInvoke.PostQuitMessage((int)msg.wParam); 259PInvoke.TranslateMessage(msg); 260PInvoke.DispatchMessage(&msg); 295PInvoke.MsgWaitForMultipleObjectsEx( 311PInvoke.WaitMessage();
System\Windows\Forms\Application.ComponentThreadContext.cs (8)
93if (PInvoke.CoRegisterMessageFilter(null, messageFilter).Failed || messageFilter.IsNull) 100PInvoke.CoRegisterMessageFilter(messageFilter, &dummy); 292if (PInvoke.GetMessage(&msg, HWND.Null, 0, 0)) 296PInvoke.TranslateMessage(msg); 297PInvoke.DispatchMessage(&msg); 311PInvoke.WaitMessage(); 428PInvokeCore.GetWindowThreadProcessId(PInvoke.GetActiveWindow(), out uint pid); 429if (pid == PInvoke.GetCurrentProcessId())
System\Windows\Forms\Application.cs (15)
119var hModule = PInvoke.GetModuleHandle(Libraries.Comctl32); 124return PInvoke.GetProcAddress(hModule, (PCSTR)ptr) != 0; 129nint ninthModule = PInvoke.LoadComctl32(StartupPath); 137return PInvoke.GetProcAddress(hModule, (PCSTR)ptr) != 0; 404HWND hwnd = PInvoke.FindWindow(s_systemTrackerWindow, s_systemTrackerWindow); 412bool success = PInvoke.SendMessageCallback(hwnd, PInvokeCore.WM_SYSCOLORCHANGE + MessageId.WM_REFLECT, () => complete = true); 523s_executablePath ??= PInvoke.GetModuleFileNameLongPath(HINSTANCE.Null); 868VisualStyleState vState = (VisualStyleState)PInvoke.GetThemeAppProperties(); 875PInvoke.SetThemeAppProperties((SET_THEME_APP_PROPERTIES_FLAGS)value); 891if (processId == PInvoke.GetCurrentProcessId() && PInvoke.IsWindowVisible(hwnd)) 894PInvoke.RedrawWindow( 1114var moduleHandle = PInvoke.GetModuleHandle(module.Name); 1386Debug.Assert(PInvoke.IsWindow(handle), "Handle being parked is not a valid window handle"); 1624=> PInvoke.SetSuspendState((state == PowerState.Hibernate), force, disableWakeEvent);
System\Windows\Forms\Application.LightThreadContext.cs (5)
91PInvoke.GetMessage(&msg, HWND.Null, 0, 0); 99PInvoke.PostQuitMessage((int)msg.wParam); 108PInvoke.TranslateMessage(msg); 109PInvoke.DispatchMessage(&msg); 136PInvoke.WaitMessage();
System\Windows\Forms\Application.ParkingWindow.cs (3)
92HWND hwndChild = PInvoke.GetWindow(this, GET_WINDOW_CMD.GW_CHILD); 114PInvoke.SetParent(handle, (IHandle<HWND>)this); 128PInvoke.GetParent(handle) != HWND,
System\Windows\Forms\Application.ThreadContext.cs (14)
75PInvoke.DuplicateHandle( 76PInvoke.GetCurrentProcess(), 77PInvoke.GetCurrentThread(), 78PInvoke.GetCurrentProcess(), 301PInvoke.CloseHandle(_handle); 458PInvoke.CloseHandle(_handle); 654PInvoke.PostThreadMessage(_id, PInvokeCore.WM_QUIT, default, default); 753if (PInvoke.IsWindowEnabled(hwndOwner)) 755PInvoke.EnableWindow(hwndOwner, false); 767if (CurrentForm is not null && CurrentForm.IsHandleCreated && PInvoke.IsWindowEnabled(CurrentForm) != modalEnabled) 769PInvoke.EnableWindow(CurrentForm, modalEnabled); 803PInvoke.EnableWindow(hwndOwner, true); 972HWND hwndRoot = PInvoke.GetAncestor(msg.hwnd, GET_ANCESTOR_FLAGS.GA_ROOT); 976if (!hwndRoot.IsNull && PInvoke.IsDialogMessage(hwndRoot, in msg))
System\Windows\Forms\Application.ThreadWindows.cs (11)
33if (PInvoke.IsWindowVisible(hwnd) && PInvoke.IsWindowEnabled(hwnd)) 49if (PInvoke.IsWindow(hwnd)) 61_activeHwnd = PInvoke.GetActiveWindow(); 63_focusedHwnd = activatingControl is not null ? activatingControl.HWND : PInvoke.GetFocus(); 68if (PInvoke.IsWindow(hwnd)) 70PInvoke.EnableWindow(hwnd, enable); 84if (!_activeHwnd.IsNull && PInvoke.IsWindow(_activeHwnd)) 86PInvoke.SetActiveWindow(_activeHwnd); 89if (!_focusedHwnd.IsNull && PInvoke.IsWindow(_focusedHwnd)) 91PInvoke.SetFocus(_focusedHwnd);
System\Windows\Forms\ComponentModel\COM2Interop\COM2ComponentEditor.cs (4)
21hr = propertyBrowsing.Value->MapPropertyToPage(PInvoke.MEMBERID_NIL, &guid); 59hr = propertyBrowsing.Value->MapPropertyToPage(PInvoke.MEMBERID_NIL, &guid); 66PInvoke.OleCreatePropertyFrame( 101PInvoke.OleCreatePropertyFrame(
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyBuilderUITypeEditor.cs (1)
31HWND parentHandle = PInvoke.GetFocus();
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (2)
879hr = PInvoke.GetErrorInfo(0, errorInfo); 899uint result = PInvoke.FormatMessage(
System\Windows\Forms\ComponentModel\COM2Interop\COM2PropertyPageUITypeConverter.cs (2)
28HWND parentHandle = PInvoke.GetFocus(); 78PInvoke.OleCreatePropertyFrame(
System\Windows\Forms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (4)
256properties = InternalGetProperties(dispatch, typeInfo, PInvoke.MEMBERID_NIL); 622|| (dispidToGet != PInvoke.MEMBERID_NIL && functionDescription->memid != dispidToGet)) 713enumTypeInfo->GetDocumentation(PInvoke.MEMBERID_NIL, &enumNameBstr, &enumHelpStringBstr, null, null); 845|| (dispidToGet != PInvoke.MEMBERID_NIL && pVarDesc->memid != dispidToGet))
System\Windows\Forms\ComponentModel\COM2Interop\ComNativeDescriptor.cs (2)
91PInvoke.MEMBERID_NIL, 247attributes.AddRange(Com2IManagedPerPropertyBrowsingHandler.GetComponentAttributes(browsing, PInvoke.MEMBERID_NIL));
System\Windows\Forms\ContextMenuStrip.cs (1)
137&& DeviceDpi != (int)PInvoke.GetDpiForWindow(this))
System\Windows\Forms\Control.cs (143)
75private static readonly uint WM_GETCONTROLNAME = PInvoke.RegisterWindowMessage("WM_GETCONTROLNAME"); 76private static readonly uint WM_GETCONTROLTYPE = PInvoke.RegisterWindowMessage("WM_GETCONTROLTYPE"); 1298public bool CanFocus => IsHandleCreated && PInvoke.IsWindowVisible(this) && PInvoke.IsWindowEnabled(this); 1328get => IsHandleCreated && PInvoke.GetCapture() == HWND; 1338PInvoke.SetCapture(this); 1342PInvoke.ReleaseCapture(); 1490HWND focusHwnd = PInvoke.GetFocus(); 1491return !focusHwnd.IsNull && (focusHwnd == Handle || PInvoke.IsChild(this, focusHwnd)); 1559if ((PInvoke.GetModuleHandle(Libraries.Comctl32) != 0) 1560|| (PInvoke.LoadComctl32(Application.StartupPath) != 0)) 1760PInvoke.GetCursorPos(out Point p); 1762if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND) 1764PInvokeCore.SendMessage(this, PInvokeCore.WM_SETCURSOR, (WPARAM)HWND, (LPARAM)(int)PInvoke.HTCLIENT); 2059=> IsHandleCreated && PInvoke.GetFocus() == InternalHandle; 2440HWND parentHandle = PInvoke.GetParent(this); 2450length = PInvoke.GetClassName(lastParentHandle, lpClassName, buffer.Length); 2463parentHandle = PInvoke.GetParent(parentHandle); 2516!(next = PInvoke.GetWindow(prev, GET_WINDOW_CMD.GW_HWNDPREV)).IsNull; 2520if (PInvoke.IsWindowVisible(next)) 2781if (PInvoke.GetKeyState((int)Keys.ShiftKey) < 0) 2786if (PInvoke.GetKeyState((int)Keys.ControlKey) < 0) 2791if (PInvoke.GetKeyState((int)Keys.Menu) < 0) 2810if (PInvoke.GetKeyState((int)Keys.LButton) < 0) 2815if (PInvoke.GetKeyState((int)Keys.RButton) < 0) 2820if (PInvoke.GetKeyState((int)Keys.MButton) < 0) 2825if (PInvoke.GetKeyState((int)Keys.XButton1) < 0) 2830if (PInvoke.GetKeyState((int)Keys.XButton2) < 0) 2846PInvoke.GetCursorPos(out Point pt); 3006PInvoke.SetWindowRgn(this, default, PInvoke.IsWindowVisible(this)); 3014if (PInvoke.SetWindowRgn(this, regionHandle, PInvoke.IsWindowVisible(this)) != 0) 3543uint actionMask = PInvoke.UISF_HIDEACCEL << 16; 3551(WPARAM)(actionMask | PInvoke.UIS_SET)); 3591int actionMask = (int)(PInvoke.UISF_HIDEACCEL | PInvoke.UISF_HIDEFOCUS) << 16; 3597(WPARAM)(actionMask | (int)PInvoke.UIS_SET)); 3753returnValue = PInvoke.GetExitCodeThread(threadHandle, &exitCode); 3861PInvoke.SetWindowText(this, value); 4434PInvoke.NotifyWinEvent((uint)accEvent, this, objectID, childID + 1); 4614else if (IsHandleCreated && GetTopLevel() && PInvoke.IsWindowEnabled(this)) 4616PInvoke.SetWindowPos( 4800if (cp.X != PInvoke.CW_USEDEFAULT) 4805if (cp.Y != PInvoke.CW_USEDEFAULT) 4972PInvoke.DefMDIChildProc(InternalHandle, PInvokeCore.WM_CLOSE, default, default); 5230(LPARAM)(PInvoke.PRF_CHILDREN | PInvoke.PRF_CLIENT | PInvoke.PRF_ERASEBKGND | PInvoke.PRF_NONCLIENT)); 5415PInvoke.SetFocus(this); 5457hwnd = PInvoke.GetAncestor(hwnd, GET_ANCESTOR_FLAGS.GA_PARENT); 5532HWND hwnd = PInvoke.ChildWindowFromPointEx(this, pt, (CWP_FLAGS)value); 5655PInvoke.XBUTTON1 => MouseButtons.XButton1, 5656PInvoke.XBUTTON2 => MouseButtons.XButton2, 5691for (HWND hWndChild = PInvoke.GetWindow(this, GET_WINDOW_CMD.GW_CHILD); 5693hWndChild = PInvoke.GetWindow(new HandleRef<HWND>(this, hWndChild), GET_WINDOW_CMD.GW_HWNDNEXT)) 6019return hwnd.IsNull || PInvoke.IsWindow(hwnd) 6066PInvoke.TrackMouseEvent(ref _trackMouseEvent); 6135PInvoke.RedrawWindow( 6145PInvoke.InvalidateRgn( 6176PInvoke.RedrawWindow( 6186PInvoke.InvalidateRect( 6224PInvoke.RedrawWindow( 6234PInvoke.InvalidateRect( 6521int result = PInvoke.GetKeyState((int)keyVal); 6555? (int)(PInvoke.DLGC_WANTCHARS | PInvoke.DLGC_WANTALLKEYS | PInvoke.DLGC_WANTTAB) 6556: (int)(PInvoke.DLGC_WANTCHARS | PInvoke.DLGC_WANTALLKEYS); 6581uint mask = PInvoke.DLGC_WANTALLKEYS; 6585mask = PInvoke.DLGC_WANTALLKEYS | PInvoke.DLGC_WANTTAB; 6591mask = PInvoke.DLGC_WANTALLKEYS | PInvoke.DLGC_WANTARROWS; 6692PInvoke.AdjustWindowRectExForDpi(ref rect, style, bMenu, exStyle, (uint)dpi); 6696PInvoke.AdjustWindowRectEx(ref rect, style, bMenu, exStyle); 6752s_threadCallbackMessage = PInvoke.RegisterWindowMessage($"{Application.WindowMessagesVersion}_ThreadCallbackMessage"); 7195PInvoke.SetWindowPos( 7231PInvoke.EnableWindow(this, Enabled); 7683if (PInvoke.SetParent(this, parent).IsNull) 7780uint flags = PInvoke.PRF_CHILDREN | PInvoke.PRF_CLIENT | PInvoke.PRF_ERASEBKGND | PInvoke.PRF_NONCLIENT; 7989PInvoke.SetWindowText(this, _text); 8006_ = PInvoke.SetWindowTheme( 8043Properties.AddOrRemoveValue(s_deviceDpiInternal, (int)PInvoke.GetDpiForWindow(this)); 8096if (PInvoke.GetScrollInfo(this, SCROLLBAR_CONSTANTS.SB_HORZ, ref si)) 9520Debug.Assert((lParam & (long)PInvoke.PRF_CHILDREN) != 0, 9524lParam = (nint)(lParam & (long)~PInvoke.PRF_CHILDREN); 9556PrintToMetaFile_SendPrintMessage(hDC, (nint)(lParam & (long)~PInvoke.PRF_CLIENT)); 9568PrintToMetaFile_SendPrintMessage(hDC, (nint)(lParam & (long)~PInvoke.PRF_NONCLIENT)); 9597lParam |= PInvoke.PRF_CHILDREN; 9798if ((current & PInvoke.UISF_HIDEACCEL) != 0) 9801toClear |= PInvoke.UISF_HIDEACCEL; 9807if ((current & PInvoke.UISF_HIDEFOCUS) != 0) 9810toClear |= PInvoke.UISF_HIDEFOCUS; 9831PInvoke.GetParent(topMostParent).IsNull ? PInvokeCore.WM_CHANGEUISTATE : PInvokeCore.WM_UPDATEUISTATE, 9832(WPARAM)((int)PInvoke.UIS_CLEAR | ((int)toClear << 16))); 9974HWND parentHandle = PInvoke.GetParent(this); 10079&& PInvoke.IsWindow(parentHandle)) 10084if (PInvoke.SetParent(this, parentHandle) == IntPtr.Zero) 10099_ = PInvoke.SetWindowTheme( 10179PInvoke.UiaReturnRawElementProvider(handle, 0, 0, (IRawElementProviderSimple*)null); 10184PInvoke.UiaDisconnectProvider(accessibleObject, skipOSCheck: true); 10781PInvoke.SetWindowPos( 10924PInvoke.SetWindowPos(this, HWND.Null, x, y, width, height, flags); 10995HWND parentHandle = PInvoke.GetParent(this); 11034if (PInvoke.SetParent(this, value).IsNull) 11052if (PInvoke.SetParent(this, HWND.Null).IsNull) 11162PInvoke.ShowWindow(HWND, value ? ShowParams : SHOW_WINDOW_CMD.SW_HIDE); 11181PInvoke.SetWindowPos( 11228if (!PInvoke.IsWindowVisible(this)) 11242PInvoke.SetWindowPos( 11258PInvoke.DwmSetWindowAttribute( 11573PInvoke.UpdateWindow(this); 11595PInvokeCore.MapWindowPoints(HWND.Null, PInvoke.GetParent(this), ref rect); 11687while (!(hWnd = PInvoke.GetWindow(hWnd, GET_WINDOW_CMD.GW_HWNDPREV)).IsNull) 11725HWND parentHandle = PInvoke.GetParent(this); 11766if (PInvoke.GetWindow(control, GET_WINDOW_CMD.GW_HWNDPREV) != previous) 11771PInvoke.SetWindowPos( 11833PInvoke.SetWindowPos( 11874parentHandle = PInvoke.GetParent(parentHandle); 12047if (m.LParamInternal == PInvoke.UiaRootObjectId && SupportsUiaProviders) 12051m.ResultInternal = PInvoke.UiaReturnRawElementProvider( 12305newDeviceDpi = (int)PInvoke.GetDpiForWindow(this); 12418&& PInvoke.WindowFromPoint(screenLocation) == HWND; 12489case PInvoke.TTN_SHOW: 12496case PInvoke.TTN_POP: 12526HWND dialogItem = PInvoke.GetDlgItem(m.HWND, controlId); 12711if ((HWND)m.WParamInternal == InternalHandle && m.LParamInternal.LOWORD == PInvoke.HTCLIENT) 12770hWnd = PInvoke.GetDlgItem(this, m.WParamInternal.HIWORD); 12908if (cmd == PInvoke.UIS_INITIALIZE) 12922if ((m.WParamInternal.HIWORD & PInvoke.UISF_HIDEACCEL) != 0) 12925bool showKeyboard = (cmd == PInvoke.UIS_CLEAR); 12943if ((m.WParamInternal.HIWORD & PInvoke.UISF_HIDEFOCUS) != 0) 12946bool showFocus = cmd == PInvoke.UIS_CLEAR; 12982&& PInvoke.GetParent(this) == _parent.InternalHandle 13093if ((m.WParamInternal & 0xFFF0) == PInvoke.SC_KEYMENU && ToolStripManager.ProcessMenuKey(ref m)) 13285m.ResultInternal = (LRESULT)(nint)PInvoke.NFR_UNICODE; 13658PInvoke.GetKeyboardState(b);
System\Windows\Forms\Control.Ime.cs (24)
186ctl = FromChildHandle(PInvoke.GetFocus()); 268HWND focusHandle = PInvoke.GetFocus(); 278focusHandle = PInvoke.GetAncestor(focusHandle, GET_ANCESTOR_FLAGS.GA_ROOT); 597if (wparam is ((int)PInvoke.IMN_SETCONVERSIONMODE) or ((int)PInvoke.IMN_SETOPENSTATUS)) 698HIMC oldContext = PInvoke.ImmAssociateContext((HWND)handle, (HIMC)IntPtr.Zero); 712HIMC inputContext = PInvoke.ImmGetContext((HWND)handle); 719inputContext = PInvoke.ImmCreateContext(); 722PInvoke.ImmAssociateContext((HWND)handle, inputContext); 727PInvoke.ImmAssociateContext((HWND)handle, s_originalImeContext); 732PInvoke.ImmReleaseContext((HWND)handle, inputContext); 760inputContext = PInvoke.ImmGetContext((HWND)handle); 779PInvoke.ImmGetConversionStatus(inputContext, &conversion, &sentence); 810PInvoke.ImmReleaseContext((HWND)handle, inputContext); 821HIMC inputContext = PInvoke.ImmGetContext((HWND)handle); 827retval = PInvoke.ImmGetOpenStatus(inputContext); 828PInvoke.ImmReleaseContext((HWND)handle, inputContext); 905HIMC inputContext = PInvoke.ImmGetContext((HWND)handle); 908PInvoke.ImmGetConversionStatus(inputContext, &conversion, &sentence); 913PInvoke.ImmSetConversionStatus(inputContext, conversion, sentence); 915PInvoke.ImmReleaseContext((HWND)handle, inputContext); 932HIMC inputContext = PInvoke.ImmGetContext((HWND)handle); 936bool succeeded = PInvoke.ImmSetOpenStatus(inputContext, open); 941succeeded = PInvoke.ImmReleaseContext((HWND)handle, inputContext);
System\Windows\Forms\Control.MetafileDCWrapper.cs (4)
143PInvoke.GetSystemPaletteEntries(hdcSrc, 0, (uint)colorEntryCount, (PALETTEENTRY*)ppal); 159int diRet = PInvoke.GetDIBits( 191int iRet = PInvoke.StretchDIBits( 206if (iRet == PInvoke.GDI_ERROR)
System\Windows\Forms\Controls\Buttons\Button.cs (6)
115cp.ClassName = PInvoke.WC_BUTTON; 119cp.Style |= PInvoke.BS_OWNERDRAW; 123cp.Style |= PInvoke.BS_PUSHBUTTON; 127cp.Style |= PInvoke.BS_DEFPUSHBUTTON; 240if (PInvoke.WindowFromPoint(PointToScreen(mevent.Location)) == HWND && !ValidationCancelled) 307if (m.WParamInternal.HIWORD == PInvoke.BN_CLICKED)
System\Windows\Forms\Controls\Buttons\ButtonBase.cs (13)
276cp.Style |= PInvoke.BS_MULTILINE; 280cp.Style |= PInvoke.BS_DEFPUSHBUTTON; 287cp.Style |= PInvoke.BS_LEFT; 291cp.Style |= PInvoke.BS_RIGHT; 295cp.Style |= PInvoke.BS_CENTER; 300cp.Style |= PInvoke.BS_TOP; 304cp.Style |= PInvoke.BS_BOTTOM; 308cp.Style |= PInvoke.BS_VCENTER; 1173PInvokeCore.SendMessage(this, PInvoke.BM_SETSTATE, (WPARAM)(BOOL)true); 1201PInvokeCore.SendMessage(this, PInvoke.BM_SETSTATE, (WPARAM)(BOOL)false); 1400case PInvoke.BM_CLICK: 1417case PInvoke.BM_SETSTATE: 1464if (m.WParamInternal.HIWORD == PInvoke.BN_CLICKED && !ValidationCancelled)
System\Windows\Forms\Controls\Buttons\ButtonInternal\CheckBoxBaseAdapter.cs (2)
114PInvoke.FillRect(hdc, rect, hbrush); 314PInvoke.DrawFrameControl(
System\Windows\Forms\Controls\Buttons\CheckBox.cs (8)
253PInvokeCore.SendMessage(this, PInvoke.BM_SETCHECK, (WPARAM)(int)_checkState); 297cp.ClassName = PInvoke.WC_BUTTON; 300cp.Style |= PInvoke.BS_OWNERDRAW; 304cp.Style |= PInvoke.BS_3STATE; 307cp.Style |= PInvoke.BS_PUSHLIKE; 314cp.Style |= PInvoke.BS_RIGHTBUTTON; 594PInvokeCore.SendMessage(this, PInvoke.BM_SETCHECK, (WPARAM)(int)_checkState); 665&& PInvoke.WindowFromPoint(PointToScreen(mevent.Location)) == HWND)
System\Windows\Forms\Controls\Buttons\RadioButton.cs (9)
175PInvokeCore.SendMessage(this, PInvoke.BM_SETCHECK, (WPARAM)(BOOL)value); 232cp.ClassName = PInvoke.WC_BUTTON; 235cp.Style |= PInvoke.BS_OWNERDRAW; 239cp.Style |= PInvoke.BS_RADIOBUTTON; 242cp.Style |= PInvoke.BS_PUSHLIKE; 249cp.Style |= PInvoke.BS_RIGHTBUTTON; 380PInvokeCore.SendMessage(this, PInvoke.BM_SETCHECK, (WPARAM)(BOOL)_isChecked); 457if (PInvoke.GetKeyState((int)Keys.Tab) >= 0) 608&& PInvoke.WindowFromPoint(PointToScreen(mevent.Location)) == HWND)
System\Windows\Forms\Controls\ComboBox\ComboBox.ACNativeWindow.cs (1)
36internal bool Visible => PInvoke.IsWindowVisible(this);
System\Windows\Forms\Controls\ComboBox\ComboBox.AutoCompleteDropDownFinder.cs (1)
42int length = PInvoke.GetClassName(hwnd, (PWSTR)b, buffer.Length);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxAccessibleObject.cs (3)
142PInvoke.UiaDisconnectProvider(value); 149PInvoke.UiaDisconnectProvider(_dropDownButtonUiaProvider); 159PInvoke.UiaDisconnectProvider(itemAccessibleObject, skipOSCheck: true);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildEditUiaProvider.cs (1)
88PInvoke.UiaHostProviderFromHwnd(new HandleRef<HWND>(this, _handle), out IRawElementProviderSimple* provider);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildListUiaProvider.cs (1)
183PInvoke.UiaHostProviderFromHwnd(new HandleRef<HWND>(this, _childListControlhandle), out IRawElementProviderSimple* provider);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildNativeWindow.cs (5)
62PInvoke.UiaReturnRawElementProvider(HWND, wParam: 0, lParam: 0, (IRawElementProviderSimple*)null); 65PInvoke.UiaDisconnectProvider(accessibilityObject); 125if (m.LParamInternal != PInvoke.UiaRootObjectId && (int)m.LParamInternal != (int)OBJECT_IDENTIFIER.OBJID_CLIENT) 134if (m.LParamInternal == PInvoke.UiaRootObjectId) 138m.ResultInternal = PInvoke.UiaReturnRawElementProvider(
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxItemAccessibleObject.cs (4)
43PInvoke.LB_GETITEMRECT, 47if (result == PInvoke.LB_ERR) 185PInvokeCore.SendMessage(_owningComboBox, PInvoke.CB_SETTOPINDEX, (WPARAM)GetCurrentIndex()); 203PInvoke.InvalidateRect(_owningComboBox.GetListHandle(), lpRect: null, bErase: false);
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxUiaTextProvider.cs (2)
75return ((int)GetWindowStyle(_owningChildEdit) & PInvoke.ES_AUTOHSCROLL) != 0; 460return PInvoke.GetTextExtentPoint32W(hdc, &item, 1, (SIZE*)pSize);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (72)
354cp.ClassName = PInvoke.WC_COMBOBOX; 355cp.Style |= (int)WINDOW_STYLE.WS_VSCROLL | PInvoke.CBS_HASSTRINGS | PInvoke.CBS_AUTOHSCROLL; 360cp.Style |= PInvoke.CBS_NOINTEGRALHEIGHT; 366cp.Style |= PInvoke.CBS_SIMPLE; 370cp.Style |= PInvoke.CBS_DROPDOWN; 376cp.Style |= PInvoke.CBS_DROPDOWNLIST; 385cp.Style |= PInvoke.CBS_OWNERDRAWFIXED; 389cp.Style |= PInvoke.CBS_OWNERDRAWVARIABLE; 464PInvokeCore.SendMessage(this, PInvoke.CB_SETDROPPEDWIDTH, (WPARAM)value); 507get => IsHandleCreated && (int)PInvokeCore.SendMessage(this, PInvoke.CB_GETDROPPEDSTATE) != 0; 515PInvokeCore.SendMessage(this, PInvoke.CB_SHOWDROPDOWN, (WPARAM)(value ? -1 : 0)); 575HWND focus = PInvoke.GetFocus(); 638int height = (int)PInvokeCore.SendMessage(this, PInvoke.CB_GETITEMHEIGHT); 746PInvokeCore.SendMessage(this, PInvoke.CB_LIMITTEXT, (WPARAM)value); 944get => IsHandleCreated ? (int)PInvokeCore.SendMessage(this, PInvoke.CB_GETCURSEL) : _selectedIndex; 957PInvokeCore.SendMessage(this, PInvoke.CB_SETCURSEL, (WPARAM)value); 1051PInvokeCore.SendMessage(this, PInvoke.CB_GETEDITSEL, (WPARAM)(&start), (LPARAM)(&end)); 1072PInvokeCore.SendMessage(this, PInvoke.CB_GETEDITSEL, (WPARAM)(&value)); 1825&& m.HWnd == _childEdit.Handle && PARAM.LOWORD(m.LParamInternal) == (int)PInvoke.HTCLIENT) 1941PInvoke.InvalidateRect(_childEdit, lpRect: null, bErase: false); 1946PInvoke.InvalidateRect(_childListBox, lpRect: null, bErase: false); 2036int h = (int)PInvokeCore.SendMessage(this, PInvoke.CB_GETITEMHEIGHT, (WPARAM)index); 2188PInvoke.RedrawWindow( 2229int insertIndex = (int)PInvokeCore.SendMessage(this, PInvoke.CB_ADDSTRING, (WPARAM)0, GetItemText(item)); 2245PInvokeCore.SendMessage(this, PInvoke.CB_RESETCONTENT); 2258int maxLength = (int)PInvokeCore.SendMessage(this, PInvoke.CB_GETLBTEXTLEN, (WPARAM)index); 2259if (maxLength == PInvoke.LB_ERR) 2267int actualLength = (int)PInvokeCore.SendMessage(this, PInvoke.CB_GETLBTEXT, (WPARAM)index, (LPARAM)b); 2268Debug.Assert(actualLength != PInvoke.LB_ERR, "Should have validated the index above"); 2269return actualLength == PInvoke.LB_ERR ? string.Empty : buffer[..Math.Min(maxLength, actualLength)].ToString(); 2280int insertIndex = (int)PInvokeCore.SendMessage(this, PInvoke.CB_INSERTSTRING, (WPARAM)index, GetItemText(item)); 2307PInvokeCore.SendMessage(this, PInvoke.CB_DELETESTRING, (WPARAM)index); 2342PInvokeCore.SendMessage(this, PInvoke.CB_LIMITTEXT, (WPARAM)MaxLength); 2354HWND hwnd = PInvoke.GetWindow(this, GET_WINDOW_CMD.GW_CHILD); 2364hwnd = PInvoke.GetWindow(new HandleRef<HWND>(this, hwnd), GET_WINDOW_CMD.GW_HWNDNEXT); 2371PInvokeCore.SendMessage(_childEdit, PInvokeCore.EM_SETMARGINS, (WPARAM)(PInvoke.EC_LEFTMARGIN | PInvoke.EC_RIGHTMARGIN)); 2377PInvokeCore.SendMessage(this, PInvoke.CB_SETDROPPEDWIDTH, (WPARAM)dropDownWidth); 2408bool hasComboBoxInfo = PInvoke.GetComboBoxInfo( 2414PInvoke.SetWindowTheme(HWND, $"{DarkModeIdentifier}_{ComboBoxButtonThemeIdentifier}", null); 2419PInvoke.SetWindowTheme( 2449PInvokeCore.SendMessage(this, PInvoke.CB_SETCURSEL, (WPARAM)_selectedIndex); 2996PInvoke.NotifyWinEvent( 3000(int)PInvoke.CHILDID_SELF); 3160PInvoke.UiaDisconnectProvider(_childTextAccessibleObject); 3208PInvoke.SHAutoComplete( 3235PInvoke.SHAutoComplete( 3264PInvoke.SHAutoComplete( 3278PInvoke.SHAutoComplete( 3318PInvoke.SHAutoComplete(_childEdit.HWND, (SHELL_AUTOCOMPLETE_FLAGS)AutoCompleteSource | mode); 3336PInvokeCore.SendMessage(this, PInvoke.CB_SETEDITSEL, (WPARAM)0, LPARAM.MAKELPARAM(start, end)); 3380PInvokeCore.SendMessage(this, PInvoke.CB_SETCURSEL, (WPARAM)DataManager.Position); 3451PInvoke.SetWindowPos( 3478PInvokeCore.SendMessage(this, PInvoke.CB_SETITEMHEIGHT, (WPARAM)(-1), (LPARAM)ItemHeight); 3479PInvokeCore.SendMessage(this, PInvoke.CB_SETITEMHEIGHT, 0, ItemHeight); 3483PInvokeCore.SendMessage(this, PInvoke.CB_SETITEMHEIGHT, (WPARAM)(-1), (LPARAM)ItemHeight); 3487int original = (int)PInvokeCore.SendMessage(this, PInvoke.CB_GETITEMHEIGHT, (WPARAM)i); 3492PInvokeCore.SendMessage(this, PInvoke.CB_SETITEMHEIGHT, (WPARAM)i, (LPARAM)mievent.ItemHeight); 3641case PInvoke.CBN_DBLCLK: 3643case PInvoke.CBN_EDITUPDATE: 3646case PInvoke.CBN_CLOSEUP: 3656case PInvoke.CBN_DROPDOWN: 3663case PInvoke.CBN_EDITCHANGE: 3666case PInvoke.CBN_SELCHANGE: 3670case PInvoke.CBN_SELENDOK: 3757&& m.ResultInternal != PInvoke.HTCLIENT) 3762m.ResultInternal = (LRESULT)(nint)PInvoke.HTCLIENT; 3937bool getRegionSucceeded = PInvoke.GetUpdateRgn(HWND, windowRegion, bErase: true) != GDI_REGION_TYPE.RGN_ERROR; 3941PInvoke.GetRgnBox(windowRegion, &updateRegionBoundingRect); 4081if (((nint)m.LParamInternal & PInvoke.PRF_CLIENT) == PInvoke.PRF_CLIENT)
System\Windows\Forms\Controls\ComboBox\ComboBox.Modern.cs (12)
56PInvoke.CB_GETITEMHEIGHT, 102if (PInvoke.GetComboBoxInfo( 254PInvoke.CB_GETITEMHEIGHT, 290return !PInvoke.GetComboBoxInfo( 362if (!PInvoke.GetComboBoxInfo( 416PInvoke.CB_GETITEMHEIGHT, 426PInvoke.CB_SETITEMHEIGHT, 458(WPARAM)(PInvoke.EC_LEFTMARGIN | PInvoke.EC_RIGHTMARGIN), 474PInvoke.SetWindowPos( 602_ = PInvoke.DwmSetWindowAttribute( 621if (PInvoke.GetComboBoxInfo(
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (2)
42PInvoke.UiaDisconnectProvider(_topRowAccessibilityObject, skipOSCheck: true); 45PInvoke.UiaDisconnectProvider(_selectedCellsAccessibilityObject, skipOSCheck: true);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (24)
5707PInvoke.PatBlt(dc, r.X, r.Y, r.Width, DATAGRIDVIEW_shadowEdgeThickness, ROP_CODE.PATINVERT); 5708PInvoke.PatBlt(dc, r.X, r.Y + r.Height - DATAGRIDVIEW_shadowEdgeThickness, r.Width, DATAGRIDVIEW_shadowEdgeThickness, ROP_CODE.PATINVERT); 5709PInvoke.PatBlt(dc, r.X, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, ROP_CODE.PATINVERT); 5710PInvoke.PatBlt(dc, r.X + r.Width - DATAGRIDVIEW_shadowEdgeThickness, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, ROP_CODE.PATINVERT); 5725PInvoke.PatBlt(dc, r.X, r.Y, r.Width, r.Height, ROP_CODE.PATINVERT); 16479Debug.Assert(_cumulativeVerticalWheelDelta > -PInvoke.WHEEL_DELTA); 16480Debug.Assert(_cumulativeVerticalWheelDelta < PInvoke.WHEEL_DELTA); 16481Debug.Assert(_cumulativeHorizontalWheelDelta > -PInvoke.WHEEL_DELTA); 16482Debug.Assert(_cumulativeHorizontalWheelDelta < PInvoke.WHEEL_DELTA); 16489partialNotches = _cumulativeVerticalWheelDelta / (float)PInvoke.WHEEL_DELTA; 16494partialNotches = _cumulativeHorizontalWheelDelta / (float)PInvoke.WHEEL_DELTA; 16519_cumulativeVerticalWheelDelta -= fullNotches * (int)PInvoke.WHEEL_DELTA; 16532_cumulativeHorizontalWheelDelta -= fullNotches * (int)PInvoke.WHEEL_DELTA; 16574_cumulativeVerticalWheelDelta -= (int)(scrollBands * (PInvoke.WHEEL_DELTA / (float)wheelScrollLines)); 16601_cumulativeVerticalWheelDelta -= (int)(scrollBands * (PInvoke.WHEEL_DELTA / (float)wheelScrollLines)); 16632_cumulativeHorizontalWheelDelta -= (int)(scrollBands * (PInvoke.WHEEL_DELTA / (float)wheelScrollLines)); 26250PInvoke.ScrollWindow( 26365PInvoke.ScrollWindow(this, 0, deltaY, &scrollArea, &scrollArea); 28337AccessibilityNotifyClients(AccessibleEvents.Reorder, (int)OBJECT_IDENTIFIER.OBJID_CLIENT, (int)PInvoke.CHILDID_SELF); 30015m.ResultInternal = (LRESULT)(m.ResultInternal | (nint)PInvoke.DLGC_WANTARROWS | (nint)PInvoke.DLGC_WANTCHARS); 30020m.ResultInternal = (LRESULT)(m.ResultInternal | (nint)PInvoke.DLGC_WANTTAB); 30032if (nmhdr->code == PInvoke.TTN_GETDISPINFOW && !DesignMode) 30039PInvokeCore.SendMessage(nmhdr->hwndFrom, PInvoke.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (2)
1059PInvoke.SetFocus(default); 3862PInvoke.UiaDisconnectProvider(AccessibilityObject);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (1)
1361PInvoke.DrawFrameControl(
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (3)
618PInvokeCore.SendMessage(comboBox, PInvoke.CB_SETDROPPEDWIDTH, (WPARAM)s_cachedDropDownWidth); 625int dropDownWidth = (int)PInvokeCore.SendMessage(comboBox, PInvoke.CB_GETDROPPEDWIDTH); 628PInvokeCore.SendMessage(comboBox, PInvoke.CB_SETDROPPEDWIDTH, (WPARAM)DropDownWidth);
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (1)
1746PInvoke.UiaDisconnectProvider(AccessibilityObject);
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (41)
49private const uint TIMEFORMAT_NOUPDOWN = PInvoke.DTS_TIMEFORMAT & (~PInvoke.DTS_UPDOWN); 192SetControlColor(PInvoke.MCSC_TEXT, value); 252SetControlColor(PInvoke.MCSC_TITLEBK, value); 275SetControlColor(PInvoke.MCSC_TITLETEXT, value); 298SetControlColor(PInvoke.MCSC_TRAILINGTEXT, value); 321SetControlColor(PInvoke.MCSC_MONTHBK, value); 341nint result = PInvokeCore.SendMessage(this, PInvoke.DTM_GETSYSTEMTIME, 0, ref systemTime); 359PInvokeCore.SendMessage(this, PInvoke.DTM_SETSYSTEMTIME, (WPARAM)(uint)NMDATETIMECHANGE_FLAGS.GDT_VALID, ref systemTime); 363PInvokeCore.SendMessage(this, PInvoke.DTM_SETSYSTEMTIME, (WPARAM)(uint)NMDATETIMECHANGE_FLAGS.GDT_NONE); 391cp.ClassName = PInvoke.DATETIMEPICK_CLASS; 398cp.Style |= (int)PInvoke.DTS_LONGDATEFORMAT; 445PInvokeCore.SendMessage(this, PInvoke.DTM_SETFORMATW, 0, _customFormat); 478get => (_style & PInvoke.DTS_RIGHTALIGN) != 0 ? LeftRightAlignment.Right : LeftRightAlignment.Left; 483SetStyleBit(value == LeftRightAlignment.Right, PInvoke.DTS_RIGHTALIGN); 788get => (_style & PInvoke.DTS_SHOWNONE) != 0; 789set => SetStyleBit(value, PInvoke.DTS_SHOWNONE); 800get => (_style & PInvoke.DTS_UPDOWN) != 0; 805SetStyleBit(value, PInvoke.DTS_UPDOWN); 894PInvokeCore.SendMessage(this, PInvoke.DTM_SETSYSTEMTIME, (WPARAM)(uint)NMDATETIMECHANGE_FLAGS.GDT_VALID, ref systemTime); 960PInvoke.InitCommonControlsEx(new INITCOMMONCONTROLSEX 975PInvokeCore.SendMessage(this, PInvoke.DTM_SETSYSTEMTIME, (uint)NMDATETIMECHANGE_FLAGS.GDT_VALID, ref systemTime); 979PInvokeCore.SendMessage(this, PInvoke.DTM_SETSYSTEMTIME, (uint)NMDATETIMECHANGE_FLAGS.GDT_NONE); 984PInvokeCore.SendMessage(this, PInvoke.DTM_SETFORMATW, 0, _customFormat); 1261PInvokeCore.SendMessage(this, PInvoke.DTM_SETSYSTEMTIME, (uint)NMDATETIMECHANGE_FLAGS.GDT_VALID, ref systemTime); 1278PInvokeCore.SendMessage(this, PInvoke.DTM_SETMCCOLOR, (WPARAM)(int)colorIndex, (LPARAM)value); 1289PInvokeCore.SendMessage(this, PInvoke.DTM_SETMCFONT, (WPARAM)CalendarFontHandle, (LPARAM)(-1)); 1298SetControlColor(PInvoke.MCSC_MONTHBK, _calendarMonthBackground); 1299SetControlColor(PInvoke.MCSC_TEXT, _calendarForeColor); 1300SetControlColor(PInvoke.MCSC_TITLEBK, _calendarTitleBackColor); 1301SetControlColor(PInvoke.MCSC_TITLETEXT, _calendarTitleForeColor); 1302SetControlColor(PInvoke.MCSC_TRAILINGTEXT, _calendarTrailingText); 1318uint flags = PInvoke.GDTR_MIN | PInvoke.GDTR_MAX; 1319PInvokeCore.SendMessage(this, PInvoke.DTM_SETRANGE, (WPARAM)flags, ref times[0]); 1444PInvoke.InvalidateRect(c.hwndFound, lpRect: (RECT*)null, bErase: true); 1445PInvoke.UpdateWindow(c.hwndFound); 1503HWND handle = (HWND)PInvokeCore.SendMessage(this, PInvoke.DTM_GETMONTHCAL); 1536case PInvoke.DTN_CLOSEUP: 1539case PInvoke.DTN_DATETIMECHANGE: 1542case PInvoke.DTN_DROPDOWN:
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.DateTimePickerAccessibleObject.cs (1)
145PInvokeCore.SendMessage(owner, PInvoke.DTM_CLOSEMONTHCAL);
System\Windows\Forms\Controls\GroupBox\GroupBox.cs (4)
118cp.ClassName = PInvoke.WC_BUTTON; 119cp.Style |= PInvoke.BS_GROUPBOX; 125cp.Style &= ~PInvoke.BS_GROUPBOX; 717PInvoke.FillRect((HDC)m.WParamInternal, rect, hbrush);
System\Windows\Forms\Controls\ImageList\ImageList.cs (9)
215if (PInvoke.ImageList.GetIconSize(new HandleRef<HIMAGELIST>(this, _nativeImageList.HIMAGELIST), out int x, out int y)) 221if (PInvoke.ImageList.GetImageInfo(new HandleRef<HIMAGELIST>(this, _nativeImageList.HIMAGELIST), 0, out IMAGEINFO imageInfo)) 353int index = PInvoke.ImageList.ReplaceIcon(this, -1, new HandleRef<HICON>(icon, (HICON)icon.Handle)); 382index = PInvoke.ImageList.Add(this, hBitmap, hMask); 428PInvoke.InitCommonControls(); 434PInvoke.ImageList.SetBkColor(this, (COLORREF)PInvokeCore.CLR_NONE); 531PInvoke.ImageList.DrawEx( 616if (PInvoke.ImageList.GetImageInfo(this, index, out IMAGEINFO imageInfo)) 667PInvoke.ImageList.DrawEx(
System\Windows\Forms\Controls\ImageList\ImageList.ImageCollection.cs (4)
87return PInvoke.ImageList.GetImageCount(_owner); 163ok = PInvoke.ImageList.Replace(_owner, index, hBitmap, hMask); 423PInvoke.ImageList.Remove(_owner, -1); 548if (!PInvoke.ImageList.Remove(_owner, index))
System\Windows\Forms\Controls\ImageList\ImageList.NativeImageList.cs (4)
28himl = PInvoke.ImageList_Read(stream); 38himl = PInvoke.ImageList_Create(imageSize.Width, imageSize.Height, flags, InitialCapacity, GrowBy); 75PInvoke.ImageList.Destroy(this); 99HIMAGELIST himl = PInvoke.ImageList_Duplicate(HIMAGELIST);
System\Windows\Forms\Controls\ImageList\ImageListStreamer.cs (3)
76PInvoke.InitCommonControls(); 130return PInvoke.ImageList.WriteEx( 140return PInvoke.ImageList.Write(handle, stream);
System\Windows\Forms\Controls\Labels\Label.cs (3)
249cp.ClassName = PInvoke.WC_STATIC; 1435m.ResultInternal = (LRESULT)(nint)(rectInScreen.Contains(pt) ? PInvoke.HTCLIENT : PInvoke.HTNOWHERE);
System\Windows\Forms\Controls\Labels\LinkLabel.cs (6)
308PInvoke.GetCursorPos(out Point p); 310if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND) 312PInvokeCore.SendMessage(this, PInvokeCore.WM_SETCURSOR, (WPARAM)HWND, (LPARAM)(int)PInvoke.HTCLIENT); 450PInvoke.UiaDisconnectProvider(link.AccessibleObject, skipOSCheck: true); 1371(int)PInvoke.GetNearestColor(hdc, (COLORREF)(uint)ColorTranslator.ToWin32(foreBrush.Color)).Value); 1760if ((HWND)m.WParamInternal == InternalHandle && m.LParamInternal.LOWORD == PInvoke.HTCLIENT)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (12)
53private static uint LBC_GETCHECKSTATE { get; } = PInvoke.RegisterWindowMessage("LBC_GETCHECKSTATE"); 54private static uint LBC_SETCHECKSTATE { get; } = PInvoke.RegisterWindowMessage("LBC_SETCHECKSTATE"); 100cp.Style |= PInvoke.LBS_OWNERDRAWFIXED | PInvoke.LBS_WANTKEYBOARDINPUT; 392PInvokeCore.SendMessage(this, PInvoke.LB_GETITEMRECT, (WPARAM)index, ref rect); 393PInvoke.InvalidateRect(this, &rect, bErase: false); 464PInvokeCore.SendMessage(this, PInvoke.LB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)ItemHeight); 754PInvoke.InvalidateRect(this, null, true); 763PInvokeCore.SendMessage(this, PInvoke.LB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)ItemHeight); 895case PInvoke.LBN_SELCHANGE: 900case PInvoke.LBN_DBLCLK: 949m.ResultInternal = (LRESULT)PInvoke.LB_ERR;
System\Windows\Forms\Controls\ListBoxes\ListBox.AccessibleObject.cs (2)
134PInvoke.UiaDisconnectProvider(itemAccessibleObject, skipOSCheck: true); 161PInvoke.UiaDisconnectProvider(value);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (55)
30public const int NoMatches = PInvoke.LB_ERR; 257PInvokeCore.SendMessage(this, PInvoke.LB_SETCOLUMNWIDTH, (WPARAM)_columnWidth); 270cp.ClassName = PInvoke.WC_LISTBOX; 272cp.Style |= (int)WINDOW_STYLE.WS_VSCROLL | PInvoke.LBS_NOTIFY | PInvoke.LBS_HASSTRINGS; 275cp.Style |= PInvoke.LBS_DISABLENOSCROLL; 280cp.Style |= PInvoke.LBS_NOINTEGRALHEIGHT; 285cp.Style |= PInvoke.LBS_USETABSTOPS; 300cp.Style |= PInvoke.LBS_MULTICOLUMN | (int)WINDOW_STYLE.WS_HSCROLL; 310cp.Style |= PInvoke.LBS_NOSEL; 313cp.Style |= PInvoke.LBS_MULTIPLESEL; 316cp.Style |= PInvoke.LBS_EXTENDEDSEL; 327cp.Style |= PInvoke.LBS_OWNERDRAWFIXED; 330cp.Style |= PInvoke.LBS_OWNERDRAWVARIABLE; 421internal int FocusedIndex => IsHandleCreated ? (int)PInvokeCore.SendMessage(this, PInvoke.LB_GETCARETINDEX) : -1; 596PInvokeCore.SendMessage(this, PInvoke.LB_SETITEMHEIGHT, 0, value); 837return (int)PInvokeCore.SendMessage(this, PInvoke.LB_GETCURSEL); 1115get => IsHandleCreated ? (int)PInvokeCore.SendMessage(this, PInvoke.LB_GETTOPINDEX) : _topIndex; 1120PInvokeCore.SendMessage(this, PInvoke.LB_SETTOPINDEX, (WPARAM)value); 1425int height = (int)PInvokeCore.SendMessage(this, PInvoke.LB_GETITEMHEIGHT, (WPARAM)index); 1446if (PInvokeCore.SendMessage(this, PInvoke.LB_GETITEMRECT, (uint)index, ref rect) == 0) 1480int selection = (int)PInvokeCore.SendMessage(this, PInvoke.LB_GETSEL, (WPARAM)index); 1517int index = (int)PInvokeCore.SendMessage(this, PInvoke.LB_ITEMFROMPOINT, 0, PARAM.FromLowHigh(x, y)); 1534int insertIndex = (int)PInvokeCore.SendMessage(this, PInvoke.LB_ADDSTRING, 0, GetItemText(item)); 1535if (insertIndex == PInvoke.LB_ERRSPACE) 1540if (insertIndex == PInvoke.LB_ERR) 1558PInvokeCore.SendMessage(this, PInvoke.LB_RESETCONTENT); 1567int maxLength = (int)PInvokeCore.SendMessage(this, PInvoke.LB_GETTEXTLEN, (WPARAM)index); 1568if (maxLength == PInvoke.LB_ERR) 1576int actualLength = (int)PInvokeCore.SendMessage(this, PInvoke.LB_GETTEXT, (WPARAM)index, (LPARAM)b); 1577Debug.Assert(actualLength != PInvoke.LB_ERR, "Should have validated the index above"); 1578return actualLength == PInvoke.LB_ERR ? string.Empty : buffer[..Math.Min(maxLength, actualLength)].ToString(); 1589int insertIndex = (int)PInvokeCore.SendMessage(this, PInvoke.LB_INSERTSTRING, (uint)index, GetItemText(item)); 1591if (insertIndex == PInvoke.LB_ERRSPACE) 1596if (insertIndex == PInvoke.LB_ERR) 1616bool selected = (int)PInvokeCore.SendMessage(this, PInvoke.LB_GETSEL, (WPARAM)index) > 0; 1617PInvokeCore.SendMessage(this, PInvoke.LB_DELETESTRING, (WPARAM)index); 1639PInvokeCore.SendMessage(this, PInvoke.LB_SETCURSEL, (WPARAM)(value ? index : -1)); 1643PInvokeCore.SendMessage(this, PInvoke.LB_SETSEL, (WPARAM)(BOOL)value, (LPARAM)index); 1666int index = (int)PInvokeCore.SendMessage(this, PInvoke.LB_GETCURSEL); 1676int count = (int)PInvokeCore.SendMessage(this, PInvoke.LB_GETSELCOUNT); 1682PInvokeCore.SendMessage(this, PInvoke.LB_GETSELITEMS, (WPARAM)count, (LPARAM)pResult); 1747PInvokeCore.SendMessage(this, PInvoke.LB_SETLOCALE, (WPARAM)PInvokeCore.GetThreadLocale()); 1751PInvokeCore.SendMessage(this, PInvoke.LB_SETCOLUMNWIDTH, (WPARAM)_columnWidth); 1756PInvokeCore.SendMessage(this, PInvoke.LB_SETITEMHEIGHT, (WPARAM)0, (LPARAM)ItemHeight); 1761PInvokeCore.SendMessage(this, PInvoke.LB_SETTOPINDEX, (WPARAM)_topIndex); 1772PInvokeCore.SendMessage(this, PInvoke.LB_SETTABSTOPS, (WPARAM)wpar, (LPARAM)pOffsets); 2118PInvokeCore.SendMessage(this, PInvoke.LB_SETCURSEL, (WPARAM)DataManager.Position); 2257PInvokeCore.SendMessage(this, PInvoke.LB_SETHORIZONTALEXTENT, (WPARAM)width); 2314PInvokeCore.SendMessage(this, PInvoke.LB_SETTABSTOPS, (WPARAM)wpar, (nint)pOffsets); 2324if (((nint)m.LParamInternal & PInvoke.PRF_NONCLIENT) != 0 && Application.RenderWithVisualStyles && BorderStyle == BorderStyle.Fixed3D) 2339case PInvoke.LBN_SELCHANGE: 2343case PInvoke.LBN_DBLCLK: 2422if (captured && PInvoke.WindowFromPoint(PointToScreen(point)) == HWND) 2462if (Capture && PInvoke.WindowFromPoint(PointToScreen((Point)m.LParamInternal)) == HWND)
System\Windows\Forms\Controls\ListBoxes\ListBox.ItemAccessibleObject.cs (6)
207PInvokeCore.SendMessage(_owningListBox, PInvoke.LB_SETCARETINDEX, (WPARAM)currentIndex); 211int firstVisibleIndex = (int)PInvokeCore.SendMessage(_owningListBox, PInvoke.LB_GETTOPINDEX); 214PInvokeCore.SendMessage(_owningListBox, PInvoke.LB_SETTOPINDEX, (WPARAM)currentIndex); 224int itemHeight = (int)PInvokeCore.SendMessage(_owningListBox, PInvoke.LB_GETITEMHEIGHT, (WPARAM)i); 236PInvokeCore.SendMessage(_owningListBox, PInvoke.LB_SETTOPINDEX, (WPARAM)(currentIndex - visibleItemsCount + 1)); 252PInvoke.InvalidateRect(_owningListBox, lpRect: null, bErase: false);
System\Windows\Forms\Controls\ListBoxes\ListBox.SelectedObjectCollection.cs (1)
55return (int)PInvokeCore.SendMessage(_owner, PInvoke.LB_GETSELCOUNT);
System\Windows\Forms\Controls\ListView\ColumnHeader.cs (5)
395HWND hwndHdr = (HWND)PInvokeCore.SendMessage(ListView, PInvoke.LVM_GETHEADER); 398int nativeColumnCount = (int)PInvokeCore.SendMessage(hwndHdr, PInvoke.HDM_GETITEMCOUNT); 401_width = (int)PInvokeCore.SendMessage(ListView, PInvoke.LVM_GETCOLUMNWIDTH, (WPARAM)Index); 467PInvoke.UiaDisconnectProvider(_accessibilityObject); 483PInvokeCore.SendMessage(ListView, PInvoke.LVM_SETCOLUMNORDERARRAY, (WPARAM)cols.Length, (LPARAM)pCols);
System\Windows\Forms\Controls\ListView\ItemBoundsPortion.cs (4)
14Entire = (int)PInvoke.LVIR_BOUNDS, 19Icon = (int)PInvoke.LVIR_ICON, 24Label = (int)PInvoke.LVIR_LABEL, 29ItemOnly = (int)PInvoke.LVIR_SELECTBOUNDS,
System\Windows\Forms\Controls\ListView\ListView.ColumnHeaderCollection.cs (2)
334PInvokeCore.SendMessage(_owner, PInvoke.LVM_DELETECOLUMN, (WPARAM)colIdx); 507int retval = (int)PInvokeCore.SendMessage(_owner, PInvoke.LVM_DELETECOLUMN, (WPARAM)index);
System\Windows\Forms\Controls\ListView\ListView.cs (243)
354PInvokeCore.SendMessage(this, PInvoke.LVM_SETBKCOLOR, (WPARAM)0, (LPARAM)BackColor); 404PInvokeCore.SendMessage(this, PInvoke.LVM_SETBKIMAGEW, (WPARAM)0, ref lvbkImage); 559PInvokeCore.SendMessage(this, PInvoke.LVM_SETIMAGELIST, (WPARAM)PInvoke.LVSIL_STATE, (LPARAM)_imageListState.Handle); 563PInvokeCore.SendMessage(this, PInvoke.LVM_SETIMAGELIST, PInvoke.LVSIL_STATE); 634cp.ClassName = PInvoke.WC_LISTVIEW; 643cp.Style |= (int)PInvoke.LVS_SHAREIMAGELISTS; 648cp.Style |= (int)PInvoke.LVS_ALIGNTOP; 651cp.Style |= (int)PInvoke.LVS_ALIGNLEFT; 657cp.Style |= (int)PInvoke.LVS_AUTOARRANGE; 673cp.Style |= (int)PInvoke.LVS_NOCOLUMNHEADER; 676cp.Style |= (int)PInvoke.LVS_NOSORTHEADER; 682cp.Style |= (int)PInvoke.LVS_EDITLABELS; 687cp.Style |= (int)PInvoke.LVS_NOLABELWRAP; 692cp.Style |= (int)PInvoke.LVS_SHOWSELALWAYS; 697cp.Style |= (int)PInvoke.LVS_SINGLESEL; 705cp.Style |= (int)PInvoke.LVS_SORTASCENDING; 708cp.Style |= (int)PInvoke.LVS_SORTDESCENDING; 715cp.Style |= (int)PInvoke.LVS_OWNERDATA; 812PInvoke.LVM_GETNEXTITEM, 814(LPARAM)PInvoke.LVNI_FOCUSED); 841PInvokeCore.SendMessage(this, PInvoke.LVM_SETTEXTCOLOR, (WPARAM)0, (LPARAM)ForeColor); 956PInvoke.LVM_SETIMAGELIST, 957(WPARAM)PInvoke.LVSIL_GROUPHEADER, 1220PInvoke.LVM_SETIMAGELIST, 1221(WPARAM)PInvoke.LVSIL_NORMAL, 1457PInvokeCore.SendMessage(this, PInvoke.LVM_SETIMAGELIST, (WPARAM)PInvoke.LVSIL_SMALL, (LPARAM)(value?.Handle ?? 0)); 1563PInvoke.LVM_SETIMAGELIST, 1564(WPARAM)PInvoke.LVSIL_STATE, 1580PInvokeCore.SendMessage(this, PInvoke.LVM_SETIMAGELIST, (WPARAM)PInvoke.LVSIL_STATE); 1600PInvoke.LVM_SETIMAGELIST, 1601(WPARAM)PInvoke.LVSIL_STATE, 1661PInvokeCore.SendMessage(this, PInvoke.LVM_GETTILEVIEWINFO, (WPARAM)0, ref tileViewInfo); 1691nint result = PInvokeCore.SendMessage(this, PInvoke.LVM_SETTILEVIEWINFO, (WPARAM)0, ref tileViewInfo); 1724_topIndex = (int)PInvokeCore.SendMessage(this, PInvoke.LVM_GETTOPINDEX); 1835PInvokeCore.SendMessage(this, PInvoke.LVM_SETVIEW, (WPARAM)(int)_viewStyle); 1884topIndex = (int)PInvokeCore.SendMessage(this, PInvoke.LVM_GETTOPINDEX); 1891PInvokeCore.SendMessage(this, PInvoke.LVM_SETITEMCOUNT, (WPARAM)_virtualListSize); 2187HWND hwnd = (HWND)PInvokeCore.SendMessage(this, PInvoke.LVM_GETHEADER); 2204if (PInvoke.GetScrollInfo(this, SCROLLBAR_CONSTANTS.SB_HORZ, ref si)) 2210&& PInvokeCore.SendMessage(hwnd, PInvoke.HDM_HITTEST, (WPARAM)0, ref lvhi) != -1 && lvhi.iItem > -1) 2254case PInvoke.LVA_DEFAULT: 2255case (ListViewAlignment)PInvoke.LVA_ALIGNLEFT: 2256case (ListViewAlignment)PInvoke.LVA_ALIGNTOP: 2257case (ListViewAlignment)PInvoke.LVA_SNAPTOGRID: 2260PInvokeCore.PostMessage(this, PInvoke.LVM_ARRANGE, (WPARAM)(int)value); 2279public void ArrangeIcons() => ArrangeIcons(PInvoke.LVA_DEFAULT); 2563PInvoke.InitCommonControlsEx(new INITCOMMONCONTROLSEX 2599m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_NOTIFYITEMDRAW; 2604m.ResultInternal = (LRESULT)(nint)(PInvoke.CDRF_NOTIFYSUBITEMDRAW | PInvoke.CDRF_NEWFONT); 2621m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_NEWFONT; 2664m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_NOTIFYSUBITEMDRAW; 2670m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_SKIPDEFAULT; 2682m.ResultInternal = (LRESULT)(nint)(PInvoke.CDRF_NOTIFYSUBITEMDRAW | PInvoke.CDRF_NEWFONT); 2757m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_SKIPDEFAULT; 2767m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_NEWFONT; 2918m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_NEWFONT; 2929m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_DODEFAULT; 2936m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_DODEFAULT; 3179if (PInvokeCore.SendMessage(this, PInvoke.LVM_HASGROUP, (WPARAM)DefaultGroup.ID) == 0) 3198PInvokeCore.SendMessage(this, PInvoke.LVM_ENSUREVISIBLE, (WPARAM)index); 3318PInvoke.LVM_FINDITEMW, 3368PInvokeCore.SendMessage(this, PInvoke.LVM_SETEXTENDEDLISTVIEWSTYLE, (WPARAM)PInvoke.LVS_EX_CHECKBOXES); 3371PInvoke.LVM_SETEXTENDEDLISTVIEWSTYLE, 3372(WPARAM)PInvoke.LVS_EX_CHECKBOXES, 3373(LPARAM)PInvoke.LVS_EX_CHECKBOXES); 3423displayIndex = (int)PInvokeCore.SendMessage(this, PInvoke.LVM_FINDITEMW, (WPARAM)(lastIndex - 1), ref info); 3428displayIndex = (int)PInvokeCore.SendMessage(this, PInvoke.LVM_FINDITEMW, (WPARAM)(-1) /* beginning */, ref info); 3488int displayIndex = (int)PInvokeCore.SendMessage(this, PInvoke.LVM_HITTEST, (WPARAM)0, ref lvhi); 3537int index = (int)PInvokeCore.SendMessage(this, PInvoke.LVM_SUBITEMHITTEST, (WPARAM)0, ref lvhi); 3553PInvokeCore.SendMessage(this, PInvoke.LVM_GETITEMPOSITION, (WPARAM)index, ref position); 3570return (LIST_VIEW_ITEM_STATE_FLAGS)(uint)PInvokeCore.SendMessage(this, PInvoke.LVM_GETITEMSTATE, (WPARAM)index, (LPARAM)(uint)mask); 3599return PInvokeCore.SendMessage(this, PInvoke.LVM_GETITEMRECT, (WPARAM)index, ref itemrect) == 0 3628return PInvokeCore.SendMessage(this, PInvoke.LVM_GETITEMRECT, (WPARAM)index, ref itemrect) == 0 3676return PInvokeCore.SendMessage(this, PInvoke.LVM_GETSUBITEMRECT, (WPARAM)itemIndex, ref itemrect) == 0 3707PInvokeCore.SendMessage(this, PInvoke.LVM_SETIMAGELIST, (WPARAM)PInvoke.LVSIL_GROUPHEADER, handle); 3725? (int)PInvokeCore.SendMessage(this, PInvoke.LVM_SUBITEMHITTEST, (WPARAM)0, ref lvhi) 3726: (int)PInvokeCore.SendMessage(this, PInvoke.LVM_HITTEST, (WPARAM)0, ref lvhi); 3796HWND header = (HWND)PInvokeCore.SendMessage(this, PInvoke.LVM_GETHEADER); 3799PInvoke.InvalidateRect(new HandleRef<HWND>(this, header), lpRect: null, bErase: true); 3932return (int)PInvokeCore.SendMessage(this, PInvoke.LVM_INSERTCOLUMNW, (WPARAM)index, ref lvColumn); 3977PInvokeCore.SendMessage(this, PInvoke.LVM_GETITEMW, (WPARAM)0, ref lvItem); 3990nint result = SendGroupMessage(group, PInvoke.LVM_INSERTGROUP, index, LVGROUP_MASK.LVGF_GROUPID); 4120PInvokeCore.SendMessage(this, PInvoke.LVM_SETITEMCOUNT, (WPARAM)_itemCount); 4147IntPtr result = PInvokeCore.SendMessage(this, PInvoke.LVM_ISGROUPVIEWENABLED); 4149result = PInvokeCore.SendMessage(this, PInvoke.LVM_HASGROUP, (WPARAM)lvItem.iGroupId); 4194PInvoke.LVM_INSERTITEMW, 4307PInvokeCore.SendMessage(this, PInvoke.LVM_SETIMAGELIST, (WPARAM)PInvoke.LVSIL_NORMAL, (LPARAM)handle); 4516PInvokeCore.SendMessage(this, PInvoke.LVM_UPDATE, (WPARAM)(-1)); 4535int version = (int)PInvokeCore.SendMessage(this, PInvoke.CCM_GETVERSION); 4538PInvokeCore.SendMessage(this, PInvoke.CCM_SETVERSION, (WPARAM)5); 4544PInvokeCore.SendMessage(this, PInvoke.LVM_SETBKCOLOR, (WPARAM)0, (LPARAM)BackColor); 4545PInvokeCore.SendMessage(this, PInvoke.LVM_SETTEXTCOLOR, (WPARAM)0, (LPARAM)ForeColor); 4551PInvokeCore.SendMessage(this, PInvoke.LVM_SETTEXTBKCOLOR, (WPARAM)0, (LPARAM)PInvokeCore.CLR_NONE); 4558style |= (int)PInvoke.LVS_NOSCROLL; 4565LIST_VIEW_ITEM_STATE_FLAGS callbackMask = (LIST_VIEW_ITEM_STATE_FLAGS)(int)PInvokeCore.SendMessage(this, PInvoke.LVM_GETCALLBACKMASK); 4567PInvokeCore.SendMessage(this, PInvoke.LVM_SETCALLBACKMASK, (WPARAM)(uint)callbackMask); 4572PInvokeCore.SendMessage(this, PInvoke.LVM_SETVIEW, (WPARAM)(uint)_viewStyle); 4628PInvokeCore.SendMessage(this, PInvoke.LVM_SETITEMCOUNT, (WPARAM)VirtualListSize); 4675uint exMask = PInvoke.LVS_EX_ONECLICKACTIVATE | PInvoke.LVS_EX_TWOCLICKACTIVATE | 4676PInvoke.LVS_EX_TRACKSELECT | PInvoke.LVS_EX_UNDERLINEHOT | 4677PInvoke.LVS_EX_ONECLICKACTIVATE | PInvoke.LVS_EX_HEADERDRAGDROP | 4678PInvoke.LVS_EX_CHECKBOXES | PInvoke.LVS_EX_FULLROWSELECT | 4679PInvoke.LVS_EX_GRIDLINES | PInvoke.LVS_EX_INFOTIP | PInvoke.LVS_EX_DOUBLEBUFFER; 4682exStyle |= PInvoke.LVS_EX_DOUBLEBUFFER; 4686PInvoke.LVM_SETEXTENDEDLISTVIEWSTYLE, 4691_ = PInvoke.SetWindowTheme( 4699PInvoke.LVM_GETHEADER, 4704PInvoke.SetWindowTheme( 4927PInvokeCore.SendMessage(this, PInvoke.LVM_SETBKCOLOR, (WPARAM)0, (LPARAM)BackColor); 4931PInvokeCore.SendMessage(this, PInvoke.LVM_SETTEXTBKCOLOR, (WPARAM)0, (LPARAM)PInvokeCore.CLR_NONE); 4942HWND headerWindow = PInvoke.GetWindow(this, GET_WINDOW_CMD.GW_CHILD); 4954PInvokeCore.SendMessage(headerWindow, PInvoke.HDM_LAYOUT, (WPARAM)0, ref hd); 4957PInvoke.SetWindowPos( 4989PInvokeCore.SendMessage(this, PInvoke.LVM_SETBKCOLOR, (WPARAM)0, (LPARAM)c); 4996PInvokeCore.SendMessage(this, PInvoke.LVM_SETTEXTCOLOR, (WPARAM)0, (LPARAM)c); 5002PInvokeCore.SendMessage(this, PInvoke.LVM_SETIMAGELIST, (WPARAM)PInvoke.LVSIL_NORMAL, (LPARAM)_imageListLarge.Handle); 5007PInvokeCore.SendMessage(this, PInvoke.LVM_SETIMAGELIST, (WPARAM)PInvoke.LVSIL_SMALL, (LPARAM)_imageListSmall.Handle); 5012PInvokeCore.SendMessage(this, PInvoke.LVM_SETIMAGELIST, (WPARAM)PInvoke.LVSIL_STATE, (LPARAM)_imageListState.Handle); 5017PInvokeCore.SendMessage(this, PInvoke.LVM_SETIMAGELIST, (WPARAM)PInvoke.LVSIL_GROUPHEADER, (LPARAM)_imageListGroup.Handle); 5041int retval = (int)PInvokeCore.SendMessage(this, PInvoke.LVM_REDRAWITEMS, (WPARAM)startIndex, (LPARAM)endIndex); 5149PInvokeCore.SendMessage(this, PInvoke.LVM_REMOVEGROUP, (WPARAM)group.ID); 5155PInvokeCore.SendMessage(this, PInvoke.LVM_SCROLL, (WPARAM)0, (LPARAM)scrollY); 5196PInvokeCore.SendMessage(this, PInvoke.LVM_SETBKIMAGEW, (WPARAM)0, ref backgroundImage); 5277result = PInvokeCore.SendMessage(this, PInvoke.LVM_SETCOLUMNW, (WPARAM)ch.Index, ref lvColumn); 5319if (width == PInvoke.LVSCW_AUTOSIZE_USEHEADER) 5323else if (width == PInvoke.LVSCW_AUTOSIZE) 5332width = PInvoke.LVSCW_AUTOSIZE_USEHEADER; 5337width = PInvoke.LVSCW_AUTOSIZE; 5342PInvokeCore.SendMessage(this, PInvoke.LVM_SETCOLUMNWIDTH, (WPARAM)columnIndex, LPARAM.MAKELPARAM(width, 0)); 5354PInvoke.LVM_SETCOLUMNWIDTH, 5365PInvokeCore.SendMessage(this, PInvoke.LVM_SETCOLUMNWIDTH, (WPARAM)index, LPARAM.MAKELPARAM(width, 0)); 5385PInvoke.LVM_SETCOLUMNORDERARRAY, 5424HWND oldHandle = (HWND)PInvokeCore.SendMessage(this, PInvoke.LVM_SETTOOLTIPS, toolTip); 5425PInvoke.DestroyWindow(oldHandle); 5445PInvokeCore.SendMessage(this, PInvoke.LVM_SETITEMW, (WPARAM)0, ref lvItem); 5465PInvokeCore.SendMessage(this, PInvoke.LVM_SETITEMW, (WPARAM)0, ref lvItem); 5481PInvokeCore.SendMessage(this, PInvoke.LVM_SETITEMPOSITION32, (WPARAM)index, ref pt); 5501PInvokeCore.SendMessage(this, PInvoke.LVM_SETITEMSTATE, (WPARAM)index, ref lvItem); 5519int colWidth = (int)PInvokeCore.SendMessage(this, PInvoke.LVM_GETCOLUMNWIDTH); 5538PInvokeCore.SendMessage(this, PInvoke.LVM_SETITEMTEXTW, (WPARAM)itemIndex, ref lvItem); 5554PInvokeCore.SendMessage(this, PInvoke.LVM_SETSELECTIONMARK, (WPARAM)0, itemIndex); 5565PInvokeCore.SendMessage(this, PInvoke.LVM_SETIMAGELIST, (WPARAM)PInvoke.LVSIL_SMALL, (LPARAM)handle); 5585PInvokeCore.SendMessage(this, PInvoke.LVM_SORTITEMS, (WPARAM)0, (LPARAM)callbackPointer); 5598PInvokeCore.SendMessage(this, PInvoke.LVM_SETIMAGELIST, (WPARAM)PInvoke.LVSIL_STATE, (LPARAM)handle); 5640PInvokeCore.SendMessage(this, PInvoke.LVM_UPDATE, (WPARAM)(-1)); 5672exStyle |= PInvoke.LVS_EX_ONECLICKACTIVATE; 5675exStyle |= PInvoke.LVS_EX_TWOCLICKACTIVATE; 5681exStyle |= PInvoke.LVS_EX_HEADERDRAGDROP; 5686exStyle |= PInvoke.LVS_EX_CHECKBOXES; 5691exStyle |= PInvoke.LVS_EX_DOUBLEBUFFER; 5696exStyle |= PInvoke.LVS_EX_FULLROWSELECT; 5701exStyle |= PInvoke.LVS_EX_GRIDLINES; 5706exStyle |= PInvoke.LVS_EX_TRACKSELECT; 5711exStyle |= PInvoke.LVS_EX_UNDERLINEHOT; 5716exStyle |= PInvoke.LVS_EX_INFOTIP; 5726uint exMask = PInvoke.LVS_EX_ONECLICKACTIVATE | PInvoke.LVS_EX_TWOCLICKACTIVATE | 5727PInvoke.LVS_EX_TRACKSELECT | PInvoke.LVS_EX_UNDERLINEHOT | 5728PInvoke.LVS_EX_ONECLICKACTIVATE | PInvoke.LVS_EX_HEADERDRAGDROP | 5729PInvoke.LVS_EX_CHECKBOXES | PInvoke.LVS_EX_FULLROWSELECT | 5730PInvoke.LVS_EX_GRIDLINES | PInvoke.LVS_EX_INFOTIP | PInvoke.LVS_EX_DOUBLEBUFFER; 5736PInvoke.LVM_SETEXTENDEDLISTVIEWSTYLE, 5748nint result = SendGroupMessage(group, PInvoke.LVM_SETGROUPINFO, group.ID, 0); 5854int retval = (int)PInvokeCore.SendMessage(this, PInvoke.LVM_ENABLEGROUPVIEW, (WPARAM)(BOOL)GroupsEnabled); 5875nint retval = PInvokeCore.SendMessage(this, PInvoke.LVM_SETTILEVIEWINFO, (WPARAM)0, ref tileViewInfo); 5894int displayIndex = (int)PInvokeCore.SendMessage(this, PInvoke.LVM_SUBITEMHITTEST, (WPARAM)0, ref lvhi); 5936int displayIndex = (int)PInvokeCore.SendMessage(this, PInvoke.LVM_HITTEST, (WPARAM)0, ref lvhi); 6011&& nmhdr->code == PInvoke.NM_CUSTOMDRAW) 6018m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_NOTIFYITEMDRAW; 6027m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_DODEFAULT; 6032if (nmhdr->code == PInvoke.NM_CUSTOMDRAW && PInvoke.UiaClientsAreListening()) 6043if (nmhdr->code == PInvoke.NM_CUSTOMDRAW && OwnerDraw) 6053m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_NOTIFYITEMDRAW; 6060Color foreColor = PInvoke.GetTextColor(nmcd->hdc); 6061Color backColor = PInvoke.GetBkColor(nmcd->hdc); 6075m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_DODEFAULT; 6080m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_SKIPDEFAULT; 6092m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_DODEFAULT; 6096if (nmhdr->code == PInvoke.NM_RELEASEDCAPTURE && _listViewState[LISTVIEWSTATE_columnClicked]) 6102if (nmhdr->code == PInvoke.HDN_BEGINTRACKW) 6124if (nmhdr->code == PInvoke.HDN_ITEMCHANGINGW) 6159if ((nmhdr->code == PInvoke.HDN_ITEMCHANGEDW) && 6211if (nmhdr->code == PInvoke.HDN_ENDTRACKW) 6239if (nmhdr->code == PInvoke.HDN_ENDDRAG) 6306if (nmhdr->code == PInvoke.HDN_DIVIDERDBLCLICKW) 6378HWND hwndHdr = (HWND)PInvokeCore.SendMessage(this, PInvoke.LVM_GETHEADER); 6386return (int)PInvokeCore.SendMessage(this, PInvoke.LVM_HITTEST, (WPARAM)0, ref lvhi); 6411int groupID = (int)PInvokeCore.SendMessage(this, PInvoke.LVM_HITTEST, (WPARAM)(-1), ref lvhi); 6457PInvokeCore.SendMessage(this, PInvoke.LVM_SETIMAGELIST, (WPARAM)PInvoke.LVSIL_STATE); 6469case PInvoke.NM_CUSTOMDRAW: 6473case PInvoke.LVN_BEGINLABELEDITW: 6499_labelEdit.AssignHandle(PInvokeCore.SendMessage(this, PInvoke.LVM_GETEDITCONTROL)); 6505case PInvoke.LVN_COLUMNCLICK: 6513case PInvoke.LVN_LINKCLICK: 6529case PInvoke.LVN_ENDLABELEDITW: 6557case PInvoke.LVN_ITEMACTIVATE: 6561case PInvoke.LVN_BEGINDRAG: 6576case PInvoke.LVN_BEGINRDRAG: 6591case PInvoke.LVN_ITEMCHANGING: 6612case PInvoke.LVN_ITEMCHANGED: 6704case PInvoke.NM_CLICK: 6707goto case PInvoke.NM_RCLICK; 6709case PInvoke.NM_RCLICK: 6712MouseButtons button = nmhdr->code == PInvoke.NM_CLICK ? MouseButtons.Left : MouseButtons.Right; 6730case PInvoke.NM_DBLCLK: 6733goto case PInvoke.NM_RDBLCLK; 6735case PInvoke.NM_RDBLCLK: 6750case PInvoke.LVN_KEYDOWN: 6799case PInvoke.LVN_ODCACHEHINT: 6806if (nmhdr->code == PInvoke.LVN_GETDISPINFOW) 6856else if (nmhdr->code == PInvoke.LVN_ODSTATECHANGED) 6872else if (nmhdr->code == PInvoke.LVN_GETINFOTIPW) 6885PInvokeCore.SendMessage(nmhdr->hwndFrom, PInvoke.TTM_SETMAXTIPWIDTH, (WPARAM)0, (LPARAM)SystemInformation.MaxWindowTrackSize.Width); 6895else if (nmhdr->code == PInvoke.LVN_ODFINDITEMW) 6959if (((nint)m.LParamInternal & PInvoke.PRF_NONCLIENT) != 0 && Application.RenderWithVisualStyles && BorderStyle == BorderStyle.Fixed3D)
System\Windows\Forms\Controls\ListView\ListView.ListViewNativeItemCollection.cs (7)
202PInvokeCore.SendMessage(_owner, PInvoke.LVM_GETITEMW, (WPARAM)0, ref lvItem); 228PInvoke.LVM_GETNEXTITEM, 230(LPARAM)PInvoke.LVNI_SELECTED); 247PInvoke.LVM_GETNEXTITEM, 248(WPARAM)nextSelected, (LPARAM)PInvoke.LVNI_SELECTED); 261PInvokeCore.SendMessage(_owner, PInvoke.LVM_DELETEALLITEMS); 421if (PInvokeCore.SendMessage(_owner, PInvoke.LVM_DELETEITEM, (WPARAM)index) == 0)
System\Windows\Forms\Controls\ListView\ListView.SelectedIndexCollection.cs (5)
32return (int)PInvokeCore.SendMessage(_owner, PInvoke.LVM_GETSELECTEDCOUNT); 60PInvoke.LVM_GETNEXTITEM, 62(LPARAM)PInvoke.LVNI_SELECTED); 108PInvoke.LVM_GETNEXTITEM, 110(LPARAM)PInvoke.LVNI_SELECTED);
System\Windows\Forms\Controls\ListView\ListView.SelectedListViewItemCollection.cs (6)
32int cnt = (int)PInvokeCore.SendMessage(_owner, PInvoke.LVM_GETSELECTEDCOUNT); 42PInvoke.LVM_GETNEXTITEM, 44(LPARAM)PInvoke.LVNI_SELECTED); 94return (int)PInvokeCore.SendMessage(_owner, PInvoke.LVM_GETSELECTEDCOUNT); 131PInvoke.LVM_GETNEXTITEM, 133(LPARAM)PInvoke.LVNI_SELECTED);
System\Windows\Forms\Controls\ListView\ListViewAlignment.cs (4)
14Default = (int)PInvoke.LVA_DEFAULT, 19Top = (int)PInvoke.LVA_ALIGNTOP, 24Left = (int)PInvoke.LVA_ALIGNLEFT, 30SnapToGrid = (int)PInvoke.LVA_SNAPTOGRID,
System\Windows\Forms\Controls\ListView\ListViewGroup.cs (2)
423PInvoke.LVM_GETGROUPSTATE, 439PInvoke.UiaDisconnectProvider(accessibleObject, skipOSCheck: true);
System\Windows\Forms\Controls\ListView\ListViewGroup.ListViewGroupAccessibleObject.cs (5)
50? PInvoke.LVGGR_HEADER 51: PInvoke.LVGGR_GROUP; 59PInvokeCore.SendMessage(_owningListView, PInvoke.LVM_GETGROUPRECT, (WPARAM)nativeGroupId, ref groupRect); 167PInvoke.LVM_GETGROUPSTATE, 174if (PInvokeCore.SendMessage(_owningListView, PInvoke.LVM_HASGROUP, (WPARAM)_owningGroup.ID) == 0)
System\Windows\Forms\Controls\ListView\ListViewInsertionMark.cs (8)
57PInvokeCore.SendMessage(_listView, PInvoke.LVM_GETINSERTMARKRECT, (WPARAM)0, ref bounds); 71_color = new COLORREF((uint)PInvokeCore.SendMessage(_listView, PInvoke.LVM_GETINSERTMARKCOLOR)); 83PInvokeCore.SendMessage(_listView, PInvoke.LVM_SETINSERTMARKCOLOR, 0, _color.ToWin32()); 121PInvokeCore.SendMessage(_listView, PInvoke.LVM_INSERTMARKHITTEST, (WPARAM)(&pt), ref lvInsertMark); 132dwFlags = _appearsAfterItem ? PInvoke.LVIM_AFTER : PInvoke.LVIM_BEFORE, 136PInvokeCore.SendMessage(_listView, PInvoke.LVM_SETINSERTMARK, 0, ref lvInsertMark); 140PInvokeCore.SendMessage(_listView, PInvoke.LVM_SETINSERTMARKCOLOR, 0, _color.ToWin32());
System\Windows\Forms\Controls\ListView\ListViewItem.cs (6)
880PInvokeCore.SendMessage(lv, PInvoke.LVM_EDITLABELW, (WPARAM)Index); 1026PInvoke.UiaDisconnectProvider(_accessibilityObject, skipOSCheck: true); 1099nint result = PInvokeCore.SendMessage(_listView, PInvoke.LVM_ISGROUPVIEWENABLED); 1101result = PInvokeCore.SendMessage(_listView, PInvoke.LVM_HASGROUP, (WPARAM)lvItem.iGroupId); 1107PInvokeCore.SendMessage(_listView, PInvoke.LVM_SETITEMW, 0, ref lvItem); 1136PInvokeCore.SendMessage(_listView, PInvoke.LVM_GETITEMW, 0, ref lvItem);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemBaseAccessibleObject.cs (1)
271PInvoke.InvalidateRect(_owningListView, lpRect: null, bErase: false);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemDetailsAccessibleObject.cs (1)
191PInvoke.UiaDisconnectProvider(accessibleObject, skipOSCheck: true);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewItemWithImageAccessibleObject.cs (1)
110PInvoke.UiaDisconnectProvider(_imageAccessibleObject, skipOSCheck: true);
System\Windows\Forms\Controls\ListView\ListViewItem.ListViewSubItem.cs (1)
249PInvoke.UiaDisconnectProvider(_accessibilityObject);
System\Windows\Forms\Controls\ListView\View.cs (5)
14LargeIcon = (int)PInvoke.LV_VIEW_ICON, 25Details = (int)PInvoke.LV_VIEW_DETAILS, 30SmallIcon = (int)PInvoke.LV_VIEW_SMALLICON, 37List = (int)PInvoke.LV_VIEW_LIST, 42Tile = (int)PInvoke.LV_VIEW_TILE,
System\Windows\Forms\Controls\Menus\MenuStrip.cs (2)
240HWND ancestor = PInvoke.GetAncestor(this, GET_ANCESTOR_FLAGS.GA_ROOT); 241PInvokeCore.PostMessage(ancestor, PInvokeCore.WM_SYSCOMMAND, (WPARAM)PInvoke.SC_KEYMENU, (LPARAM)(int)Keys.Space);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarAccessibleObject.cs (2)
44PInvoke.UiaDisconnectProvider(_calendarHeaderAccessibleObject, skipOSCheck: true); 48PInvoke.UiaDisconnectProvider(_calendarBodyAccessibleObject, skipOSCheck: true);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarBodyAccessibleObject.cs (1)
59PInvoke.UiaDisconnectProvider(row, skipOSCheck: true);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarButtonAccessibleObject.cs (2)
71BOOL setOldCursorPos = PInvoke.GetPhysicalCursorPos(out Point previousPosition); 135PInvoke.SendInput(1, &mouseInput, Marshal.SizeOf(mouseInput));
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.CalendarRowAccessibleObject.cs (2)
96PInvoke.UiaDisconnectProvider(_weekNumberCellAccessibleObject, skipOSCheck: true); 106PInvoke.UiaDisconnectProvider(cell, skipOSCheck: true);
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.cs (47)
288cp.ClassName = PInvoke.MONTHCAL_CLASS; 289cp.Style |= (int)PInvoke.MCS_MULTISELECT | (int)PInvoke.MCS_DAYSTATE; 292cp.Style |= (int)PInvoke.MCS_NOTODAY; 297cp.Style |= (int)PInvoke.MCS_NOTODAYCIRCLE; 302cp.Style |= (int)PInvoke.MCS_WEEKNUMBERS; 396PInvokeCore.SendMessage(this, PInvoke.MCM_SETFIRSTDAYOFWEEK, 0, (nint)value); 484if (PInvokeCore.SendMessage(this, PInvoke.MCM_SETMAXSELCOUNT, (WPARAM)value) == 0) 618PInvokeCore.SendMessage(this, PInvoke.MCM_SETMONTHDELTA, (WPARAM)value); 798if (PInvokeCore.SendMessage(this, PInvoke.MCM_GETMINREQRECT, 0, ref rect) == 0) 862int result = (int)PInvokeCore.SendMessage(this, PInvoke.MCM_GETTODAY, 0, ref systemTime); 914SetControlColor(PInvoke.MCSC_TITLEBK, value); 935SetControlColor(PInvoke.MCSC_TITLETEXT, value); 956SetControlColor(PInvoke.MCSC_TRAILINGTEXT, value); 1119PInvoke.InitCommonControlsEx(new INITCOMMONCONTROLSEX() 1143return GetMonthRange(PInvoke.GMR_VISIBLE); 1146return GetMonthRange(PInvoke.GMR_DAYSTATE); 1235int maxTodayWidth = (int)PInvokeCore.SendMessage(this, PInvoke.MCM_GETMAXTODAYWIDTH); 1251PInvokeCore.SendMessage(this, PInvoke.MCM_GETMONTHRANGE, (WPARAM)(int)flag, ref times[0]); 1299PInvokeCore.SendMessage(this, PInvoke.MCM_HITTEST, 0, ref mchi); 1357PInvokeCore.SendMessage(this, PInvoke.MCM_SETMAXSELCOUNT, (WPARAM)_maxSelectionCount); 1365PInvokeCore.SendMessage(this, PInvoke.MCM_SETTODAY, (WPARAM)0, ref systemTime); 1368SetControlColor(PInvoke.MCSC_TEXT, ForeColor); 1369SetControlColor(PInvoke.MCSC_MONTHBK, BackColor); 1370SetControlColor(PInvoke.MCSC_TITLEBK, _titleBackColor); 1371SetControlColor(PInvoke.MCSC_TITLETEXT, _titleForeColor); 1372SetControlColor(PInvoke.MCSC_TRAILINGTEXT, _trailingForeColor); 1377firstDay = (int)PInvoke.LCTYPE.IFIRSTDAYOFWEEK; 1384PInvokeCore.SendMessage(this, PInvoke.MCM_SETFIRSTDAYOFWEEK, (WPARAM)0, (LPARAM)firstDay); 1389PInvokeCore.SendMessage(this, PInvoke.MCM_SETMONTHDELTA, (WPARAM)_scrollChange); 1448SetControlColor(PInvoke.MCSC_TEXT, ForeColor); 1454SetControlColor(PInvoke.MCSC_MONTHBK, BackColor); 1688PInvokeCore.SendMessage(this, PInvoke.MCM_SETCOLOR, (WPARAM)(int)colorIndex, (LPARAM)value); 1739uint flags = PInvoke.GDTR_MIN | PInvoke.GDTR_MAX; 1740if (PInvokeCore.SendMessage(this, PInvoke.MCM_SETRANGE, (WPARAM)flags, ref times[0]) == 0) 1823PInvokeCore.SendMessage(HWND, PInvoke.MCM_SETDAYSTATE, (WPARAM)monthsCount, (LPARAM)arr); 1885PInvokeCore.SendMessage(this, PInvoke.MCM_SETSELRANGE, 0, ref times[0]); 2003PInvokeCore.SendMessage(this, PInvoke.MCM_SETTODAY, 0, ref systemTime); 2007PInvokeCore.SendMessage(this, PInvoke.MCM_SETTODAY, 0, 0); 2100PInvoke.NotifyWinEvent( 2104(int)PInvoke.CHILDID_SELF); 2177m.ResultInternal = (LRESULT)(nint)PInvoke.DLGC_WANTARROWS; 2191case PInvoke.MCN_SELECT: 2194case PInvoke.MCN_SELCHANGE: 2197case PInvoke.MCN_GETDAYSTATE: 2201case PInvoke.MCN_VIEWCHANGE:
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (11)
82PInvoke.UiaDisconnectProvider(_previousButtonAccessibleObject, skipOSCheck: true); 85PInvoke.UiaDisconnectProvider(_nextButtonAccessibleObject, skipOSCheck: true); 88PInvoke.UiaDisconnectProvider(_todayLinkAccessibleObject, skipOSCheck: true); 91PInvoke.UiaDisconnectProvider(_focusedCellAccessibleObject, skipOSCheck: true); 102PInvoke.UiaDisconnectProvider(calendarAccessibleObject, skipOSCheck: true); 252bool success = PInvokeCore.SendMessage(owner, PInvoke.MCM_GETCALENDARGRIDINFO, 0, ref gridInfo) != 0; 274bool success = PInvokeCore.SendMessage(owner, PInvoke.MCM_GETCALENDARGRIDINFO, 0, ref gridInfo) != 0; 302PInvokeCore.SendMessage(owner, PInvoke.MCM_GETCALENDARGRIDINFO, 0, ref gridInfo); 401PInvokeCore.SendMessage(owner, PInvoke.MCM_HITTEST, 0, ref hitTestInfo); 518PInvoke.UiaDisconnectProvider(calendar, skipOSCheck: true); 521PInvoke.UiaDisconnectProvider(_focusedCellAccessibleObject, skipOSCheck: true);
System\Windows\Forms\Controls\ProgressBar\ProgressBar.cs (20)
51cp.ClassName = PInvoke.PROGRESS_CLASS; 54cp.Style |= (int)PInvoke.PBS_SMOOTH; 58cp.Style |= (int)PInvoke.PBS_MARQUEE; 95PInvoke.SetWindowTheme(HWND, " ", " "); 262PInvokeCore.SendMessage(this, PInvoke.PBM_SETMARQUEE, (WPARAM)(BOOL)false, (LPARAM)_marqueeAnimationSpeed); 266PInvokeCore.SendMessage(this, PInvoke.PBM_SETMARQUEE, (WPARAM)(BOOL)true, (LPARAM)_marqueeAnimationSpeed); 302PInvokeCore.SendMessage(this, PInvoke.PBM_SETRANGE32, (WPARAM)_minimum, (LPARAM)_maximum); 340PInvokeCore.SendMessage(this, PInvoke.PBM_SETRANGE32, (WPARAM)_minimum, (LPARAM)_maximum); 352PInvokeCore.SendMessage(this, PInvoke.PBM_SETBKCOLOR, 0, BackColor.ToWin32()); 361PInvokeCore.SendMessage(this, PInvoke.PBM_SETBARCOLOR, 0, ForeColor.ToWin32()); 430PInvokeCore.SendMessage(this, PInvoke.PBM_SETSTEP, (WPARAM)_step); 563PInvoke.InitCommonControlsEx(new INITCOMMONCONTROLSEX() 608PInvokeCore.SendMessage(this, PInvoke.PBM_SETRANGE32, (WPARAM)_minimum, (LPARAM)_maximum); 609PInvokeCore.SendMessage(this, PInvoke.PBM_SETSTEP, (WPARAM)_step); 610PInvokeCore.SendMessage(this, PInvoke.PBM_SETPOS, (WPARAM)_value); 611PInvokeCore.SendMessage(this, PInvoke.PBM_SETBKCOLOR, (WPARAM)0, (LPARAM)BackColor); 612PInvokeCore.SendMessage(this, PInvoke.PBM_SETBARCOLOR, (WPARAM)0, (LPARAM)ForeColor); 692PInvokeCore.SendMessage(this, PInvoke.PBM_SETPOS, (WPARAM)_value); 706PInvokeCore.SendMessage(this, PInvoke.PBM_SETBARCOLOR, 0, ForeColor.ToWin32()); 707PInvokeCore.SendMessage(this, PInvoke.PBM_SETBKCOLOR, 0, BackColor.ToWin32());
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (2)
3384HWND hWndParent = PInvoke.GetParent(this); 3387PInvoke.SetFocus(hWndParent);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.cs (1)
1034PInvoke.UiaDisconnectProvider(_accessibleObject);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridToolTip.cs (12)
64info.SendMessage(this, PInvoke.TTM_UPDATETIPTEXTW); 79PInvoke.InitCommonControlsEx(new INITCOMMONCONTROLSEX 88ClassName = PInvoke.TOOLTIPS_CLASS, 89Style = (int)(PInvoke.TTS_ALWAYSTIP | PInvoke.TTS_NOPREFIX), 105GetTOOLINFO((Control)sender).SendMessage(this, PInvoke.TTM_DELTOOLW); 125PInvoke.SetWindowPos( 132if (info.SendMessage(this, PInvoke.TTM_ADDTOOLW) == 0) 140PInvoke.TTM_SETMAXTIPWIDTH, 158info.SendMessage(this, PInvoke.TTM_UPDATETIPTEXTW); 162PInvokeCore.SendMessage(this, PInvoke.TTM_UPDATE); 182msg.ResultInternal = (LRESULT)PInvoke.HTTRANSPARENT;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (23)
626PInvoke.ClientToScreen(this, ref pt); 850gotFocus = !PInvoke.SetFocus(this).IsNull; 1478PInvoke.ShowWindow(_dropDownHolder, SHOW_WINDOW_CMD.SW_SHOWNA); 2562for (HWND hwnd = PInvokeCore.GetForegroundWindow(); !hwnd.IsNull; hwnd = PInvoke.GetParent(hwnd)) 3114if (PInvoke.IsChild(PInvokeCore.GetForegroundWindow(), this)) 3167Debug.Assert(_cumulativeVerticalWheelDelta > -PInvoke.WHEEL_DELTA, "cumulativeVerticalWheelDelta is too small"); 3168Debug.Assert(_cumulativeVerticalWheelDelta < PInvoke.WHEEL_DELTA, "cumulativeVerticalWheelDelta is too big"); 3202float partialNotches = _cumulativeVerticalWheelDelta / (float)PInvoke.WHEEL_DELTA; 3219_cumulativeVerticalWheelDelta -= fullNotches * (int)PInvoke.WHEEL_DELTA; 3257_cumulativeVerticalWheelDelta -= (int)(scrollBands * (PInvoke.WHEEL_DELTA / (float)wheelScrollLines)); 3268_cumulativeVerticalWheelDelta -= (int)(scrollBands * (PInvoke.WHEEL_DELTA / (float)wheelScrollLines)); 3745PInvoke.GetTextExtentPoint32W(hdc.HDC, value, value.Length, textSize); 3750PInvoke.GetTextMetrics(hdc, &tm); 3821PInvokeCore.SendMessage(toolTip, PInvoke.TTM_ADJUSTRECT, (WPARAM)1, ref rect); 3871Control? focusedControl = FromHandle(PInvoke.GetFocus()); 3878focusedControl = FromHandle(PInvoke.GetFocus()); 4903HWND priorFocus = PInvoke.GetFocus(); 4917PInvoke.SetFocus(priorFocus); 5274case PInvoke.TTN_POP: 5276case PInvoke.TTN_SHOW: 5360uint flags = PInvoke.DLGC_WANTCHARS | PInvoke.DLGC_WANTARROWS; 5369flags |= PInvoke.DLGC_WANTTAB;
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.DropDownHolder.cs (2)
167PInvoke.MsgWaitForMultipleObjectsEx( 668if (Visible && m.WParamInternal.LOWORD == PInvoke.WA_INACTIVE && !OwnsWindow(activatedWindow))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewTextBox.cs (5)
298case PInvoke.TTN_SHOW: 356m.ResultInternal = (LRESULT)(m.ResultInternal | (nint)(PInvoke.DLGC_WANTARROWS | PInvoke.DLGC_WANTCHARS)); 359m.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( 110if (nCode == PInvoke.HC_ACTION) 134return PInvoke.CallNextHookEx(_mouseHookHandle, nCode, wparam, lparam); 146PInvoke.UnhookWindowsHookEx(_mouseHookHandle);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.PropertyGridViewAccessibleObject.cs (1)
432PInvoke.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); 259s_moduleHandle = PInvoke.LoadLibraryFromSystemPathIfAvailable(Libraries.RichEdit41); 271string path = PInvoke.GetModuleFileNameLongPath(new HINSTANCE(s_moduleHandle)); 286cp.ClassName = PInvoke.MSFTEDIT_CLASS; 296cp.Style |= (int)PInvoke.ES_DISABLENOSCROLL; 305cp.Style |= (int)PInvoke.ES_DISABLENOSCROLL; 632return StreamOut(PInvoke.SF_RTF); 637return StreamOut(PInvoke.SF_RTF); 655StreamIn(value, PInvoke.SF_RTF); 865PInvokeCore.SendMessage(this, PInvokeCore.EM_SETCHARFORMAT, PInvoke.SCF_SELECTION, ref cf); 901PInvokeCore.SendMessage(this, PInvokeCore.EM_SETCHARFORMAT, (WPARAM)PInvoke.SCF_SELECTION, ref cf); 960PInvokeCore.SendMessage(this, PInvokeCore.EM_SETCHARFORMAT, (WPARAM)PInvoke.SCF_SELECTION, ref cf2); 1138return StreamOut(PInvoke.SFF_SELECTION | PInvoke.SF_RTF); 1145StreamIn(value, PInvoke.SFF_SELECTION | PInvoke.SF_RTF); 1236if (value is not null && value.Length > PInvoke.MAX_TAB_STOPS) 1283StreamIn(value, PInvoke.SFF_SELECTION | PInvoke.SF_TEXT | PInvoke.SF_UNICODE); 1332(WPARAM)(int)(value ? PInvoke.ECOOP_OR : PInvoke.ECOOP_XOR), 1333(LPARAM)(int)PInvoke.ECO_SELECTIONBAR); 1389StreamIn(value, PInvoke.SF_TEXT | PInvoke.SF_UNICODE); 2152return SetCharFormat(PInvoke.SCF_ALL, cf); 2162PInvokeCore.SendMessage(this, PInvokeCore.EM_GETCHARFORMAT, (WPARAM)(fSelection ? PInvoke.SCF_SELECTION : PInvoke.SCF_DEFAULT), ref cf); 2418flags = PInvoke.SF_RTF; 2422flags = PInvoke.SF_TEXT; 2425flags = PInvoke.SF_UNICODE | PInvoke.SF_TEXT; 2522(nint)(PInvoke.ENM_PROTECTED | PInvoke.ENM_SELCHANGE | 2523PInvoke.ENM_DROPFILES | PInvoke.ENM_REQUESTRESIZE | 2524PInvoke.ENM_IMECHANGE | PInvoke.ENM_CHANGE | 2525PInvoke.ENM_UPDATE | PInvoke.ENM_SCROLL | 2526PInvoke.ENM_KEYEVENTS | PInvoke.ENM_MOUSEEVENTS | 2527PInvoke.ENM_SCROLLEVENTS | PInvoke.ENM_LINK)); 2588(WPARAM)(int)PInvoke.ECOOP_OR, 2589(LPARAM)(int)PInvoke.ECO_SELECTIONBAR); 2743RichTextBoxStreamType.RichText => PInvoke.SF_RTF, 2744RichTextBoxStreamType.PlainText => PInvoke.SF_TEXT, 2745RichTextBoxStreamType.UnicodePlainText => PInvoke.SF_UNICODE | PInvoke.SF_TEXT, 2746RichTextBoxStreamType.RichNoOleObjs => PInvoke.SF_RTFNOOBJS, 2747RichTextBoxStreamType.TextTextOleObjs => PInvoke.SF_TEXTIZED, 2806return PInvokeCore.SendMessage(this, PInvokeCore.EM_SETCHARFORMAT, (WPARAM)PInvoke.SCF_SELECTION, ref cf) != 0; 2861(WPARAM)(selectionOnly ? PInvoke.SCF_SELECTION : PInvoke.SCF_ALL), 2891if ((PInvoke.SFF_SELECTION & flags) != 0) 2913if ((flags & PInvoke.SF_UNICODE) != 0) 2932if ((flags & PInvoke.SFF_SELECTION) == 0) 2946if ((flags & PInvoke.SF_RTF) != 0) 2979cookieVal = (flags & PInvoke.SF_UNICODE) != 0 2983if ((flags & PInvoke.SF_RTF) != 0) 3045if ((flags & PInvoke.SF_UNICODE) != 0) 3078cookieVal = (flags & PInvoke.SF_UNICODE) != 0 ? OUTPUT | UNICODE : OUTPUT | ANSI; 3080if ((flags & PInvoke.SF_RTF) != 0) 3318case PInvoke.EN_HSCROLL: 3321case PInvoke.EN_VSCROLL: 3346case PInvoke.EN_LINK: 3349case PInvoke.EN_DROPFILES: 3386case PInvoke.EN_REQUESTRESIZE: 3400case PInvoke.EN_SELCHANGE: 3405case PInvoke.EN_PROTECTED: 3431if ((unchecked((uint)(long)enprotected.wParam) & PInvoke.SFF_SELECTION) != 0) 3448PInvoke.MessageBeep(MESSAGEBOX_STYLE.MB_OK); 3488if (compMode != PInvoke.ICM_NOTOPEN) 3609m.ResultInternal = (LRESULT)(AcceptsTab ? m.ResultInternal | (nint)PInvoke.DLGC_WANTTAB : m.ResultInternal & ~(nint)PInvoke.DLGC_WANTTAB);
System\Windows\Forms\Controls\RichTextBox\RichTextBox.OleCallback.cs (2)
39HRESULT hr = PInvoke.CreateILockBytesOnHGlobal(default, fDeleteOnRelease: true, pLockBytes); 45hr = PInvoke.StgCreateDocfileOnILockBytes(
System\Windows\Forms\Controls\Splitter\Splitter.cs (1)
701PInvoke.PatBlt(dc, r.X, r.Y, r.Width, r.Height, ROP_CODE.PATINVERT);
System\Windows\Forms\Controls\TabControl\TabControl.cs (43)
64private readonly MessageId _tabBaseReLayoutMessage = PInvoke.RegisterWindowMessage($"{Application.WindowMessagesVersion}{TabBaseReLayoutMessageName}"); 277cp.ClassName = PInvoke.WC_TABCONTROL; 283cp.Style |= (int)PInvoke.TCS_MULTILINE; 288cp.Style |= (int)PInvoke.TCS_OWNERDRAWFIXED; 293cp.Style |= (int)PInvoke.TCS_TOOLTIPS; 299cp.Style |= (int)PInvoke.TCS_BOTTOM; 305cp.Style |= (int)PInvoke.TCS_VERTICAL | (int)PInvoke.TCS_MULTILINE; 310cp.Style |= (int)PInvoke.TCS_HOTTRACK; 315cp.Style |= (int)PInvoke.TCS_TABS; 319cp.Style |= (int)PInvoke.TCS_BUTTONS; 322cp.Style |= (int)PInvoke.TCS_FLATBUTTONS; 329cp.Style |= (int)PInvoke.TCS_RAGGEDRIGHT; 332cp.Style |= (int)PInvoke.TCS_RIGHTJUSTIFY; 335cp.Style |= (int)PInvoke.TCS_FIXEDWIDTH; 384PInvokeCore.SendMessage(this, PInvoke.TCM_ADJUSTRECT, 0, ref rect); 478PInvokeCore.SendMessage(this, PInvoke.TCM_SETIMAGELIST, 0, handle); 648=> (int)PInvokeCore.SendMessage(this, PInvoke.TCM_GETROWCOUNT); 662get => IsHandleCreated ? (int)PInvokeCore.SendMessage(this, PInvoke.TCM_GETCURSEL) : _selectedIndex; 690PInvokeCore.SendMessage(this, PInvoke.TCM_SETCURSEL, (WPARAM)value); 933int index = SendMessage(PInvoke.TCM_INSERTITEMW, TabCount + 1, tabPage); 942PInvokeCore.SendMessage(this, PInvoke.TCM_SETITEMSIZE, 0, PARAM.FromLowHigh(_itemSize.Width, _itemSize.Height)); 965PInvoke.InitCommonControlsEx(new INITCOMMONCONTROLSEX() 1122PInvokeCore.SendMessage(this, PInvoke.TCM_GETITEMRECT, (WPARAM)index, ref rect); 1142PInvokeCore.SendMessage(this, PInvoke.TCM_SETIMAGELIST, 0, ImageList!.Handle); 1167index = IsHandleCreated ? SendMessage(PInvoke.TCM_INSERTITEMW, index, tabPage) : index; 1241PInvokeCore.SendMessage(this, PInvoke.TCM_SETPADDING, 0, PARAM.FromPoint(_padding)); 1250PInvokeCore.SendMessage(this, PInvoke.TCM_SETIMAGELIST, 0, _imageList.Handle); 1255HWND tooltipHwnd = (HWND)PInvokeCore.SendMessage(this, PInvoke.TCM_GETTOOLTIPS); 1258PInvoke.SetWindowPos( 1301PInvoke.SetWindowTheme(HWND, null, $"{DarkModeIdentifier}::{BannerContainerThemeIdentifier}"); 1558PInvokeCore.SendMessage(this, PInvoke.TCM_DELETEALLITEMS); 1593PInvokeCore.SendMessage(this, (PInvoke.TCM_DELETEALLITEMS)); 1611PInvokeCore.SendMessage(this, PInvoke.TCM_DELETEITEM, (WPARAM)index); 1647PInvokeCore.SendMessage(this, PInvoke.TCM_SETTOOLTIPS, (WPARAM)toolTip.Handle); 1660SendMessage(PInvoke.TCM_SETITEMW, index, value); 1666PInvokeCore.SendMessage(this, PInvoke.TCM_SETCURSEL, (WPARAM)index); 1799HRESULT hr = PInvoke.SetWindowTheme(handle, $"{DarkModeIdentifier}_{ExplorerThemeIdentifier}", null); 2005PInvokeCore.SendMessage(this, PInvoke.TCM_SETCURSEL, (WPARAM)_lastSelection); 2090case PInvoke.TCN_SELCHANGING: 2110case PInvoke.TCN_SELCHANGE: 2123case PInvoke.TTN_GETDISPINFOW: 2125PInvokeCore.SendMessage(nmhdr->hwndFrom, PInvoke.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
System\Windows\Forms\Controls\TabControl\TabPage.cs (1)
658PInvoke.UiaDisconnectProvider(_tabAccessibilityObject);
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (8)
317cp.Style |= PInvoke.ES_LEFT; 320cp.Style |= PInvoke.ES_CENTER; 323cp.Style |= PInvoke.ES_RIGHT; 1071HIMC inputContext = PInvoke.ImmGetContext(this); 1077PInvoke.ImmNotifyIME(inputContext, NOTIFY_IME_ACTION.NI_COMPOSITIONSTR, action, 0); 1081PInvoke.ImmReleaseContext(this, inputContext); 1794PInvoke.RedrawWindow(this, lprcUpdate: null, HRGN.Null, REDRAW_WINDOW_FLAGS.RDW_INVALIDATE | REDRAW_WINDOW_FLAGS.RDW_FRAME); 2886if (((nint)m.LParamInternal & PInvoke.PRF_NONCLIENT) != 0
System\Windows\Forms\Controls\TextBox\TextBox.cs (13)
270cp.Style |= PInvoke.ES_LOWERCASE; 273cp.Style |= PInvoke.ES_UPPERCASE; 286cp.Style |= PInvoke.ES_LEFT; 289cp.Style |= PInvoke.ES_CENTER; 292cp.Style |= PInvoke.ES_RIGHT; 314cp.Style |= PInvoke.ES_PASSWORD; 588PInvoke.RedrawWindow(this, lprcUpdate: null, HRGN.Null, REDRAW_WINDOW_FLAGS.RDW_INVALIDATE | REDRAW_WINDOW_FLAGS.RDW_FRAME); 816PInvoke.SHAutoComplete(this, (SHELL_AUTOCOMPLETE_FLAGS)AutoCompleteSource | mode); 833PInvoke.SHAutoComplete(this, (SHELL_AUTOCOMPLETE_FLAGS)AutoCompleteSource.AllSystemSources | SHELL_AUTOCOMPLETE_FLAGS.SHACF_AUTOSUGGEST_FORCE_OFF | SHELL_AUTOCOMPLETE_FLAGS.SHACF_AUTOAPPEND_FORCE_OFF); 848if (((nint)m.LParamInternal & PInvoke.PRF_NONCLIENT) != 0 && Application.RenderWithVisualStyles 973PInvoke.InvalidateRect(this, lpRect: null, bErase: true); 982PInvoke.InvalidateRect(this, lpRect: null, bErase: true); 988PInvoke.ValidateRect(this, lpRect: null);
System\Windows\Forms\Controls\TextBox\TextBoxBase.cs (24)
433cp.ClassName = PInvoke.WC_EDIT; 434cp.Style |= PInvoke.ES_AUTOHSCROLL | PInvoke.ES_AUTOVSCROLL; 438cp.Style |= PInvoke.ES_NOHIDESEL; 443cp.Style |= PInvoke.ES_READONLY; 462cp.Style |= PInvoke.ES_MULTILINE; 466cp.Style &= ~PInvoke.ES_AUTOHSCROLL; 1414PInvoke.SetWindowText(this, value); 1851PInvoke.RedrawWindow( 1906if (!ValidationCancelled && PInvoke.WindowFromPoint(PointToScreen(mevent.Location)) == HWND) 1968if (PInvoke.UiaClientsAreListening()) 2460PInvoke.SetWindowPos( 2601|| ((nint)m.LParamInternal & PInvoke.PRF_NONCLIENT) == 0) 2635PInvoke.ClientToScreen(this, ref clientTopLeft); 2926if (!PInvoke.GetScrollBarInfo((HWND)Handle, objectId, ref scrollBarInfo) 2956PInvoke.ClientToScreen(this, ref clientTopLeft); 2975PInvoke.RedrawWindow( 2991if (hiword == PInvoke.EN_CHANGE && CanRaiseTextChangedEvent) 2995else if (hiword == PInvoke.EN_UPDATE) 3008PInvokeCore.SendMessage(this, PInvokeCore.EM_SETMARGINS, (WPARAM)(PInvoke.EC_LEFTMARGIN | PInvoke.EC_RIGHTMARGIN)); 3017? (LRESULT)(nint)(m.ResultInternal | (int)PInvoke.DLGC_WANTTAB) 3018: (LRESULT)(nint)(m.ResultInternal & ~(int)(PInvoke.DLGC_WANTTAB 3019| PInvoke.DLGC_WANTALLKEYS));
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseUiaTextProvider.cs (2)
229return ((int)GetWindowStyle(Owner) & PInvoke.ES_AUTOHSCROLL) != 0; 466return PInvoke.GetTextExtentPoint32W(hdc, &item, 1, (SIZE*)pSize);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (6)
171HWND rootHwnd = PInvoke.GetAncestor(this, GET_ANCESTOR_FLAGS.GA_ROOT); 174return !PInvoke.IsZoomed(rootHwnd); 577HWND rootHwnd = PInvoke.GetAncestor(this, GET_ANCESTOR_FLAGS.GA_ROOT); 581if (!rootHwnd.IsNull && !PInvoke.IsZoomed(rootHwnd)) 601m.ResultInternal = (LRESULT)(nint)PInvoke.HTBOTTOMRIGHT; 637m.ResultInternal = (LRESULT)(nint)PInvoke.HTBOTTOMLEFT;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (17)
1746SnapFocus(PInvoke.GetFocus()); 2654(LPARAM)(uint)(PInvoke.PRF_CHILDREN | PInvoke.PRF_CLIENT | PInvoke.PRF_ERASEBKGND | PInvoke.PRF_NONCLIENT)); 4015PInvoke.SetFocus(default); 4424if ((Handle != otherHwnd) && !PInvoke.IsChild(this, otherHwnd)) 4428HWND thisHwndRoot = PInvoke.GetAncestor(this, GET_ANCESTOR_FLAGS.GA_ROOT); 4429HWND otherHwndRoot = PInvoke.GetAncestor(otherHwnd, GET_ANCESTOR_FLAGS.GA_ROOT); 4632HWND hwndClicked = PInvoke.ChildWindowFromPointEx( 4642m.ResultInternal = (LRESULT)(nint)PInvoke.MA_NOACTIVATE; 4647HWND rootHwnd = PInvoke.GetAncestor(this, GET_ANCESTOR_FLAGS.GA_ROOT); 4651HWND hwndActive = PInvoke.GetActiveWindow(); 4656m.ResultInternal = (LRESULT)(nint)PInvoke.MA_ACTIVATEANDEAT; 4666SnapFocus(PInvoke.GetFocus()); 4676if (AllowClickThrough && m.MsgInternal == PInvokeCore.WM_MOUSEACTIVATE && m.ResultInternal == PInvoke.MA_ACTIVATEANDEAT) 4678m.ResultInternal = (LRESULT)(nint)PInvoke.MA_ACTIVATE;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.RestoreFocusMessageFilter.cs (3)
37if (!PInvoke.IsChild(_ownerToolStrip, m.HWND)) 39HWND rootHwnd = PInvoke.GetAncestor(_ownerToolStrip, GET_ANCESTOR_FLAGS.GA_ROOT); 40if (rootHwnd == m.HWND || PInvoke.IsChild(rootHwnd, m.HWND))
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (6)
891PInvoke.SetWindowPos( 1620else if (IsHandleCreated && PInvoke.IsWindowEnabled(this)) 1622PInvoke.SetWindowPos( 1797if (!PInvoke.SetLayeredWindowAttributes(this, (COLORREF)0, OpacityAsByte, LAYERED_WINDOW_ATTRIBUTES_FLAGS.LWA_ALPHA)) 1904if ((nint)m.WParamInternal == PInvoke.WA_ACTIVE) 1985PInvoke.RedrawWindow(
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (4)
214int count = PInvoke.GetMenuItemCount(hmenu); 229PInvoke.GetMenuItemInfo(hmenu, i, fByPosition: true, ref info); 245PInvoke.GetMenuItemInfo(hmenu, i, fByPosition: true, ref info); 257PInvoke.GetMenuItemInfo(hmenu, i, fByPosition: true, ref info);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
2474if (PInvoke.GetKeyState((int)Keys.LButton) < 0) 3097PInvoke.UiaDisconnectProvider(accessibleObject, skipOSCheck: true);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.ToolStripItemAccessibleObject.cs (3)
8using 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); 831HWND rootWindowOfToolStrip = PInvoke.GetAncestor(topMostToolStrip, GET_ANCESTOR_FLAGS.GA_ROOT); 832HWND rootWindowOfControl = PInvoke.GetAncestor(activeControl, GET_ANCESTOR_FLAGS.GA_ROOT); 891HMENU hMenu = PInvoke.GetMenu(toplevelControl); 921if (PInvoke.GetKeyState((int)Keys.ShiftKey) < 0 && (keyData == Keys.None)) 932HWND topmostParentOfMenu = PInvoke.GetAncestor(menuStripToActivate, GET_ANCESTOR_FLAGS.GA_ROOT);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (8)
132HWND hwndActive = PInvoke.GetActiveWindow(); 201PInvoke.ShowCaret(HWND.Null); 402HWND hwndActive = PInvoke.GetActiveWindow(); 461PInvoke.HideCaret(HWND.Null); 488=> hwndParent.Handle == hwndChild.Handle || PInvoke.IsChild(hwndParent, hwndChild); 528var activeWindowHandle = Control.GetHandleRef(PInvoke.GetActiveWindow()); 646DPI_AWARENESS_CONTEXT awarenessContext = PInvoke.GetWindowDpiAwarenessContext(hwnd); 647DPI_AWARENESS awareness = PInvoke.GetAwarenessFromDpiAwarenessContext(awarenessContext);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.HostedWindowsFormsMessageHook.cs (4)
66_messageHookHandle = PInvoke.SetWindowsHookEx( 83if (nCode == PInvoke.HC_ACTION && _isHooked 98return PInvoke.CallNextHookEx(_messageHookHandle, nCode, wparam, lparam); 107PInvoke.UnhookWindowsHookEx(_messageHookHandle);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (4)
598PInvoke.GetMenuItemInfo(_nativeMenuHandle, (uint)_nativeMenuCommandID, fByPosition: false, ref info); 621PInvoke.GetMenuItemInfo(_nativeMenuHandle, (uint)_nativeMenuCommandID, fByPosition: false, ref info); 633PInvoke.GetMenuItemInfo(_nativeMenuHandle, (uint)_nativeMenuCommandID, fByPosition: false, ref info); 670PInvoke.GetMenuItemInfo(_nativeMenuHandle, (uint)_nativeMenuCommandID, fByPosition: false, ref info);
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.FeedbackRectangle.FeedbackDropDown.cs (2)
59PInvoke.UpdateWindow(msg.hwnd); 105m.ResultInternal = (LRESULT)PInvoke.HTTRANSPARENT;
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (1)
128PInvoke.RedrawWindow(
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (35)
153cp.ClassName = PInvoke.TRACKBAR_CLASS; 157cp.Style |= (int)PInvoke.TBS_NOTICKS; 160cp.Style |= (int)(PInvoke.TBS_TOP); 164cp.Style |= (int)(PInvoke.TBS_BOTTOM); 168cp.Style |= (int)(PInvoke.TBS_BOTH); 175cp.Style |= (int)PInvoke.TBS_VERT; 192cp.Style |= (int)PInvoke.TBS_AUTOTICKS; 293PInvokeCore.SendMessage(this, PInvoke.TBM_SETPAGESIZE, 0, value); 438PInvokeCore.SendMessage(this, PInvoke.TBM_SETRANGEMAX, (WPARAM)(BOOL)true, (LPARAM)_maximum); 496PInvokeCore.SendMessage(this, PInvoke.TBM_SETLINESIZE, 0, value); 580PInvokeCore.SendMessage(this, PInvoke.TBM_SETTICFREQ, (WPARAM)value); 757PInvoke.InitCommonControlsEx(new INITCOMMONCONTROLSEX 795PInvokeCore.SendMessage(this, PInvoke.TBM_CLEARTICS, (WPARAM)1, (LPARAM)0); 798LRESULT lresult = PInvokeCore.SendMessage(this, PInvoke.TBM_SETTIC, lParam: (IntPtr)i); 862PInvokeCore.SendMessage(this, PInvoke.TBM_SETRANGEMIN, (WPARAM)(BOOL)false, (LPARAM)_minimum); 863PInvokeCore.SendMessage(this, PInvoke.TBM_SETRANGEMAX, (WPARAM)(BOOL)false, (LPARAM)_maximum); 866PInvokeCore.SendMessage(this, PInvoke.TBM_SETTICFREQ, (WPARAM)_tickFrequency); 873PInvokeCore.SendMessage(this, PInvoke.TBM_SETPAGESIZE, (WPARAM)0, (LPARAM)_largeChange); 874PInvokeCore.SendMessage(this, PInvoke.TBM_SETLINESIZE, (WPARAM)0, (LPARAM)_smallChange); 936Debug.Assert(_cumulativeWheelData > -PInvoke.WHEEL_DELTA, "cumulativeWheelData is too small"); 937Debug.Assert(_cumulativeWheelData < PInvoke.WHEEL_DELTA, "cumulativeWheelData is too big"); 941partialNotches = _cumulativeWheelData / (float)PInvoke.WHEEL_DELTA; 958_cumulativeWheelData -= (int)(scrollBands * (PInvoke.WHEEL_DELTA / (float)wheelScrollLines)); 964_cumulativeWheelData -= (int)(scrollBands * (PInvoke.WHEEL_DELTA / (float)wheelScrollLines)); 1061PInvokeCore.SendMessage(this, PInvoke.TBM_SETRANGEMIN, (WPARAM)(BOOL)false, (LPARAM)_minimum); 1062PInvokeCore.SendMessage(this, PInvoke.TBM_SETRANGEMAX, (WPARAM)(BOOL)true, (LPARAM)_maximum); 1120PInvokeCore.SendMessage(this, PInvoke.TBM_SETPOS, (WPARAM)(BOOL)true, (LPARAM)reflectedValue); 1173case PInvoke.TB_LINEUP: 1174case PInvoke.TB_LINEDOWN: 1175case PInvoke.TB_PAGEUP: 1176case PInvoke.TB_PAGEDOWN: 1177case PInvoke.TB_THUMBTRACK: 1178case PInvoke.TB_TOP: 1179case PInvoke.TB_BOTTOM: 1180case PInvoke.TB_ENDTRACK:
System\Windows\Forms\Controls\TreeView\TreeNode.cs (25)
241if (PInvokeCore.SendMessage(tv, PInvoke.TVM_GETITEMRECT, 1, ref rc) == 0) 270if (PInvokeCore.SendMessage(tv, PInvoke.TVM_GETITEMRECT, 0, ref rc) == 0) 313PInvokeCore.SendMessage(tv, PInvoke.TVM_SETITEMW, 0, ref item); 337PInvokeCore.SendMessage(_treeView, PInvoke.TVM_GETITEMW, 0, ref item); 628bool visible = PInvokeCore.SendMessage(tv, PInvoke.TVM_GETITEMRECT, 1, ref rc) != 0; 704PInvoke.TVM_GETNEXTITEM, 705(WPARAM)PInvoke.TVGN_NEXTVISIBLE, 862PInvoke.TVM_GETNEXTITEM, 863(WPARAM)PInvoke.TVGN_PREVIOUSVISIBLE, 972PInvokeCore.SendMessage(tv, PInvoke.TVM_GETITEMW, 0, ref item); 1290PInvokeCore.SendMessage(tv, PInvoke.TVM_EDITLABELW, 0, (LPARAM)HTREEITEMInternal); 1473PInvokeCore.SendMessage(tv, PInvoke.TVM_EXPAND, (WPARAM)(uint)NM_TREEVIEW_ACTION.TVE_COLLAPSE, (LPARAM)Handle); 1592PInvokeCore.SendMessage(tv, PInvoke.TVM_ENDEDITLABELNOW, (WPARAM)(BOOL)cancel); 1661PInvokeCore.SendMessage(tv, PInvoke.TVM_ENSUREVISIBLE, 0, Handle); 1679PInvokeCore.SendMessage(tv, PInvoke.TVM_EXPAND, (WPARAM)(uint)NM_TREEVIEW_ACTION.TVE_EXPAND, (LPARAM)Handle); 1877nint editHandle = PInvokeCore.SendMessage(tv, PInvoke.TVM_GETEDITCONTROL); 1882PInvokeCore.SendMessage(tv, PInvoke.TVM_ENDEDITLABELNOW, (WPARAM)(BOOL)false); 1885HTREEITEMInternal = (HTREEITEM)PInvokeCore.SendMessage(tv, PInvoke.TVM_INSERTITEMW, 0, ref tvis); 1895PInvokeCore.PostMessage(tv, PInvoke.TVM_EDITLABELW, default, (LPARAM)HTREEITEMInternal); 1898PInvoke.InvalidateRect(tv, lpRect: null, bErase: false); 1984PInvokeCore.SendMessage(tv, PInvoke.TVM_DELETEITEM, 0, (LPARAM)HTREEITEMInternal); 1998PInvoke.UiaDisconnectProvider(_accessibleObject); 2032PInvokeCore.SendMessage(tv, PInvoke.TVM_SETITEMW, 0, ref item); 2180PInvokeCore.SendMessage(tv, PInvoke.TVM_SETITEMW, 0, ref item); 2215PInvokeCore.SendMessage(tv, PInvoke.TVM_SETITEMW, 0, ref item);
System\Windows\Forms\Controls\TreeView\TreeView.cs (120)
232PInvokeCore.SendMessage(this, PInvoke.TVM_SETBKCOLOR, 0, BackColor.ToWin32()); 237PInvokeCore.SendMessage(this, PInvoke.TVM_SETINDENT, (WPARAM)Indent); 341cp.ClassName = PInvoke.WC_TREEVIEW; 362cp.Style |= (int)PInvoke.LVS_NOSCROLL; 367cp.Style |= (int)PInvoke.TVS_SHOWSELALWAYS; 372cp.Style |= (int)PInvoke.TVS_EDITLABELS; 377cp.Style |= (int)PInvoke.TVS_HASLINES; 382cp.Style |= (int)PInvoke.TVS_HASBUTTONS; 387cp.Style |= (int)PInvoke.TVS_LINESATROOT; 392cp.Style |= (int)PInvoke.TVS_TRACKSELECT; 397cp.Style |= (int)PInvoke.TVS_FULLROWSELECT; 402cp.Style |= (int)PInvoke.TVS_NONEVENHEIGHT; 409cp.Style |= (int)PInvoke.TVS_INFOTIP; 416cp.Style |= (int)PInvoke.TVS_CHECKBOXES; 432cp.Style |= (int)PInvoke.TVS_RTLREADING; 477PInvokeCore.SendMessage(this, PInvoke.TVM_SETTEXTCOLOR, 0, ForeColor.ToWin32()); 659PInvokeCore.SendMessage(this, PInvoke.TVM_SETIMAGELIST, 0, value is null ? 0 : value.Handle); 772return (int)PInvokeCore.SendMessage(this, PInvoke.TVM_GETINDENT); 787PInvokeCore.SendMessage(this, PInvoke.TVM_SETINDENT, (WPARAM)value); 788_indent = (int)PInvokeCore.SendMessage(this, PInvoke.TVM_GETINDENT); 881return (int)PInvokeCore.SendMessage(this, PInvoke.TVM_GETITEMHEIGHT); 895return (int)PInvokeCore.SendMessage(this, PInvoke.TVM_GETITEMHEIGHT); 936PInvokeCore.SendMessage(this, PInvoke.TVM_SETITEMHEIGHT, (WPARAM)value); 937_itemHeight = (int)PInvokeCore.SendMessage(this, PInvoke.TVM_GETITEMHEIGHT); 981int intColor = (int)PInvokeCore.SendMessage(this, PInvoke.TVM_GETLINECOLOR); 994PInvokeCore.SendMessage(this, PInvoke.TVM_SETLINECOLOR, 0, _lineColor.ToWin32()); 1213IntPtr hItem = PInvokeCore.SendMessage(this, PInvoke.TVM_GETNEXTITEM, (WPARAM)PInvoke.TVGN_CARET); 1240PInvokeCore.SendMessage(this, PInvoke.TVM_SELECTITEM, (WPARAM)PInvoke.TVGN_CARET, (LPARAM)hnode); 1426IntPtr hitem = PInvokeCore.SendMessage(this, PInvoke.TVM_GETNEXTITEM, (WPARAM)PInvoke.TVGN_FIRSTVISIBLE); 1442PInvokeCore.SendMessage(this, PInvoke.TVM_SELECTITEM, (WPARAM)PInvoke.TVGN_FIRSTVISIBLE, (LPARAM)hnode); 1462public int VisibleCount => IsHandleCreated ? (int)PInvokeCore.SendMessage(this, PInvoke.TVM_GETVISIBLECOUNT) : 0; 1653PInvoke.InitCommonControlsEx(new INITCOMMONCONTROLSEX 1757PInvokeCore.SendMessage(toolTip, PInvoke.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 1758PInvokeCore.SendMessage(this, PInvoke.TVM_SETTOOLTIPS, (WPARAM)toolTip.Handle); 1777nint hnode = PInvokeCore.SendMessage(this, PInvoke.TVM_HITTEST, 0, ref tvhi); 1818nint hnode = PInvokeCore.SendMessage(this, PInvoke.TVM_HITTEST, 0, ref tvhi); 1827PInvokeCore.SendMessage(this, PInvoke.TVM_SETIMAGELIST, 0, handle); 2001int version = (int)PInvokeCore.SendMessage(this, PInvoke.CCM_GETVERSION); 2004PInvokeCore.SendMessage(this, PInvoke.CCM_SETVERSION, 5); 2015style |= (int)PInvoke.TVS_CHECKBOXES; 2022style |= (int)PInvoke.TVS_INFOTIP; 2030PInvokeCore.SendMessage(this, PInvoke.TVM_SETBKCOLOR, 0, c.ToWin32()); 2037PInvokeCore.SendMessage(this, PInvoke.TVM_SETTEXTCOLOR, 0, c.ToWin32()); 2043PInvokeCore.SendMessage(this, PInvoke.TVM_SETLINECOLOR, 0, _lineColor.ToWin32()); 2048PInvokeCore.SendMessage(this, PInvoke.TVM_SETIMAGELIST, 0, _imageList.Handle); 2058PInvokeCore.SendMessage(this, PInvoke.TVM_SETINDENT, (WPARAM)_indent); 2076PInvoke.SetWindowPos( 2089PInvoke.SetWindowPos( 2131PInvokeCore.SendMessage(this, PInvoke.TVM_SETIMAGELIST, (WPARAM)PInvoke.TVSIL_STATE, (LPARAM)newImageList.Handle); 2141IntPtr handleOld = PInvokeCore.SendMessage(this, PInvoke.TVM_SETIMAGELIST, (WPARAM)PInvoke.TVSIL_STATE, (LPARAM)handle); 2144PInvoke.ImageList.Destroy(new HandleRef<HIMAGELIST>(this, (HIMAGELIST)handleOld)); 2152IntPtr handle = PInvokeCore.SendMessage(this, PInvoke.TVM_GETIMAGELIST, (WPARAM)PInvoke.TVSIL_STATE); 2155PInvoke.ImageList.Destroy(new HandleRef<HIMAGELIST>(this, (HIMAGELIST)handle)); 2158PInvokeCore.SendMessage(this, PInvoke.TVM_SETIMAGELIST, (WPARAM)PInvoke.TVSIL_STATE); 2202nint hnode = PInvokeCore.SendMessage(this, PInvoke.TVM_HITTEST, 0, ref tvhip); 2564if ((int)PInvokeCore.SendMessage(this, PInvoke.TVM_GETITEMHEIGHT) != itemHeight) 2566PInvokeCore.SendMessage(this, PInvoke.TVM_SETITEMHEIGHT, (WPARAM)itemHeight); 2575PInvokeCore.SendMessage(this, PInvoke.TVM_SETITEMHEIGHT, (WPARAM)ItemHeight); 2757if (PInvokeCore.SendMessage(this, PInvoke.TVM_GETITEMRECT, 1, ref rc) != 0) 2759PInvoke.InvalidateRect(this, &rc, bErase: true); 2785_labelEdit.AssignHandle(PInvokeCore.SendMessage(this, PInvoke.TVM_GETEDITCONTROL)); 2853PInvoke.TVM_SETEXTENDEDSTYLE, 2854(WPARAM)(nint)PInvoke.TVS_EX_DOUBLEBUFFER, 2855(LPARAM)(nint)(DoubleBuffered ? PInvoke.TVS_EX_DOUBLEBUFFER : 0)); 2890PInvokeCore.SendMessage(this, PInvoke.TVM_SELECTITEM, (WPARAM)PInvoke.TVGN_DROPHILITE); 2916m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_NOTIFYITEMDRAW; // yes, we do... 2928m.ResultInternal = (LRESULT)(nint)(PInvoke.CDRF_SKIPDEFAULT); 2941m.ResultInternal = (LRESULT)(nint)(PInvoke.CDRF_NEWFONT | PInvoke.CDRF_NOTIFYPOSTPAINT); 2957if (PInvoke.GetScrollInfo(this, SCROLLBAR_CONSTANTS.SB_HORZ, ref si)) 2975m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_SKIPDEFAULT; 3005m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_NEWFONT; 3063m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_NOTIFYSUBITEMDRAW; 3071m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_DODEFAULT; 3129nint hnode = PInvokeCore.SendMessage(this, PInvoke.TVM_HITTEST, 0, ref tvhip); 3135PInvokeCore.SendMessage(tooltipHandle, PInvoke.TTM_ADJUSTRECT, (WPARAM)(BOOL)true, ref bounds); 3136PInvoke.SetWindowPos( 3160nint hnode = PInvokeCore.SendMessage(this, PInvoke.TVM_HITTEST, 0, ref tvhip); 3194if (nmhdr->code == PInvoke.NM_CUSTOMDRAW) 3204case PInvoke.TVN_ITEMEXPANDINGW: 3207case PInvoke.TVN_ITEMEXPANDEDW: 3210case PInvoke.TVN_SELCHANGINGW: 3213case PInvoke.TVN_SELCHANGEDW: 3216case PInvoke.TVN_BEGINDRAGW: 3219case PInvoke.TVN_BEGINRDRAGW: 3222case PInvoke.TVN_BEGINLABELEDITW: 3225case PInvoke.TVN_ENDLABELEDITW: 3228case PInvoke.NM_CLICK: 3229case PInvoke.NM_RCLICK: 3237nint hnode = PInvokeCore.SendMessage(this, PInvoke.TVM_HITTEST, 0, ref tvhip); 3238if (nmtv->hdr.code != PInvoke.NM_CLICK || (tvhip.flags & TVHITTESTINFO_FLAGS.TVHT_ONITEM) != 0) 3240button = nmtv->hdr.code == PInvoke.NM_CLICK ? MouseButtons.Left : MouseButtons.Right; 3246if (nmtv->hdr.code != PInvoke.NM_CLICK 3257if (nmtv->hdr.code == PInvoke.NM_RCLICK) 3267PInvokeCore.SendMessage(this, PInvokeCore.WM_CONTEXTMENU, (WPARAM)HWND, (LPARAM)PInvoke.GetMessagePos()); 3275if (nmtv->hdr.code != PInvoke.NM_CLICK 3319PInvokeCore.PostMessage(this, PInvoke.TVM_SELECTITEM, (WPARAM)PInvoke.TVGN_DROPHILITE, (LPARAM)treeNode.Handle); 3332PInvokeCore.SendMessage(this, PInvoke.TVM_SELECTITEM, (WPARAM)PInvoke.TVGN_DROPHILITE); 3350if (((nint)m.LParamInternal & PInvoke.PRF_NONCLIENT) != 0 3393case PInvoke.TVM_SETITEMW: 3409PInvokeCore.SendMessage(this, PInvoke.TVM_GETITEMW, 0, ref item1); 3421case PInvoke.TTN_GETDISPINFOW: 3423PInvokeCore.SendMessage(nmhdr->hwndFrom, PInvoke.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 3427case PInvoke.TTN_SHOW: 3478_mouseDownNode = PInvokeCore.SendMessage(this, PInvoke.TVM_HITTEST, 0, ref tvhip); 3515nint hnode = PInvokeCore.SendMessage(this, PInvoke.TVM_HITTEST, 0, ref tvhi); 3596_mouseDownNode = PInvokeCore.SendMessage(this, PInvoke.TVM_HITTEST, 0, ref tvhit); 3602PInvokeCore.SendMessage(this, PInvoke.TVM_SETINDENT, (WPARAM)Indent); 3655if (m.LParamInternal == PInvoke.UiaRootObjectId && SupportsUiaProviders && !IsAccessibilityObjectCreated && Focused)
System\Windows\Forms\Controls\UpDown\NumericUpDown.cs (1)
487PInvoke.MessageBeep(MESSAGEBOX_STYLE.MB_OK);
System\Windows\Forms\Controls\UpDown\UpDownBase.cs (7)
783if (PInvoke.WindowFromPoint(PointToScreen(mevent.Location)) == HWND && !ValidationCancelled) 833Debug.Assert(_wheelDelta > -PInvoke.WHEEL_DELTA, "wheelDelta is too small"); 834Debug.Assert(_wheelDelta < PInvoke.WHEEL_DELTA, "wheelDelta is too big"); 838partialNotches = _wheelDelta / (float)PInvoke.WHEEL_DELTA; 860_wheelDelta -= (int)(scrollBands * (PInvoke.WHEEL_DELTA / (float)wheelScrollLines)); 871_wheelDelta -= (int)(scrollBands * (PInvoke.WHEEL_DELTA / (float)wheelScrollLines)); 1277PInvoke.SetFocus(TextBox);
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.cs (1)
269if (!_parent.ValidationCancelled && PInvoke.WindowFromPoint(PointToScreen(e.Location)) == HWND)
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.UpDownButtonsAccessibleObject.cs (2)
92PInvoke.UiaDisconnectProvider(_upButton, skipOSCheck: true); 95PInvoke.UiaDisconnectProvider(_downButton, skipOSCheck: true);
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownEdit.cs (1)
79if (!_parent.ValidationCancelled && PInvoke.WindowFromPoint(PointToScreen(e.Location)) == HWND)
System\Windows\Forms\Controls\WebBrowser\WebBrowser.cs (2)
1104HWND hwndFocus = PInvoke.GetFocus(); 1105return !hwndFocus.IsNull && PInvoke.IsChild(this, hwndFocus);
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (5)
337time = PInvoke.GetTickCount() 340PInvoke.GetCursorPos(out Point p); 342if (!PInvoke.IsAccelerator(new HandleRef<HACCEL>(this, controlInfo.hAccel), controlInfo.cAccel, &msg, lpwCmd: null)) 771PInvoke.SetParent(hwnd, this); 1150containerControl = FromHandle(PInvoke.GetParent(this)) as ContainerControl;
System\Windows\Forms\Controls\WebBrowser\WebBrowserHelper.cs (1)
44internal 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); 117PInvoke.ExtTextOut(dc, 0, 0, ETO_OPTIONS.ETO_CLIPPED | ETO_OPTIONS.ETO_OPAQUE, &rc, lpString: null, 0, lpDx: null); 123PInvoke.GetTextExtentPoint32W(dc, pItemText, itemText.Length, (SIZE*)(void*)&size); 135PInvoke.DrawText( 145PInvoke.ImageList.Draw( 165PInvoke.ExtTextOut(dc, 0, 0, ETO_OPTIONS.ETO_OPAQUE, &rc2, lpString: null, 0, lpDx: null); 168PInvoke.ExtTextOut(dc, 0, 0, ETO_OPTIONS.ETO_OPAQUE, &rc2, lpString: null, 0, lpDx: null); 176PInvoke.ExtTextOut(dc, 0, 0, ETO_OPTIONS.ETO_OPAQUE, &rc2, lpString: null, 0, lpDx: null); 179PInvoke.ExtTextOut(dc, 0, 0, ETO_OPTIONS.ETO_OPAQUE, &rc2, lpString: null, 0, lpDx: null); 189int itemHeight = (int)PInvokeCore.SendMessage(this, PInvoke.TVM_GETITEMHEIGHT); 191PInvokeCore.SendMessage(this, PInvoke.TVM_SETITEMHEIGHT, (WPARAM)itemHeight); 206m.ResultInternal = (LRESULT)(nint)(PInvoke.CDRF_NOTIFYITEMDRAW | PInvoke.CDRF_NOTIFYPOSTPAINT); 236m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_SKIPDEFAULT; 241m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_SKIPDEFAULT; 244m.ResultInternal = (LRESULT)(nint)PInvoke.CDRF_DODEFAULT; 269PInvoke.PatBlt(dc, rc.left, rc.top, rc.Width, rc.Height, ROP_CODE.PATCOPY); 280if (nmhdr->code == PInvoke.NM_CUSTOMDRAW)
System\Windows\Forms\Dialogs\CommonDialogs\ColorDialog.cs (2)
108protected virtual nint Instance => PInvoke.GetModuleHandle((PCWSTR)null); 185if (!PInvoke.ChooseColor(&cc))
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (5)
73PInvoke.SetFocus((HWND)wparam); 84PInvoke.SetFocus(_defaultControlHwnd); 101PInvoke.SetWindowPos( 204ownerHwnd = Control.GetHandleRef(PInvoke.GetActiveWindow()); 217s_helpMessage = PInvoke.RegisterWindowMessage("commdlg_help");
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (10)
288protected virtual nint Instance => PInvoke.GetModuleHandle((PCWSTR)null); 499_dialogHWnd = PInvoke.GetParent((HWND)hWnd); 506case PInvoke.CDN_INITDONE: 509case PInvoke.CDN_SELCHANGE: 511int sizeNeeded = (int)PInvokeCore.SendMessage(_dialogHWnd, PInvoke.CDM_GETSPEC); 530case PInvoke.CDN_SHAREVIOLATION: 536case PInvoke.CDN_FILEOK: 567PInvoke.EndDialog(_dialogHWnd, 0); 671HWND focusHandle = PInvoke.GetFocus(); 679PInvoke.SetFocus(focusHandle);
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.Vista.cs (1)
64using ComScope<IShellItem> initialDirectory = new(PInvoke.SHCreateShellItem(InitialDirectory));
System\Windows\Forms\Dialogs\CommonDialogs\FolderBrowserDialog.cs (10)
357using ComScope<IShellItem> initialDirectory = new(PInvoke.SHCreateShellItem(_initialDirectory)); 378dialog->SetFolder(PInvoke.SHCreateItemFromParsingName(parent)); 438uint mergedOptions = PInvoke.BIF_NEWDIALOGSTYLE; 441mergedOptions |= PInvoke.BIF_NONEWFOLDERBUTTON; 492case PInvoke.BFFM_INITIALIZED: 498PInvokeCore.SendMessage(hwnd, PInvoke.BFFM_SETEXPANDED, (WPARAM)(BOOL)true, instance._initialDirectory); 504PInvokeCore.SendMessage(hwnd, PInvoke.BFFM_SETSELECTIONW, (WPARAM)(BOOL)true, instance.SelectedPath); 508case PInvoke.BFFM_SELCHANGED: 517bool isFileSystemFolder = PInvoke.SHGetPathFromIDListEx(selectedPidl, b, (uint)buffer.Length, GPFIDL_FLAGS.GPFIDL_UNCPRINTER); 518PInvokeCore.SendMessage(hwnd, PInvoke.BFFM_ENABLEOK, 0, (nint)(BOOL)isFileSystemFolder);
System\Windows\Forms\Dialogs\CommonDialogs\FontDialog.cs (15)
315int index = (int)PInvoke.SendDlgItemMessage((HWND)hWnd, (int)PInvoke.cmb4, PInvoke.CB_GETCURSEL, 0, 0); 316if (index != PInvoke.CB_ERR) 318UpdateColor((COLORREF)(int)PInvoke.SendDlgItemMessage( 320(int)PInvoke.cmb4, 321PInvoke.CB_GETITEMDATA, 346HWND hWndCtl = PInvoke.GetDlgItem((HWND)hWnd, (int)PInvoke.cmb4); 347PInvoke.ShowWindow(hWndCtl, SHOW_WINDOW_CMD.SW_HIDE); 348hWndCtl = PInvoke.GetDlgItem((HWND)hWnd, (int)PInvoke.stc4); 349PInvoke.ShowWindow(hWndCtl, SHOW_WINDOW_CMD.SW_HIDE); 393hInstance = PInvoke.GetModuleHandle((PCWSTR)null), 417if (!PInvoke.ChooseFont(&cf))
System\Windows\Forms\Dialogs\CommonDialogs\OpenFileDialog.cs (2)
117bool result = PInvoke.GetOpenFileName(ofn); 121switch (PInvoke.CommDlgExtendedError())
System\Windows\Forms\Dialogs\CommonDialogs\SaveFileDialog.cs (2)
142bool result = PInvoke.GetSaveFileName(ofn); 147switch (PInvoke.CommDlgExtendedError())
System\Windows\Forms\Dialogs\MessageBox.cs (4)
459handle = owner is null ? Control.GetHandleRef(PInvoke.GetActiveWindow()) : Control.GetSafeHandle(owner); 465if (PInvoke.GetModuleHandle(Libraries.Shell32) == 0) 467if (PInvoke.LoadLibraryFromSystemPathIfAvailable(Libraries.Shell32) == HINSTANCE.Null) 482return (DialogResult)PInvoke.MessageBox(handle.Handle, text, caption, style);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (3)
607returnValue = PInvoke.TaskDialogIndirect( 902caption = Path.GetFileName(PInvoke.GetModuleFileNameLongPath(HINSTANCE.Null)); 905PInvoke.SetWindowText(_handle, caption);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogProgressBar.cs (4)
313TaskDialogProgressBarState.Normal => PInvoke.PBST_NORMAL, 314TaskDialogProgressBarState.Paused => PInvoke.PBST_PAUSED, 315TaskDialogProgressBarState.Error => PInvoke.PBST_ERROR, 359taskDialog.SetProgressBarState(PInvoke.PBST_NORMAL);
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (1)
784if (PInvoke.UiaClientsAreListening())
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (23)
57toolInfo.SendMessage(_tipWindow, PInvoke.TTM_ADDTOOLW); 105PInvoke.InitCommonControlsEx(new INITCOMMONCONTROLSEX 114ClassName = PInvoke.TOOLTIPS_CLASS, 115Style = (int)PInvoke.TTS_ALWAYSTIP 123PInvoke.TTM_SETMAXTIPWIDTH, 126PInvoke.SetWindowPos( 131PInvokeCore.SendMessage(_tipWindow, PInvoke.TTM_SETDELAYTIME, (WPARAM)PInvoke.TTDT_INITIAL); 149PInvoke.SetWindowPos( 168PInvoke.GetViewportExtEx(hdc, &originalExtents); 169PInvoke.SetViewportExtEx(hdc, -originalExtents.Width, originalExtents.Height, lpsz: null); 172PInvoke.SetViewportOrgEx(hdc, originalOrigin.X + _windowBounds.Width - 1, originalOrigin.Y, lppt: null); 257info.SendMessage(_tipWindow, PInvoke.TTM_DELTOOLW); 352toolInfo.SendMessage(_tipWindow, PInvoke.TTM_SETTOOLINFOW); 372if (PInvoke.SetWindowRgn(this, windowRegionHandle, fRedraw: true) != 0) 378PInvoke.SetWindowPos( 387PInvoke.InvalidateRect(this, lpRect: null, bErase: false); 395if (m.Msg == (int)PInvokeCore.WM_GETOBJECT && m.LParamInternal == PInvoke.UiaRootObjectId) 399m.ResultInternal = PInvoke.UiaReturnRawElementProvider( 424if (nmhdr->code is PInvoke.TTN_SHOW or PInvoke.TTN_POP) 426OnToolTipVisibilityChanging((nint)nmhdr->idFrom, nmhdr->code == PInvoke.TTN_SHOW); 445int currentDpi = (int)PInvoke.GetDpiForWindow(this);
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.ErrorWindowAccessibleObject.cs (1)
83PInvoke.UiaHostProviderFromHwnd(new HandleRef<HWND>(this, _owner.HWND), out IRawElementProviderSimple* provider);
System\Windows\Forms\ErrorProvider\ErrorProvider.IconRegion.cs (1)
57PInvoke.GetBitmapBits(mask, bits.Length, pbits);
System\Windows\Forms\Form.cs (86)
1363PInvoke.SetWindowPos( 1793PInvoke.SetWindowDisplayAffinity(HWND, WINDOW_DISPLAY_AFFINITY.WDA_NONE); 1803PInvoke.SetWindowDisplayAffinity(HWND, affinity); 2068PInvoke.SetWindowPos( 2218PInvoke.ShowWindow(this, SHOW_WINDOW_CMD.SW_SHOW); 2322PInvoke.DwmSetWindowAttribute( 2515PInvoke.DwmGetWindowAttribute( 2528PInvoke.DwmSetWindowAttribute( 2564PInvoke.ShowWindow(this, SHOW_WINDOW_CMD.SW_NORMAL); 2567PInvoke.ShowWindow(this, SHOW_WINDOW_CMD.SW_MAXIMIZE); 2570PInvoke.ShowWindow(this, SHOW_WINDOW_CMD.SW_MINIMIZE); 2836PInvoke.SetForegroundWindow(this); 2973PInvoke.EnableMenuItem(hmenu, PInvoke.SC_MINIMIZE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_GRAYED); 2977PInvoke.EnableMenuItem(hmenu, PInvoke.SC_MINIMIZE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_ENABLED); 2982PInvoke.EnableMenuItem(hmenu, PInvoke.SC_MAXIMIZE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_GRAYED); 2986PInvoke.EnableMenuItem(hmenu, PInvoke.SC_MAXIMIZE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_ENABLED); 2991PInvoke.EnableMenuItem(hmenu, PInvoke.SC_CLOSE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_GRAYED); 2995PInvoke.EnableMenuItem(hmenu, PInvoke.SC_CLOSE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_ENABLED); 3000PInvoke.EnableMenuItem(hmenu, PInvoke.SC_RESTORE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_GRAYED); 3004PInvoke.EnableMenuItem(hmenu, PInvoke.SC_RESTORE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_ENABLED); 3009PInvoke.EnableMenuItem(hmenu, PInvoke.SC_SIZE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_GRAYED); 3013PInvoke.EnableMenuItem(hmenu, PInvoke.SC_SIZE, MENU_ITEM_FLAGS.MF_BYCOMMAND | MENU_ITEM_FLAGS.MF_ENABLED); 3027HMENU hmenu = PInvoke.GetSystemMenu(this, bRevert: false); 3417PInvokeCore.SendMessage(TaskbarOwner, PInvokeCore.WM_SETICON, (WPARAM)PInvoke.ICON_BIG, (LPARAM)icon.Handle); 3492m.ResultInternal = PInvoke.DefFrameProc( 3503m.ResultInternal = PInvoke.DefMDIChildProc(m.HWND, (uint)m.Msg, m.WParamInternal, m.LParamInternal); 3566PInvoke.DestroyMenu(dummyMenu); 3682cp.Width = PInvoke.CW_USEDEFAULT; 3683cp.Height = PInvoke.CW_USEDEFAULT; 3697cp.X = PInvoke.CW_USEDEFAULT; 3698cp.Y = PInvoke.CW_USEDEFAULT; 4412PInvoke.ClientToScreen(this, ref pointToSnap); 4729PInvoke.TranslateMDISysAccel(_ctlClient.HWND, win32Message)) 4922bool result = PInvoke.GetWindowPlacement(HWND, &wp); 4966bool result = PInvoke.SetWindowPlacement(HWND, &wp); 5143PInvoke.SetActiveWindow(this); 5147PInvoke.SetActiveWindow(MdiParentInternal); 5493HWND activeHwnd = PInvoke.GetActiveWindow(); 5725HWND captureHwnd = PInvoke.GetCapture(); 5729PInvoke.ReleaseCapture(); 5732HWND activeHwnd = PInvoke.GetActiveWindow(); 5795if (!PInvoke.IsWindow(activeHwnd)) 5800if (PInvoke.IsWindow(activeHwnd) && PInvoke.IsWindowVisible(activeHwnd)) 5802PInvoke.SetActiveWindow(activeHwnd); 5804else if (PInvoke.IsWindow(ownerHwnd) && PInvoke.IsWindowVisible(ownerHwnd)) 5806PInvoke.SetActiveWindow(ownerHwnd); 6163result = PInvoke.SetLayeredWindowAttributes(this, (COLORREF)0, OpacityAsByte, LAYERED_WINDOW_ATTRIBUTES_FLAGS.LWA_ALPHA); 6168result = PInvoke.SetLayeredWindowAttributes(this, (COLORREF)transparencyKey, 0, LAYERED_WINDOW_ATTRIBUTES_FLAGS.LWA_COLORKEY); 6172result = PInvoke.SetLayeredWindowAttributes(this, (COLORREF)transparencyKey, OpacityAsByte, LAYERED_WINDOW_ATTRIBUTES_FLAGS.LWA_ALPHA | LAYERED_WINDOW_ATTRIBUTES_FLAGS.LWA_COLORKEY); 6191PInvoke.SetMenu(this, HMENU.Null); 6210dummyMenu = PInvoke.CreateMenu(); 6224HMENU hMenu = PInvoke.GetMenu(this); 6228PInvoke.SetMenu(this, HMENU.Null); 6246PInvoke.DrawMenuBar(this); 6369HMENU hMenu = PInvoke.GetMenu(this); 6487PInvokeCore.SendMessage(this, PInvokeCore.WM_SETICON, (WPARAM)PInvoke.ICON_SMALL, (LPARAM)_smallIcon.Handle); 6490PInvokeCore.SendMessage(this, PInvokeCore.WM_SETICON, (WPARAM)PInvoke.ICON_BIG, (LPARAM)icon.Handle); 6494PInvokeCore.SendMessage(this, PInvokeCore.WM_SETICON, (WPARAM)PInvoke.ICON_SMALL); 6495PInvokeCore.SendMessage(this, PInvokeCore.WM_SETICON, (WPARAM)PInvoke.ICON_BIG); 6505PInvoke.RedrawWindow(this, lprcUpdate: null, HRGN.Null, REDRAW_WINDOW_FLAGS.RDW_INVALIDATE | REDRAW_WINDOW_FLAGS.RDW_FRAME); 6529PInvoke.GetWindowPlacement(HWND, &wp); 6641Active = m.WParamInternal.LOWORD != PInvoke.WA_INACTIVE; 6669PInvoke.GetStartupInfo(out STARTUPINFOW si); 7033m.ResultInternal = (LRESULT)(nint)(IsMirrored ? PInvoke.HTBOTTOMLEFT : PInvoke.HTBOTTOMRIGHT); 7046if (result is >= ((int)PInvoke.HTLEFT) and <= ((int)PInvoke.HTBOTTOMRIGHT)) 7048m.ResultInternal = (LRESULT)(nint)PInvoke.HTBORDER; 7072case PInvoke.SC_CLOSE: 7080case PInvoke.SC_KEYMENU: 7087case PInvoke.SC_SIZE: 7088case PInvoke.SC_MOVE: 7092case PInvoke.SC_CONTEXTHELP: 7126MdiParentInternal.UpdateMdiControlStrip((nint)m.WParamInternal == PInvoke.SIZE_MAXIMIZED);
System\Windows\Forms\Form.RevealMode.cs (2)
166PInvoke.RedrawWindow( 201HRESULT result = PInvoke.DwmSetWindowAttribute(
System\Windows\Forms\Help\Help.cs (14)
125uint requiredStringSize = PInvoke.GetShortPathName(localPath, default); 130uint written = PInvoke.GetShortPathName(localPath, shortName); 140HandleRef<HWND> handle = parent is not null ? (new(parent)) : Control.GetHandleRef(PInvoke.GetActiveWindow()); 148PInvoke.HtmlHelp(handle, pathAndFileName, htmlCommand, stringHtmlParam); 152PInvoke.HtmlHelp(handle, pathAndFileName, htmlCommand, (nuint)intParam); 159PInvoke.HtmlHelp(handle, pathAndFileName, htmlCommand, in query); 166PInvoke.HtmlHelp(HWND.Null, pathAndFileName, HH_DISPLAY_TOPIC, null); 171PInvoke.HtmlHelp(handle, pathAndFileName, htmlCommand, in aLink); 177PInvoke.HtmlHelp(handle, pathAndFileName, htmlCommand, (string)param); 182PInvoke.HtmlHelp(handle, pathAndFileName, MapCommandToHTMLCommand(command, null, out htmlParam), null); 186PInvoke.HtmlHelp(handle, pathAndFileName, HH_DISPLAY_TEXT_POPUP, ref popup); 217HandleRef<HWND> handle = parent is not null ? new(parent) : Control.GetHandleRef(PInvoke.GetActiveWindow()); 220PInvoke.ShellExecute(handle.Handle, lpOperation: null, executable ?? fileName, executable is not null ? fileName : null, lpDirectory: null, SHOW_WINDOW_CMD.SW_NORMAL); 232result = PInvoke.FindExecutable(lpFileLocal, lpDirectory: null, lpResult: b);
System\Windows\Forms\Input\Cursor.cs (12)
38_handle = PInvoke.LoadCursor(HINSTANCE.Null, nResourceId); 122PInvoke.GetClipCursor(out RECT rect); 129PInvoke.ClipCursor((RECT*)null); 134PInvoke.ClipCursor(&rect); 147HCURSOR cursor = PInvoke.GetCursor(); 150set => PInvoke.SetCursor(value?._handle ?? HCURSOR.Null); 184PInvoke.GetCursorPos(out Point p); 187set => PInvoke.SetCursorPos(value.X, value.Y); 235PInvoke.DestroyCursor(_handle); 334PInvoke.IntersectClipRect(dc, targetX, targetY, targetX + clipWidth, targetY + clipHeight); 373public static void Hide() => PInvoke.ShowCursor(bShow: false); 463public static void Show() => PInvoke.ShowCursor(bShow: true);
System\Windows\Forms\Input\Cursors.cs (15)
40public static Cursor AppStarting => s_appStarting ??= new(PInvoke.IDC_APPSTARTING, nameof(AppStarting)); 41public static Cursor Arrow => s_arrow ??= new(PInvoke.IDC_ARROW, nameof(Arrow)); 42public static Cursor Cross => s_cross ??= new(PInvoke.IDC_CROSS, nameof(Cross)); 43public static Cursor Default => s_defaultCursor ??= new(PInvoke.IDC_ARROW, nameof(Default)); 44public static Cursor IBeam => s_iBeam ??= new(PInvoke.IDC_IBEAM, nameof(IBeam)); 45public static Cursor No => s_no ??= new(PInvoke.IDC_NO, nameof(No)); 46public static Cursor SizeAll => s_sizeAll ??= new(PInvoke.IDC_SIZEALL, nameof(SizeAll)); 47public static Cursor SizeNESW => s_sizeNESW ??= new(PInvoke.IDC_SIZENESW, nameof(SizeNESW)); 48public static Cursor SizeNS => s_sizeNS ??= new(PInvoke.IDC_SIZENS, nameof(SizeNS)); 49public static Cursor SizeNWSE => s_sizeNWSE ??= new(PInvoke.IDC_SIZENWSE, nameof(SizeNWSE)); 50public static Cursor SizeWE => s_sizeWE ??= new(PInvoke.IDC_SIZEWE, nameof(SizeWE)); 51public static Cursor UpArrow => s_upArrow ??= new(PInvoke.IDC_UPARROW, nameof(UpArrow)); 52public static Cursor WaitCursor => s_wait ??= new(PInvoke.IDC_WAIT, nameof(WaitCursor)); 53public static Cursor Help => s_help ??= new(PInvoke.IDC_HELP, nameof(Help)); 54public static Cursor Hand => s_hand ??= new(PInvoke.IDC_HAND, nameof(Hand));
System\Windows\Forms\Input\InputLanguage.cs (8)
39return new InputLanguage(PInvoke.GetKeyboardLayout(0)); 47HKL handleOld = PInvoke.ActivateKeyboardLayout(new HKL(value.Handle), 0); 80int size = PInvoke.GetKeyboardLayoutList(0, null); 86PInvoke.GetKeyboardLayoutList(size, h); 209if (langId is (int)PInvoke.LOCALE_TRANSIENT_KEYBOARD1 210or (int)PInvoke.LOCALE_TRANSIENT_KEYBOARD2 211or (int)PInvoke.LOCALE_TRANSIENT_KEYBOARD3 212or (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)
28int lastXY = (int)PInvoke.GetMessagePos();
System\Windows\Forms\Layout\ArrangeDirection.cs (4)
15Down = PInvoke.ARW_DOWN, 20Left = PInvoke.ARW_LEFT, 25Right = PInvoke.ARW_RIGHT, 30Up = PInvoke.ARW_UP,
System\Windows\Forms\Layout\ArrangeStartingPosition.cs (1)
27Hide = PInvoke.ARW_HIDE,
System\Windows\Forms\Layout\Containers\ContainerControl.cs (7)
628HWND focusHandle = PInvoke.GetFocus(); 631PInvoke.SetFocus(_activeControl); 653PInvoke.SetFocus(containerControl); 690PInvoke.ClientToScreen(this, ref topLeftPoint); 723PInvoke.GetTextMetrics(dc, &tm); 732PInvoke.GetTextExtentPoint32W(dc, ps, FontMeasureString.Length, (SIZE*)(void*)&size); 1409PInvoke.SetWindowPos(
System\Windows\Forms\Layout\Containers\SplitContainer.cs (5)
451PInvoke.GetCursorPos(out Point p); 453if ((r.left <= p.X && p.X < r.right && r.top <= p.Y && p.Y < r.bottom) || PInvoke.GetCapture() == HWND) 455PInvokeCore.SendMessage(this, PInvokeCore.WM_SETCURSOR, (WPARAM)HWND, (LPARAM)(int)PInvoke.HTCLIENT); 1478PInvoke.PatBlt(dc, r.X, r.Y, r.Width, r.Height, ROP_CODE.PATINVERT); 2279if ((HWND)m.WParamInternal == InternalHandle && m.LParamInternal.LOWORD == PInvoke.HTCLIENT)
System\Windows\Forms\MDI\MDIClient.cs (3)
250bool result = PInvoke.GetWindowPlacement(child.HWND, &wp); 266PInvoke.SetWindowPlacement(child.HWND, &wp); 303if (PInvoke.SetWindowRgn(this, rgn1, true) == 0)
System\Windows\Forms\MDI\MDIControlStrip.cs (7)
26HMENU 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); 80HICON hIcon = (HICON)PInvokeCore.SendMessage(GetSafeHandle(_target), PInvokeCore.WM_GETICON, (WPARAM)PInvoke.ICON_SMALL); 116HMENU 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)
73internal DPI_AWARENESS_CONTEXT DpiAwarenessContext { get; } = PInvoke.GetThreadDpiAwarenessContextInternal(); 105if (PInvoke.IsWindow(handle)) 114PInvoke.GetExitCodeThread((HANDLE)threadHandle, &exitCode); 117PInvoke.SendMessageTimeout( 169var hModule = PInvoke.GetModuleHandle(Libraries.User32); 175s_defaultWindowProc = PInvoke.GetProcAddress(hModule, (PCSTR)ptr); 426HINSTANCE modHandle = PInvoke.GetModuleHandle((PCWSTR)null); 439createResult = PInvoke.CreateWindowEx( 483DPI_AWARENESS_CONTEXT controlHandleDpiContext = PInvoke.GetWindowDpiAwarenessContext(HWND); 533if (!PInvoke.DestroyWindow(HWND))
System\Windows\Forms\NativeWindow.WindowClass.cs (3)
145if (!PInvoke.GetClassInfo(HINSTANCE.Null, n, &windowClass)) 159windowClass.hInstance = PInvoke.GetModuleHandle((PCWSTR)null); 165if (PInvoke.RegisterClass(&windowClass) == 0)
System\Windows\Forms\NotifyIcon.cs (11)
32private static uint WM_TASKBARCREATED { get; } = PInvoke.RegisterWindowMessage("TaskbarCreated"); 597PInvoke.Shell_NotifyIconW(NOTIFY_ICON_MESSAGE.NIM_MODIFY, ref data); 608PInvoke.GetCursorPos(out Point pt); 613PInvoke.SetForegroundWindow(_window); 666PInvoke.Shell_NotifyIconW(NOTIFY_ICON_MESSAGE.NIM_ADD, ref data); 671PInvoke.Shell_NotifyIconW(NOTIFY_ICON_MESSAGE.NIM_MODIFY, ref data); 676PInvoke.Shell_NotifyIconW(NOTIFY_ICON_MESSAGE.NIM_DELETE, ref data); 769case PInvoke.NIN_BALLOONSHOW: 772case PInvoke.NIN_BALLOONHIDE: 775case PInvoke.NIN_BALLOONTIMEOUT: 778case PInvoke.NIN_BALLOONUSERCLICK:
System\Windows\Forms\PowerStatus.cs (1)
62private void UpdateSystemPowerStatus() => PInvoke.GetSystemPowerStatus(out _systemPowerStatus);
System\Windows\Forms\Printing\PageSetupDialog.cs (4)
288fixed (char* pLocaleName = PInvoke.LOCALE_NAME_SYSTEM_DEFAULT) 290result = PInvoke.GetLocaleInfoEx( 292PInvoke.LOCALE_IMEASURE, 335if (!PInvoke.PageSetupDlg(&dialogSettings))
System\Windows\Forms\Printing\PrintDialog.cs (6)
296? PInvoke.PrintDlg(&dialogSettings32) 297: PInvoke.PrintDlg(&dialogSettings64); 302var extendedResult = PInvoke.CommDlgExtendedError(); 358nStartPage = PInvoke.START_PAGE_GENERAL, 416if (hr.Failed || dialogSettings.dwResultAction == PInvoke.PD_RESULT_CANCEL) 447return dialogSettings.dwResultAction == PInvoke.PD_RESULT_PRINT;
System\Windows\Forms\Printing\PrinterSettingsExtensions.cs (2)
26modeSize = PInvoke.DocumentProperties(HWND.Null, global::Windows.Win32.Graphics.Printing.PRINTER_HANDLE.Null, n, null, (DEVMODEW*)null, 0); 38modeSize = PInvoke.DocumentProperties(
System\Windows\Forms\Rendering\ControlPaint.cs (8)
184HPALETTE palette = PInvoke.CreateHalftonePalette(dc); 371return PInvoke.CreateBrushIndirect(&logicalBrush); 1079PInvoke.DrawEdge(hdc, ref rc, edge, flags); 1404PInvoke.DrawFrameControl(dc, ref rcCheck, (uint)DFC_TYPE.DFC_MENU, (uint)DFCS_STATE.DFCS_MENUCHECK); 1476PInvoke.DrawFrameControl(hdc, ref rcFrame, (uint)kind, (uint)state); 1863PInvoke.MoveToEx(desktopDC, start.X, start.Y, lppt: null); 1864PInvoke.LineTo(desktopDC, end.X, end.Y); 2113PInvoke.PatBlt(desktopDC, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, rop3);
System\Windows\Forms\Rendering\DCMapping.cs (2)
58success = PInvoke.SetViewportOrgEx( 70originalRegionType = PInvoke.GetRgnBox(originalRegion, &originalClipRect);
System\Windows\Forms\Rendering\FontCache.Data.cs (2)
41Debug.Assert(PInvoke.GetMapMode(hdc) == HDC_MAP_MODE.MM_TEXT); 44PInvoke.GetTextMetrics(hdc, &tm);
System\Windows\Forms\Rendering\ScreenDcCache.cs (5)
102HRGN hrgn = PInvoke.CreateRectRgn(0, 0, 0, 0); 103Debug.Assert(PInvoke.GetClipRgn(hdc, hrgn) == 0, "Should not have a clipping region"); 109Debug.Assert(PInvoke.GetMapMode(hdc) == HDC_MAP_MODE.MM_TEXT); 110Debug.Assert(PInvoke.GetROP2(hdc) == R2_MODE.R2_COPYPEN); 111Debug.Assert(PInvoke.GetBkMode(hdc) == BACKGROUND_MODE.OPAQUE);
System\Windows\Forms\Rendering\TextExtensions.cs (4)
97PInvoke.DrawTextEx(hdc, text, &rect, dt, &dtparams); 171int textHeight = PInvoke.DrawTextEx(hdc, text, &rect, flags, dtparams); 265PInvoke.DrawTextEx(hdc, text, &rect, dt, &dtparams); 294PInvoke.GetTextExtentPoint32W(hdc, pText, text.Length, (SIZE*)(void*)&size);
System\Windows\Forms\Rendering\TextRenderer.cs (1)
666HFONT hfont = (HFONT)PInvoke.GetCurrentObject(hdc, OBJ_TYPE.OBJ_FONT);
System\Windows\Forms\Scrolling\ScrollableControl.cs (2)
789PInvoke.ScrollWindowEx( 904PInvoke.GetScrollInfo(this, fnBar, ref si);
System\Windows\Forms\Scrolling\ScrollBar.cs (7)
120cp.ClassName = PInvoke.WC_SCROLLBAR; 534while (Math.Abs(_wheelDelta) >= PInvoke.WHEEL_DELTA) 538_wheelDelta -= (int)PInvoke.WHEEL_DELTA; 544_wheelDelta += (int)PInvoke.WHEEL_DELTA; 617PInvoke.SetScrollInfo(this, SCROLLBAR_CONSTANTS.SB_CTL, ref si, true); 699PInvoke.GetScrollInfo(this, SCROLLBAR_CONSTANTS.SB_CTL, ref si); 732if (PInvoke.GetFocus() == HWND)
System\Windows\Forms\Scrolling\ScrollProperties.cs (2)
56PInvoke.EnableScrollBar( 274PInvoke.SetScrollInfo(_parent, Orientation, ref si, true);
System\Windows\Forms\SendKeys\SendKeys.cs (18)
134int vk = PInvoke.VkKeyScan(character); 164uint oemVal = PInvoke.OemKeyScan((ushort)(0xFF & character)); 224s_hhook = PInvoke.SetWindowsHookEx( 227PInvoke.GetModuleHandle((PCWSTR)null), 242HHOOK hookHandle = PInvoke.SetWindowsHookEx( 245PInvoke.GetModuleHandle((PCWSTR)null), 252PInvoke.UnhookWindowsHookEx(hookHandle); 316PInvoke.GetKeyboardState(b); 327PInvoke.SetKeyboardState(b); 666bool blockInputSuccess = PInvoke.BlockInput(true); 689eventsSent += PInvoke.SendInput(currentInput, INPUTSize) - 1; 711eventsSent += PInvoke.SendInput(currentInput[..1], INPUTSize); 733PInvoke.BlockInput(false); 872PInvoke.SendInput(keyboardInput, INPUTSize); 879PInvoke.SendInput(keyboardInput, INPUTSize); 886PInvoke.SendInput(keyboardInput, INPUTSize); 893PInvoke.SendInput(keyboardInput, INPUTSize); 1008PInvoke.UnhookWindowsHookEx(s_hhook);
System\Windows\Forms\SendKeys\SendKeys.SendKeysHookProc.cs (5)
30if (PInvoke.GetAsyncKeyState((int)Keys.Pause) != 0) 37case PInvoke.HC_SKIP: 50case PInvoke.HC_GETNEXT: 62eventmsg->time = PInvoke.GetTickCount(); 67PInvoke.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), 102PInvoke.GetCurrentSystemMetrics(SM_CYBORDER, (uint)dpi)) 212=> PInvoke.GetCurrentSystemMetrics(SM_CYVSCROLL, (uint)dpi); 224? PInvoke.GetCurrentSystemMetrics(SM_CXHSCROLL, (uint)dpi) 268public static int DoubleClickTime => (int)PInvoke.GetDoubleClickTime(); 494HWINSTA hwinsta = PInvoke.GetProcessWindowStation(); 500if (PInvoke.GetUserObjectInformation( 507if ((flags.dwFlags & PInvoke.WSF_VISIBLE) == 0) 695public static int CaretBlinkTime => (int)PInvoke.GetCaretBlinkTime(); 702public static int MouseWheelScrollDelta => (int)PInvoke.WHEEL_DELTA; 737PInvoke.EnumDisplaySettings(lpszDeviceName: null, ENUM_DISPLAY_SETTINGS_MODE.ENUM_CURRENT_SETTINGS, ref dm); 802HDESK desktop = PInvoke.OpenInputDesktop(0, false, DESKTOP_ACCESS_FLAGS.DESKTOP_SWITCHDESKTOP); 808PInvoke.CloseDesktop(desktop);
System\Windows\Forms\Timer.cs (3)
262_timerID = PInvoke.SetTimer(this, s_timerID, (uint)interval); 290if (_stoppingTimer || hwnd.IsNull || !PInvoke.IsWindow(hwnd)) 300PInvoke.KillTimer(hwnd, _timerID);
System\Windows\Forms\ToolTip\KeyboardToolTipStateMachine.cs (4)
155return Control.FromHandle(PInvoke.GetFocus()); 189StartTimer(toolTip.GetDelayTime(PInvoke.TTDT_RESHOW), 200toolTip.GetDelayTime(PInvoke.TTDT_AUTOPOP); 226StartTimer(toolTip.GetDelayTime(PInvoke.TTDT_INITIAL),
System\Windows\Forms\ToolTip\ToolTip.cs (87)
93_delayTimes[(int)PInvoke.TTDT_AUTOMATIC] = DefaultDelay; 117PInvokeCore.SendMessage(this, PInvoke.TTM_ACTIVATE, (WPARAM)(BOOL)value); 140get => _delayTimes[(int)PInvoke.TTDT_AUTOMATIC]; 145SetDelayTime((int)PInvoke.TTDT_AUTOMATIC, value); 161get => _delayTimes[(int)PInvoke.TTDT_AUTOPOP]; 166SetDelayTime(PInvoke.TTDT_AUTOPOP, value); 183PInvokeCore.SendMessage(this, PInvoke.TTM_SETTIPBKCOLOR, (WPARAM)_backColor); 201cp.ClassName = PInvoke.TOOLTIPS_CLASS; 204cp.Style = (int)PInvoke.TTS_ALWAYSTIP; 209cp.Style |= (int)PInvoke.TTS_BALLOON; 214cp.Style |= (int)PInvoke.TTS_NOPREFIX; 219cp.Style |= (int)PInvoke.TTS_NOANIMATE; 224cp.Style |= (int)PInvoke.TTS_NOFADE; 252PInvokeCore.SendMessage(this, PInvoke.TTM_SETTIPTEXTCOLOR, (WPARAM)_foreColor); 308HWND hwnd = PInvoke.GetActiveWindow(); 309HWND rootHwnd = PInvoke.GetAncestor(control, GET_ANCESTOR_FLAGS.GA_ROOT); 332get => _delayTimes[(int)PInvoke.TTDT_INITIAL]; 337SetDelayTime(PInvoke.TTDT_INITIAL, value); 357get => _delayTimes[(int)PInvoke.TTDT_RESHOW]; 362SetDelayTime(PInvoke.TTDT_RESHOW, value); 437PInvokeCore.SendMessage(this, PInvoke.TTM_SETTITLEW, (uint)_toolTipIcon, title); 441PInvokeCore.SendMessage(this, PInvoke.TTM_UPDATE); 465PInvokeCore.SendMessage(this, PInvoke.TTM_SETTITLEW, (uint)_toolTipIcon, _toolTipTitle); 469PInvokeCore.SendMessage(this, PInvoke.TTM_UPDATE); 608int 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; 702PInvoke.InitCommonControlsEx(new INITCOMMONCONTROLSEX 719PInvoke.SetWindowTheme(HWND, string.Empty, string.Empty); 723PInvoke.SetWindowTheme(HWND, $"{Control.DarkModeIdentifier}_{Control.ExplorerThemeIdentifier}", null); 736PInvokeCore.SendMessage(this, PInvoke.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 742if (_delayTimes[(int)PInvoke.TTDT_AUTOMATIC] != DefaultDelay) 744SetDelayTime(PInvoke.TTDT_AUTOMATIC, _delayTimes[(int)PInvoke.TTDT_AUTOMATIC]); 748_delayTimes[(int)PInvoke.TTDT_AUTOPOP] = GetDelayTime(PInvoke.TTDT_AUTOPOP); 749_delayTimes[(int)PInvoke.TTDT_INITIAL] = GetDelayTime(PInvoke.TTDT_INITIAL); 750_delayTimes[(int)PInvoke.TTDT_RESHOW] = GetDelayTime(PInvoke.TTDT_RESHOW); 755int delayTime = _delayTimes[(int)PInvoke.TTDT_AUTOPOP]; 758SetDelayTime(PInvoke.TTDT_AUTOPOP, delayTime); 761delayTime = _delayTimes[(int)PInvoke.TTDT_INITIAL]; 764SetDelayTime(PInvoke.TTDT_INITIAL, delayTime); 767delayTime = _delayTimes[(int)PInvoke.TTDT_RESHOW]; 770SetDelayTime(PInvoke.TTDT_RESHOW, delayTime); 775PInvokeCore.SendMessage(this, PInvoke.TTM_ACTIVATE, (WPARAM)(BOOL)_active); 779PInvokeCore.SendMessage(this, PInvoke.TTM_SETTIPBKCOLOR, (WPARAM)BackColor); 784PInvokeCore.SendMessage(this, PInvoke.TTM_SETTIPTEXTCOLOR, (WPARAM)ForeColor); 791PInvokeCore.SendMessage(this, PInvoke.TTM_SETTITLEW, (WPARAM)(int)_toolTipIcon, title); 833IntPtr result = GetTOOLINFO(control, caption).SendMessage(this, PInvoke.TTM_ADDTOOLW); 917new ToolInfoWrapper<Control>(control).SendMessage(this, PInvoke.TTM_DELTOOLW); 968return (int)PInvokeCore.SendMessage(this, PInvoke.TTM_GETDELAYTIME, (WPARAM)type); 1040HWND hwndControl = PInvoke.WindowFromPoint(screenCoords); 1065HWND found = PInvoke.ChildWindowFromPointEx(baseHwnd, pt, CWP_FLAGS.CWP_SKIPINVISIBLE); 1179_auto = type == PInvoke.TTDT_AUTOMATIC; 1185PInvokeCore.SendMessage(this, PInvoke.TTM_SETDELAYTIME, (WPARAM)type, (LPARAM)time); 1186if (type == PInvoke.TTDT_AUTOPOP && time != InfiniteDelay) 1195_delayTimes[(int)PInvoke.TTDT_AUTOPOP] = GetDelayTime(PInvoke.TTDT_AUTOPOP); 1196_delayTimes[(int)PInvoke.TTDT_INITIAL] = GetDelayTime(PInvoke.TTDT_INITIAL); 1197_delayTimes[(int)PInvoke.TTDT_RESHOW] = GetDelayTime(PInvoke.TTDT_RESHOW); 1252toolInfo.SendMessage(this, PInvoke.TTM_SETTOOLINFOW); 1537result = info.SendMessage(this, PInvoke.TTM_GETBUBBLESIZE); 1713PInvokeCore.SendMessage(this, PInvoke.TTM_TRACKPOSITION, 0, PARAM.FromLowHigh(pointX, pointY)); 1742info.SendMessage(this, PInvoke.TTM_TRACKACTIVATE); 1743info.SendMessage(this, PInvoke.TTM_DELTOOLW); 1797if (toolInfo.SendMessage(this, PInvoke.TTM_GETTOOLINFOW) != IntPtr.Zero) 1822IntPtr result = toolInfo.SendMessage(this, PInvoke.TTM_SETTOOLINFOW); 1823result = toolInfo.SendMessage(this, PInvoke.TTM_TRACKACTIVATE, true); 1858IntPtr result = toolInfo.SendMessage(this, PInvoke.TTM_ADDTOOLW); 1859result = toolInfo.SendMessage(this, PInvoke.TTM_TRACKACTIVATE, true); 1947PInvoke.SetWindowPos( 1960if (toolInfo.SendMessage(this, PInvoke.TTM_GETCURRENTTOOLW) != 0) 2013message.ResultInternal = (LRESULT)(nint)PInvoke.MA_NOACTIVATE; 2071PInvokeCore.SendMessage(this, PInvoke.TTM_ADJUSTRECT, (WPARAM)(BOOL)true, ref rect); 2088PInvokeCore.SendMessage(this, PInvoke.TTM_SETMAXTIPWIDTH, 0, maxwidth); 2094PInvoke.SetWindowPos( 2105PInvoke.SetWindowPos( 2125PInvoke.ShowWindow(this, SHOW_WINDOW_CMD.SW_HIDE); 2238PInvokeCore.SendMessage(this, PInvoke.TTM_SETMAXTIPWIDTH, 0, screen.WorkingArea.Width); 2273if (nmhdr->code == PInvoke.TTN_SHOW && !_trackPosition) 2277else if (nmhdr->code == PInvoke.TTN_POP) 2305case (int)PInvoke.TTM_WINDOWFROMPOINT:
System\Windows\Forms\UserControl.cs (2)
248HWND hwndFocus = PInvoke.GetFocus(); 254return HWND == hwndFocus || PInvoke.IsChild(this, hwndFocus);
System\Windows\Forms\VisualStyles\HitTestCode.cs (10)
8Nowhere = (int)PInvoke.HTNOWHERE, 9Client = (int)PInvoke.HTCLIENT, 10Left = (int)PInvoke.HTLEFT, 11Right = (int)PInvoke.HTRIGHT, 12Top = (int)PInvoke.HTTOP, 13Bottom = (int)PInvoke.HTBOTTOM, 14TopLeft = (int)PInvoke.HTTOPLEFT, 15TopRight = (int)PInvoke.HTTOPRIGHT, 16BottomLeft = (int)PInvoke.HTBOTTOMLEFT, 17BottomRight = (int)PInvoke.HTBOTTOMRIGHT
System\Windows\Forms\VisualStyles\VisualStyleInformation.cs (13)
34public static bool IsEnabledByUser => PInvoke.IsAppThemed(); 45PInvoke.GetCurrentThemeName(pFilename, filename.Length, null, 0, null, 0); 67PInvoke.GetCurrentThemeName(null, 0, pColorScheme, colorScheme.Length, null, 0); 89PInvoke.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( 169PInvoke.GetThemeSysInt(
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (35)
100result = part == 0 || (bool)PInvoke.IsThemePartDefined(hTheme, part, 0); 106using PInvoke.OpenThemeDataScope handle = new(HWND.Null, className); 110result = 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, out 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( 774return PInvoke.IsThemeBackgroundPartiallyTransparent(HTHEME, Part, State); 865private static PInvoke.OpenThemeDataScope OpenThemeData(HWND hwnd, string classList) 867PInvoke.OpenThemeDataScope htheme = new(hwnd, classList); 889HTHEME hTheme = PInvoke.OpenThemeData(hWndRef, className); 900PInvoke.CloseThemeData(Handle);
System.Windows.Forms.Design (193)
System\ComponentModel\Design\CollectionEditor.FilterListBox.cs (4)
58PInvoke.SetFocus(PropertyGrid); 69PInvokeCore.SendMessage(PInvoke.GetFocus(), PInvokeCore.WM_KEYDOWN, _lastKeyDown.WParamInternal, _lastKeyDown.LParamInternal); 85PInvoke.SetFocus(PropertyGrid); 96HWND hwnd = PInvoke.GetFocus();
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.cs (2)
94PInvoke.GetTextExtentPoint32W(hdc, ps, s.Length, (SIZE*)(void*)&textSize); 100PInvoke.GetTextMetrics(hdc, &tm);
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (4)
91PInvoke.MsgWaitForMultipleObjectsEx( 144HWND hWndCapture = PInvoke.GetCapture(); 148PInvoke.ReleaseCapture(); 172&& m.WParamInternal.LOWORD == PInvoke.WA_INACTIVE
System\ComponentModel\Design\DesignerActionUI.cs (1)
752PInvoke.SetActiveWindow(_designerActionHost);
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (5)
56HWND focusedControl = PInvoke.GetFocus(); 62focusedControl = PInvoke.GetFocus(); 89HWND hwndActivating = PInvoke.GetActiveWindow(); 226if ((nint)m.WParamInternal == PInvoke.WA_INACTIVE) 258HWND focusedControlPtr = PInvoke.GetFocus();
System\ComponentModel\Design\MultilineStringEditor.MultilineStringEditorUI.cs (1)
187PInvoke.DrawText(hdc, t, Text.Length, ref rect, DRAW_TEXT_FORMAT.DT_CALCRECT);
System\ComponentModel\Design\MultilineStringEditor.OleCallback.cs (3)
31HRESULT hr = PInvoke.CreateILockBytesOnHGlobal(default, fDeleteOnRelease: true, pLockBytes); 37hr = PInvoke.StgCreateDocfileOnILockBytes( 63HRESULT hr = PInvoke.ReadClassStg(lpstg, out Guid realClsid);
System\ComponentModel\Design\ObjectSelectorEditor.cs (4)
68uint exstyle = (uint)PInvokeCore.SendMessage(hwnd, PInvoke.TVM_GETEXTENDEDSTYLE); 69exstyle |= PInvoke.TVS_EX_DOUBLEBUFFER | PInvoke.TVS_EX_FADEINOUTEXPANDOS; 70PInvokeCore.SendMessage(hwnd, PInvoke.TVM_SETEXTENDEDSTYLE, (WPARAM)0, (LPARAM)exstyle);
System\ComponentModel\Design\ObjectSelectorEditor.Selector.cs (2)
194m.ResultInternal = (LRESULT)(m.ResultInternal | (int)PInvoke.DLGC_WANTALLKEYS); 205if (nmtv->code == PInvoke.NM_CLICK)
System\Drawing\Design\ColorEditor.ColorPalette.ColorPaletteAccessibleObject.ColorCellAccessibleObject.cs (1)
40PInvoke.ClientToScreen(palette, ref pt);
System\Drawing\Design\ColorEditor.ColorPalette.cs (3)
221PInvoke.NotifyWinEvent( 242HWND hwndFocus = PInvoke.GetFocus(); 259PInvoke.SetFocus(hwndFocus);
System\Drawing\Design\ColorEditor.CustomColorDialog.cs (39)
64PInvoke.SendDlgItemMessage( 66(int)PInvoke.COLOR_HUE, 68(WPARAM)(PInvoke.EC_LEFTMARGIN | PInvoke.EC_RIGHTMARGIN), 70PInvoke.SendDlgItemMessage( 72(int)PInvoke.COLOR_SAT, 74(WPARAM)(PInvoke.EC_LEFTMARGIN | PInvoke.EC_RIGHTMARGIN), 76PInvoke.SendDlgItemMessage( 78(int)PInvoke.COLOR_LUM, 80(WPARAM)(PInvoke.EC_LEFTMARGIN | PInvoke.EC_RIGHTMARGIN), 82PInvoke.SendDlgItemMessage( 84(int)PInvoke.COLOR_RED, 86(WPARAM)(PInvoke.EC_LEFTMARGIN | PInvoke.EC_RIGHTMARGIN), 88PInvoke.SendDlgItemMessage( 90(int)PInvoke.COLOR_GREEN, 92(WPARAM)(PInvoke.EC_LEFTMARGIN | PInvoke.EC_RIGHTMARGIN), 94PInvoke.SendDlgItemMessage( 96(int)PInvoke.COLOR_BLUE, 98(WPARAM)(PInvoke.EC_LEFTMARGIN | PInvoke.EC_RIGHTMARGIN), 100HWND hwndCtl = PInvoke.GetDlgItem((HWND)hwnd, (int)PInvoke.COLOR_MIX); 101PInvoke.EnableWindow(hwndCtl, false); 102PInvoke.SetWindowPos( 107hwndCtl = PInvoke.GetDlgItem((HWND)hwnd, (int)MESSAGEBOX_RESULT.IDOK); 108PInvoke.EnableWindow(hwndCtl, false); 109PInvoke.SetWindowPos( 118if (PARAM.LOWORD(wParam) == (int)PInvoke.COLOR_ADD) 121byte red = (byte)PInvoke.GetDlgItemInt((HWND)hwnd, (int)PInvoke.COLOR_RED, &success, false); 124byte green = (byte)PInvoke.GetDlgItemInt((HWND)hwnd, (int)PInvoke.COLOR_GREEN, &success, false); 127byte 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)
38HWND hwndFocus = PInvoke.GetFocus(); 50PInvoke.SetFocus(hwndFocus);
System\Drawing\Design\IconEditor.cs (2)
73HWND hwndFocus = PInvoke.GetFocus(); 86PInvoke.SetFocus(hwndFocus);
System\Drawing\Design\ImageEditor.cs (2)
102HWND hwndFocus = PInvoke.GetFocus(); 115PInvoke.SetFocus(hwndFocus);
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.cs (6)
210PInvoke.GetCursorPos(out Point point); 246PInvoke.GetCursorPos(out Point point); 295PInvoke.GetUpdateRgn(m.HWND, hrgn, true); 300PInvoke.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( 93if (_isHooked && nCode == PInvoke.HC_ACTION && lparam != 0) 125return PInvoke.CallNextHookEx(_mouseHookHandle, nCode, wparam, lparam); 134if (!PInvoke.UnhookWindowsHookEx(_mouseHookHandle)) 163|| (hwnd != adornerWindow.DesignerFrame.Handle && PInvoke.IsChild(adornerWindow.DesignerFrame, hwnd))) 185_lastLButtonDownTimeStamp = PInvoke.GetMessageTime(); 189int lButtonDoubleClickTimeStamp = PInvoke.GetMessageTime();
System\Windows\Forms\Design\Behavior\BehaviorService.cs (6)
51private static MessageId WM_GETALLSNAPLINES { get; } = PInvoke.RegisterWindowMessage("WM_GETALLSNAPLINES"); 52private static MessageId WM_GETRECENTSNAPLINES { get; } = PInvoke.RegisterWindowMessage("WM_GETRECENTSNAPLINES"); 456if (uiService?.GetDialogOwnerWindow() is { } hWnd && hWnd.Handle != 0 && hWnd.Handle != PInvoke.GetActiveWindow()) 458PInvoke.SetActiveWindow(new HandleRef<HWND>(hWnd, (HWND)hWnd.Handle)); 587cursor = new Cursor(PInvoke.GetCursor()); 711PInvoke.TrackMouseEvent(ref _trackMouseEvent);
System\Windows\Forms\Design\Behavior\ResizeBehavior.cs (2)
483PInvoke.ClientToScreen(_behaviorService.AdornerWindowControl, ref mouseLocAbs); 548PInvoke.ClientToScreen(_behaviorService.AdornerWindowControl, ref _lastMouseAbs);
System\Windows\Forms\Design\CommandSet.cs (3)
683PInvoke.GetCursorPos(out Point p); 684HWND hwnd = PInvoke.WindowFromPoint(p); 687PInvokeCore.SendMessage(hwnd, PInvokeCore.WM_SETCURSOR, hwnd, (nint)PInvoke.HTCLIENT);
System\Windows\Forms\Design\ComponentTray.cs (5)
247PInvoke.NotifyWinEvent( 251(int)PInvoke.CHILDID_SELF); 262PInvoke.NotifyWinEvent( 266(int)PInvoke.CHILDID_SELF); 2147_ctrlSelect = PInvoke.GetKeyState((int)Keys.ControlKey) != 0;
System\Windows\Forms\Design\ControlDesigner.cs (8)
2067PInvoke.GetUpdateRgn(m.HWND, hrgn, false); 2068PInvoke.GetUpdateRect(m.HWND, &clip, false); 2349uint elapsed = PInvoke.GetTickCount() - _lastClickMessageTime; 2366_lastClickMessageTime = PInvoke.GetTickCount(); 2437HookChildHandles(PInvoke.GetWindow(hwndChild, GET_WINDOW_CMD.GW_CHILD)); 2440hwndChild = PInvoke.GetWindow(hwndChild, GET_WINDOW_CMD.GW_HWNDNEXT); 2456s_currentProcessId = PInvoke.GetCurrentProcessId(); 2475HookChildHandles(PInvoke.GetWindow(Control, GET_WINDOW_CMD.GW_CHILD));
System\Windows\Forms\Design\DesignerFrame.cs (6)
88PInvoke.RedrawWindow(_designer, lprcUpdate: null, HRGN.Null, REDRAW_WINDOW_FLAGS.RDW_FRAME); 118PInvoke.NotifyWinEvent( 122(int)PInvoke.CHILDID_SELF); 403PInvoke.SetParent(control, this); 404PInvoke.SetWindowPos( 513PInvoke.SetWindowPos(
System\Windows\Forms\Design\DesignerUtils.cs (17)
158int lastXY = (int)PInvoke.GetMessagePos(); 255PInvoke.RoundRect(hDC, bounds.Left, bounds.Top, bounds.Right, bounds.Bottom, 2, 2); 284PInvoke.RoundRect( 447(LPARAM)(uint)(PInvoke.PRF_CHILDREN | PInvoke.PRF_CLIENT | PInvoke.PRF_ERASEBKGND | PInvoke.PRF_NONCLIENT)); 535PInvoke.GetTextMetrics(dc, &metrics); 822=> (uint)PInvokeCore.SendMessage(handle, PInvoke.TVM_GETEXTENDEDSTYLE); 835PInvoke.SetWindowTheme(hwnd, "Explorer", pszSubIdList: null); 837exstyle |= PInvoke.TVS_EX_DOUBLEBUFFER | PInvoke.TVS_EX_FADEINOUTEXPANDOS; 838PInvokeCore.SendMessage(treeView, PInvoke.TVM_SETEXTENDEDSTYLE, 0, (nint)exstyle); 850PInvoke.SetWindowTheme(hwnd, "Explorer", null); 853PInvoke.LVM_SETEXTENDEDLISTVIEWSTYLE, 854(WPARAM)PInvoke.LVS_EX_DOUBLEBUFFER, 855(LPARAM)PInvoke.LVS_EX_DOUBLEBUFFER);
System\Windows\Forms\Design\DocumentDesigner.AxToolboxItem.cs (1)
307HRESULT hr = PInvoke.LoadTypeLib(inprocServer, &pTLB);
System\Windows\Forms\Design\DocumentDesigner.cs (9)
1052PInvoke.RedrawWindow(control, lprcUpdate: null, HRGN.Null, REDRAW_WINDOW_FLAGS.RDW_FRAME); 1083PInvoke.NotifyWinEvent( 1087(int)PInvoke.CHILDID_SELF); 1091PInvoke.NotifyWinEvent( 1095(int)PInvoke.CHILDID_SELF); 1118PInvoke.NotifyWinEvent( 1122(int)PInvoke.CHILDID_SELF); 1128PInvoke.NotifyWinEvent( 1132(int)PInvoke.CHILDID_SELF);
System\Windows\Forms\Design\FolderNameEditor.FolderBrowser.cs (3)
53uint mergedOptions = (uint)Style | PInvoke.BIF_NEWDIALOGSTYLE; 54if ((mergedOptions & (int)PInvoke.BIF_NEWDIALOGSTYLE) != 0) 63owner is not null ? (HWND)owner.Handle : PInvoke.GetActiveWindow(),
System\Windows\Forms\Design\FolderNameEditor.FolderBrowserFolder.cs (12)
17Desktop = (int)PInvoke.CSIDL_DESKTOP, 18Favorites = (int)PInvoke.CSIDL_FAVORITES, 19MyComputer = (int)PInvoke.CSIDL_DRIVES, 20MyDocuments = (int)PInvoke.CSIDL_PERSONAL, 21MyPictures = (int)PInvoke.CSIDL_MYPICTURES, 22NetAndDialUpConnections = (int)PInvoke.CSIDL_CONNECTIONS, 23NetworkNeighborhood = (int)PInvoke.CSIDL_NETWORK, 24Printers = (int)PInvoke.CSIDL_PRINTERS, 25Recent = (int)PInvoke.CSIDL_RECENT, 26SendTo = (int)PInvoke.CSIDL_SENDTO, 27StartMenu = (int)PInvoke.CSIDL_STARTMENU, 28Templates = (int)PInvoke.CSIDL_TEMPLATES
System\Windows\Forms\Design\FolderNameEditor.FolderBrowserStyles.cs (7)
11BrowseForComputer = (int)PInvoke.BIF_BROWSEFORCOMPUTER, 12BrowseForEverything = (int)PInvoke.BIF_BROWSEINCLUDEFILES, 13BrowseForPrinter = (int)PInvoke.BIF_BROWSEFORPRINTER, 14RestrictToDomain = (int)PInvoke.BIF_DONTGOBELOWDOMAIN, 15RestrictToFilesystem = (int)PInvoke.BIF_RETURNONLYFSDIRS, 16RestrictToSubfolders = (int)PInvoke.BIF_RETURNFSANCESTORS, 17ShowTextBox = (int)PInvoke.BIF_EDITBOX
System\Windows\Forms\Design\FormDocumentDesigner.cs (2)
401PInvoke.RedrawWindow(control, lprcUpdate: null, HRGN.Null, REDRAW_WINDOW_FLAGS.RDW_FRAME); 413PInvoke.RedrawWindow(control, lprcUpdate: null, HRGN.Null, REDRAW_WINDOW_FLAGS.RDW_FRAME);
System\Windows\Forms\Design\GroupBoxDesigner.cs (2)
113if (m.ResultInternal == PInvoke.HTTRANSPARENT) 115m.ResultInternal = (LRESULT)(nint)PInvoke.HTCLIENT;
System\Windows\Forms\Design\ImageListImageEditor.cs (2)
67HWND hwndFocus = PInvoke.GetFocus(); 85PInvoke.SetFocus(hwndFocus);
System\Windows\Forms\Design\ListBoxDesigner.cs (2)
186PInvokeCore.SendMessage(listBox, PInvoke.LB_RESETCONTENT); 187PInvokeCore.SendMessage(listBox, PInvoke.LB_ADDSTRING, 0, name);
System\Windows\Forms\Design\ListViewDesigner.cs (4)
77HWND hwndHit = PInvoke.ChildWindowFromPointEx(listView, listViewPoint, CWP_FLAGS.CWP_SKIPINVISIBLE); 81HWND headerHwnd = (HWND)PInvokeCore.SendMessage(listView, PInvoke.LVM_GETHEADER); 86PInvokeCore.SendMessage(headerHwnd, PInvoke.HDM_HITTEST, 0, ref _hdrhit); 138if (nmhdr->code == PInvoke.HDN_ENDTRACKW)
System\Windows\Forms\Design\OleDragDropHandler.cs (2)
493PInvoke.TranslateMessage(msg); 494PInvoke.DispatchMessage(&msg);
System\Windows\Forms\Design\PbrsForward.cs (1)
94? PInvoke.GetFocus()
System\Windows\Forms\Design\ScrollableControlDesigner.cs (2)
34if (hitTest is ((int)PInvoke.HTVSCROLL) or ((int)PInvoke.HTHSCROLL))
System\Windows\Forms\Design\TabControlDesigner.cs (2)
593if (m.ResultInternal == PInvoke.HTTRANSPARENT) 595m.ResultInternal = (LRESULT)(nint)PInvoke.HTCLIENT;
System\Windows\Forms\Design\ToolStripAdornerWindowService.cs (1)
282m.ResultInternal = (LRESULT)PInvoke.HTTRANSPARENT;
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (1)
325&& !PInvoke.IsChild(_toolStripContainer, associatedControl))
System\Windows\Forms\Design\ToolStripItemDesigner.cs (2)
937PInvoke.NotifyWinEvent( 949PInvoke.NotifyWinEvent(
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (2)
180PInvoke.NotifyWinEvent( 185PInvoke.NotifyWinEvent(
System\Windows\Forms\Design\TreeViewDesigner.cs (1)
54PInvokeCore.SendMessage(Control, PInvoke.TVM_HITTEST, 0, ref _tvhit);
System.Windows.Forms.Primitives (218)
_generated\409\Windows.Win32.PInvoke.ADVAPI32.dll.g.cs (2)
54 winmdroot.Foundation.WIN32_ERROR __result = PInvoke.RegLoadMUIString(hKey, pszValueLocal, pszOutBufLocal, (uint )pszOutBuf.Length, pcbDataLocal, Flags, pszDirectoryLocal); 72 winmdroot.Foundation.WIN32_ERROR __result = PInvoke.RegLoadMUIString(hKey, pszValueLocal, pszOutBufLocal, (uint )pszOutBuf.Length, default(uint* ), Flags, pszDirectoryLocal);
_generated\410\Windows.Win32.PInvoke.api-ms-win-shcore-scaling-l1-1-1.dll.g.cs (1)
33 winmdroot.Foundation.HRESULT __result = PInvoke.GetProcessDpiAwareness(hprocess, valueLocal);
_generated\411\Windows.Win32.PInvoke.COMCTL32.dll.g.cs (6)
191 winmdroot.Foundation.BOOL __result = PInvoke.ImageList_GetIconSize(himl, cxLocal, cyLocal); 201 winmdroot.Foundation.BOOL __result = PInvoke.ImageList_GetIconSize(himl, default(int* ), default(int* )); 250 winmdroot.Foundation.BOOL __result = PInvoke.ImageList_GetImageInfo(himl, i, pImageInfoLocal); 438 winmdroot.Foundation.BOOL __result = PInvoke.InitCommonControlsEx(picceLocal); 469 winmdroot.Foundation.HRESULT __result = PInvoke.TaskDialogIndirect(pTaskConfigLocal, pnButtonLocal, pnRadioButtonLocal, pfVerificationFlagCheckedLocal); 483 winmdroot.Foundation.HRESULT __result = PInvoke.TaskDialogIndirect(pTaskConfigLocal, default(int* ), default(int* ), default(winmdroot.Foundation.BOOL* ));
_generated\413\Windows.Win32.PInvoke.dwmapi.dll.g.cs (2)
32 winmdroot.Foundation.HRESULT __result = PInvoke.DwmGetWindowAttribute(hwnd, dwAttribute, (void* )pvAttributeLocal, (uint )pvAttribute.Length); 64 winmdroot.Foundation.HRESULT __result = PInvoke.DwmSetWindowAttribute(hwnd, dwAttribute, (void* )pvAttributeLocal, (uint )pvAttribute.Length);
_generated\415\Windows.Win32.PInvoke.GDI32.dll.g.cs (22)
33 winmdroot.Graphics.Gdi.HBRUSH __result = PInvoke.CreateBrushIndirect(plbrushLocal); 113 winmdroot.Foundation.BOOL __result = PInvoke.ExtTextOut(hdc, x, y, options, lprect.HasValue ? &lprectLocal : null, lpStringLocal, (uint )lpDx.Length, lpDxLocal); 150 int __result = PInvoke.GetBitmapBits(hbit, lpvBits.Length, (void* )lpvBitsLocal); 206 winmdroot.Foundation.BOOL __result = PInvoke.GetBrushOrgEx(hdc, lpptLocal); 232 winmdroot.Graphics.Gdi.GDI_REGION_TYPE __result = PInvoke.GetClipBox(hdc, lprectLocal); 284 int __result = PInvoke.GetDIBits(hdc, hbm, start, cLines, default(void* ), lpbmi, usage); 343 winmdroot.Graphics.Gdi.GDI_REGION_TYPE __result = PInvoke.GetRgnBox(hrgn, lprcLocal); 382 uint __result = PInvoke.GetSystemPaletteEntries(hdc, iStart, (uint )pPalEntries.Length, pPalEntriesLocal); 434 winmdroot.Foundation.BOOL __result = PInvoke.GetTextExtentPoint32W(hdc, lpStringLocal, c, psizlLocal); 464 winmdroot.Foundation.BOOL __result = PInvoke.GetTextMetrics(hdc, lptmLocal); 487 winmdroot.Foundation.BOOL __result = PInvoke.GetViewportExtEx(hdc, lpsizeLocal); 544 winmdroot.Foundation.BOOL __result = PInvoke.LPtoDP(hdc, lpptLocal, lppt.Length); 571 winmdroot.Foundation.BOOL __result = PInvoke.MoveToEx(hdc, x, y, lpptLocal); 580 winmdroot.Foundation.BOOL __result = PInvoke.MoveToEx(hdc, x, y, default(global::System.Drawing.Point* )); 638 winmdroot.Foundation.BOOL __result = PInvoke.SetViewportExtEx(hdc, x, y, lpszLocal); 647 winmdroot.Foundation.BOOL __result = PInvoke.SetViewportExtEx(hdc, x, y, default(winmdroot.Foundation.SIZE* )); 675 winmdroot.Foundation.BOOL __result = PInvoke.SetViewportOrgEx(hdc, x, y, lpptLocal); 684 winmdroot.Foundation.BOOL __result = PInvoke.SetViewportOrgEx(hdc, x, y, default(global::System.Drawing.Point* )); 713 winmdroot.Foundation.BOOL __result = PInvoke.SetWindowExtEx(hdc, x, y, lpszLocal); 722 winmdroot.Foundation.BOOL __result = PInvoke.SetWindowExtEx(hdc, x, y, default(winmdroot.Foundation.SIZE* )); 750 winmdroot.Foundation.BOOL __result = PInvoke.SetWindowOrgEx(hdc, x, y, lpptLocal); 759 winmdroot.Foundation.BOOL __result = PInvoke.SetWindowOrgEx(hdc, x, y, default(global::System.Drawing.Point* ));
_generated\416\Windows.Win32.PInvoke.hhctrl.ocx.g.cs (1)
32 winmdroot.Foundation.HWND __result = PInvoke.HtmlHelp(hwndCaller, pszFileLocal, uCommand, dwData);
_generated\417\Windows.Win32.PInvoke.IMM32.dll.g.cs (2)
68 winmdroot.Foundation.BOOL __result = PInvoke.ImmGetConversionStatus(param0, lpfdwConversionLocal, lpfdwSentenceLocal); 78 winmdroot.Foundation.BOOL __result = PInvoke.ImmGetConversionStatus(param0, default(winmdroot.UI.Input.Ime.IME_CONVERSION_MODE* ), default(winmdroot.UI.Input.Ime.IME_SENTENCE_MODE* ));
_generated\418\Windows.Win32.PInvoke.KERNEL32.dll.g.cs (15)
34 winmdroot.Foundation.BOOL __result = PInvoke.ActivateActCtx(hActCtx, lpCookieLocal); 45 winmdroot.Foundation.BOOL __result = PInvoke.ActivateActCtx(default(winmdroot.Foundation.HANDLE ), lpCookieLocal); 104 winmdroot.Foundation.HANDLE __result = PInvoke.CreateActCtx(pActCtxLocal); 168 winmdroot.Foundation.BOOL __result = PInvoke.DuplicateHandle(hSourceProcessHandle, hSourceHandle, hTargetProcessHandle, lpTargetHandleLocal, dwDesiredAccess, bInheritHandle, dwOptions); 226 uint __result = PInvoke.FormatMessage(dwFlags, lpSource, dwMessageId, dwLanguageId, lpBufferLocal, nSize, ArgumentsLocal); 290 winmdroot.Foundation.BOOL __result = PInvoke.GetCurrentActCtx(lphActCtxLocal); 350 winmdroot.Foundation.BOOL __result = PInvoke.GetExitCodeThread(hThread, lpExitCodeLocal); 389 int __result = PInvoke.GetLocaleInfoEx(lpLocaleNameLocal, LCType, lpLCDataLocal, lpLCData.Length); 435 uint __result = PInvoke.GetModuleFileName(hModule, lpFilenameLocal, (uint )lpFilename.Length); 476 winmdroot.Foundation.HMODULE __result = PInvoke.GetModuleHandle(lpModuleNameLocal); 513 winmdroot.Foundation.FARPROC __result = PInvoke.GetProcAddress(hModule, new winmdroot.Foundation.PCSTR (lpProcNameLocal)); 553 uint __result = PInvoke.GetShortPathName(lpszLongPathLocal, lpszShortPathLocal, (uint )lpszShortPath.Length); 599 PInvoke.GetStartupInfo(lpStartupInfoLocal); 620 winmdroot.Foundation.BOOL __result = PInvoke.GetSystemPowerStatus(lpSystemPowerStatusLocal); 665 winmdroot.Foundation.HMODULE __result = PInvoke.LoadLibraryEx(lpLibFileNameLocal, default, dwFlags);
_generated\419\Windows.Win32.PInvoke.OLE32.dll.g.cs (6)
37 winmdroot.Foundation.HRESULT __result = PInvoke.CoGetClassObject(rclsidLocal, dwClsContext, pvReserved, riidLocal, ppvLocal); 76 winmdroot.Foundation.HRESULT __result = PInvoke.CoRegisterMessageFilter(lpMessageFilter, default(winmdroot.Media.Audio.IMessageFilter** )); 124 winmdroot.Foundation.HRESULT __result = PInvoke.GetHGlobalFromILockBytes(plkbyt, phglobalLocal); 153 winmdroot.Foundation.BOOL __result = PInvoke.IsAccelerator(hAccel, cAccelEntries, lpMsgLocal, lpwCmdLocal); 180 winmdroot.Foundation.HRESULT __result = PInvoke.ReadClassStg(pStg, pclsidLocal); 231 winmdroot.Foundation.HRESULT __result = PInvoke.StgOpenStorageOnILockBytes(plkbyt, pstgPriority, grfMode, snbExcludeLocal, default, ppstgOpen);
_generated\420\Windows.Win32.PInvoke.OLEACC.dll.g.cs (2)
35 winmdroot.Foundation.HRESULT __result = PInvoke.CreateStdAccessibleObject(hwnd, idObject, riidLocal, ppvObjectLocal); 76 winmdroot.Foundation.LRESULT __result = PInvoke.LresultFromObject(riidLocal, wParam, punk);
_generated\421\Windows.Win32.PInvoke.OLEAUT32.dll.g.cs (5)
46 winmdroot.Foundation.HRESULT __result = PInvoke.LoadTypeLib(szFileLocal, pptlib); 77 winmdroot.Foundation.HRESULT __result = PInvoke.OleCreateFontIndirect(lpFontDescLocal, riidLocal, lplpvObjLocal); 107 winmdroot.Foundation.HRESULT __result = PInvoke.OleCreatePropertyFrame(hwndOwner, x, y, lpszCaptionLocal, cObjects, ppUnk, cPages, pPageClsIDLocal, lcid, default, default); 144 winmdroot.Foundation.HRESULT __result = PInvoke.OleCreatePropertyFrameIndirect(lpParamsLocal); 172 winmdroot.Foundation.HRESULT __result = PInvoke.VarFormat(pvarInLocal, pstrFormat, iFirstDay, iFirstWeek, dwFlags, pbstrOutLocal);
_generated\423\Windows.Win32.PInvoke.SHELL32.dll.g.cs (10)
37 winmdroot.Foundation.HINSTANCE __result = PInvoke.FindExecutable(lpFileLocal, lpDirectoryLocal, lpResultLocal); 79 winmdroot.UI.Shell.Common.ITEMIDLIST* __result = PInvoke.SHBrowseForFolder(lpbiLocal); 114 winmdroot.Foundation.HRESULT __result = PInvoke.SHCreateItemFromParsingName(pszPathLocal, pbc, riidLocal, ppvLocal); 156 winmdroot.Foundation.HRESULT __result = PInvoke.SHCreateShellItem(pidlParent.HasValue ? &pidlParentLocal : null, psfParent, pidlLocal, ppsi); 204 winmdroot.Foundation.HINSTANCE __result = PInvoke.ShellExecute(hwnd, lpOperationLocal, lpFileLocal, lpParametersLocal, lpDirectoryLocal, nShowCmd); 260 winmdroot.Foundation.HRESULT __result = PInvoke.SHGetKnownFolderPath(rfidLocal, dwFlags, hToken, ppszPathLocal); 307 winmdroot.Foundation.BOOL __result = PInvoke.SHGetPathFromIDListEx(pidlLocal, pszPathLocal, (uint )pszPath.Length, uOpts); 348 winmdroot.Foundation.HRESULT __result = PInvoke.SHGetSpecialFolderLocation(default, csidl, ppidlLocal); 387 winmdroot.Foundation.HRESULT __result = PInvoke.SHParseDisplayName(pszNameLocal, pbc, ppidlLocal, sfgaoIn, psfgaoOutLocal); 402 winmdroot.Foundation.HRESULT __result = PInvoke.SHParseDisplayName(pszNameLocal, pbc, ppidlLocal, sfgaoIn, default(uint* ));
_generated\425\Windows.Win32.PInvoke.UIAutomationCore.dll.g.cs (1)
149 winmdroot.Foundation.HRESULT __result = PInvoke.UiaRaiseStructureChangedEvent(pProvider, structureChangeType, pRuntimeIdLocal, cRuntimeIdLen);
_generated\426\Windows.Win32.PInvoke.USER32.dll.g.cs (58)
83 winmdroot.Foundation.BOOL __result = PInvoke.AdjustWindowRectEx(lpRectLocal, dwStyle, bMenu, dwExStyle); 131 winmdroot.Foundation.BOOL __result = PInvoke.AdjustWindowRectExForDpi(lpRectLocal, dwStyle, bMenu, dwExStyle, dpi); 298 winmdroot.Foundation.BOOL __result = PInvoke.ClientToScreen(hWnd, lpPointLocal); 323 winmdroot.Foundation.BOOL __result = PInvoke.ClipCursor(lpRect.HasValue ? &lpRectLocal : null); 396 winmdroot.UI.WindowsAndMessaging.HACCEL __result = PInvoke.CreateAcceleratorTable(paccelLocal, paccel.Length); 476 winmdroot.Foundation.HWND __result = PInvoke.CreateWindowEx(dwExStyle, lpClassNameLocal, lpWindowNameLocal, dwStyle, X, Y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); 720 winmdroot.Foundation.LRESULT __result = PInvoke.DispatchMessage(lpMsgLocal); 748 winmdroot.Foundation.BOOL __result = PInvoke.DrawEdge(hdc, qrcLocal, edge, grfFlags); 779 winmdroot.Foundation.BOOL __result = PInvoke.DrawFrameControl(hdc, lprcLocal, uType, uState); 826 int __result = PInvoke.DrawText(hdc, lpchText, cchText, lprcLocal, format); 864 int __result = PInvoke.DrawTextEx(hdc, wstrlpchText, cchText, lprcLocal, format, lpdtp.HasValue ? &lpdtpLocal : null); 1017 winmdroot.Foundation.BOOL __result = PInvoke.EnumDisplaySettings(lpszDeviceNameLocal, iModeNum, lpDevModeLocal); 1053 int __result = PInvoke.FillRect(hDC, lprcLocal, hbr); 1084 winmdroot.Foundation.HWND __result = PInvoke.FindWindow(lpClassNameLocal, lpWindowNameLocal); 1208 winmdroot.Foundation.BOOL __result = PInvoke.GetCaretPos(lpPointLocal); 1247 winmdroot.Foundation.BOOL __result = PInvoke.GetClassInfo(hInstance, lpClassNameLocal, lpWndClassLocal); 1291 int __result = PInvoke.GetClassName(hWnd, lpClassNameLocal, lpClassName.Length); 1335 winmdroot.Foundation.BOOL __result = PInvoke.GetClipCursor(lpRectLocal); 1371 winmdroot.Foundation.BOOL __result = PInvoke.GetComboBoxInfo(hwndCombo, pcbiLocal); 1419 winmdroot.Foundation.BOOL __result = PInvoke.GetCursorPos(lpPointLocal); 1480 uint __result = PInvoke.GetDlgItemInt(hDlg, nIDDlgItem, lpTranslatedLocal, bSigned); 1489 uint __result = PInvoke.GetDlgItemInt(hDlg, nIDDlgItem, default(winmdroot.Foundation.BOOL* ), bSigned); 1596 int __result = PInvoke.GetKeyboardLayoutList(lpList.Length, lpListLocal); 1637 winmdroot.Foundation.BOOL __result = PInvoke.GetKeyboardState(lpKeyStateLocal); 1727 winmdroot.Foundation.BOOL __result = PInvoke.GetMenuItemInfo(hmenu, item, fByPosition, lpmiiLocal); 1775 winmdroot.Foundation.BOOL __result = PInvoke.GetMessage(lpMsgLocal, hWnd, wMsgFilterMin, wMsgFilterMax); 1876 winmdroot.Foundation.BOOL __result = PInvoke.GetPhysicalCursorPos(lpPointLocal); 1954 winmdroot.Foundation.BOOL __result = PInvoke.GetScrollBarInfo(hwnd, idObject, psbiLocal); 1992 winmdroot.Foundation.BOOL __result = PInvoke.GetScrollInfo(hwnd, nBar, lpsiLocal); 2088 winmdroot.Foundation.BOOL __result = PInvoke.GetUpdateRect(hWnd, lpRectLocal, bErase); 2097 winmdroot.Foundation.BOOL __result = PInvoke.GetUpdateRect(hWnd, default(winmdroot.Foundation.RECT* ), bErase); 2141 winmdroot.Foundation.BOOL __result = PInvoke.GetUserObjectInformation(hObj, nIndex, (void* )pvInfoLocal, (uint )pvInfo.Length, lpnLengthNeededLocal); 2153 winmdroot.Foundation.BOOL __result = PInvoke.GetUserObjectInformation(hObj, nIndex, (void* )pvInfoLocal, (uint )pvInfo.Length, default(uint* )); 2215 winmdroot.Foundation.BOOL __result = PInvoke.GetWindowDisplayAffinity(hWnd, pdwAffinityLocal); 2267 winmdroot.Foundation.BOOL __result = PInvoke.GetWindowPlacement(hWnd, lpwndplLocal); 2345 winmdroot.Foundation.BOOL __result = PInvoke.InvalidateRect(hWnd, lpRect.HasValue ? &lpRectLocal : null, bErase); 2403 winmdroot.Foundation.BOOL __result = PInvoke.IsDialogMessage(hDlg, lpMsgLocal); 2556 winmdroot.UI.WindowsAndMessaging.HCURSOR __result = PInvoke.LoadCursor(hInstance, lpCursorNameLocal); 2643 winmdroot.UI.WindowsAndMessaging.MESSAGEBOX_RESULT __result = PInvoke.MessageBox(hWnd, lpTextLocal, lpCaptionLocal, uType); 2693 winmdroot.Foundation.WAIT_EVENT __result = PInvoke.MsgWaitForMultipleObjectsEx((uint )pHandles.Length, pHandlesLocal, dwMilliseconds, dwWakeMask, dwFlags); 2857 winmdroot.Foundation.BOOL __result = PInvoke.RedrawWindow(hWnd, lprcUpdate.HasValue ? &lprcUpdateLocal : null, hrgnUpdate, flags); 2885 ushort __result = PInvoke.RegisterClass(lpWndClassLocal); 2921 uint __result = PInvoke.RegisterWindowMessage(lpStringLocal); 2988 winmdroot.Foundation.BOOL __result = PInvoke.ScreenToClient(hWnd, lpPointLocal); 3014 winmdroot.Foundation.BOOL __result = PInvoke.ScrollWindow(hWnd, XAmount, YAmount, lpRect.HasValue ? &lpRectLocal : null, lpClipRect.HasValue ? &lpClipRectLocal : null); 3067 int __result = PInvoke.ScrollWindowEx(hWnd, dx, dy, prcScroll.HasValue ? &prcScrollLocal : null, prcClip.HasValue ? &prcClipLocal : null, hrgnUpdate, prcUpdateLocal, flags); 3078 int __result = PInvoke.ScrollWindowEx(hWnd, dx, dy, prcScroll.HasValue ? &prcScrollLocal : null, prcClip.HasValue ? &prcClipLocal : null, hrgnUpdate, default(winmdroot.Foundation.RECT* ), flags); 3169 uint __result = PInvoke.SendInput((uint )pInputs.Length, pInputsLocal, cbSize); 3259 winmdroot.Foundation.LRESULT __result = PInvoke.SendMessageTimeout(hWnd, Msg, wParam, lParam, fuFlags, uTimeout, lpdwResultLocal); 3268 winmdroot.Foundation.LRESULT __result = PInvoke.SendMessageTimeout(hWnd, Msg, wParam, lParam, fuFlags, uTimeout, default(nuint* )); 3450 winmdroot.Foundation.BOOL __result = PInvoke.SetKeyboardState(lpKeyStateLocal); 3604 int __result = PInvoke.SetScrollInfo(hwnd, nBar, lpsiLocal, redraw); 3758 winmdroot.Foundation.BOOL __result = PInvoke.SetWindowPlacement(hWnd, lpwndplLocal); 3900 winmdroot.Foundation.BOOL __result = PInvoke.SetWindowText(hWnd, lpStringLocal); 4059 winmdroot.Foundation.BOOL __result = PInvoke.TrackMouseEvent(lpEventTrackLocal); 4096 winmdroot.Foundation.BOOL __result = PInvoke.TranslateMDISysAccel(hWndClient, lpMsgLocal); 4127 winmdroot.Foundation.BOOL __result = PInvoke.TranslateMessage(lpMsgLocal); 4167 winmdroot.Foundation.BOOL __result = PInvoke.ValidateRect(hWnd, lpRect.HasValue ? &lpRectLocal : null);
_generated\427\Windows.Win32.PInvoke.UXTHEME.dll.g.cs (26)
47 winmdroot.Foundation.HRESULT __result = PInvoke.DrawThemeBackground(hTheme, hdc, iPartId, iStateId, pRectLocal, pClipRect.HasValue ? &pClipRectLocal : null); 94 winmdroot.Foundation.HRESULT __result = PInvoke.DrawThemeEdge(hTheme, hdc, iPartId, iStateId, pDestRectLocal, uEdge, uFlags, pContentRectLocal); 106 winmdroot.Foundation.HRESULT __result = PInvoke.DrawThemeEdge(hTheme, hdc, iPartId, iStateId, pDestRectLocal, uEdge, uFlags, default(winmdroot.Foundation.RECT* )); 158 winmdroot.Foundation.HRESULT __result = PInvoke.DrawThemeParentBackground(hwnd, hdc, prc.HasValue ? &prcLocal : null); 194 winmdroot.Foundation.HRESULT __result = PInvoke.DrawThemeText(hTheme, hdc, iPartId, iStateId, pszTextLocal, cchText, dwTextFlags, dwTextFlags2, pRectLocal); 255 winmdroot.Foundation.HRESULT __result = PInvoke.GetCurrentThemeName(pszThemeFileNameLocal, pszThemeFileName.Length, pszColorBuffLocal, pszColorBuff.Length, pszSizeBuffLocal, pszSizeBuff.Length); 319 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeBackgroundContentRect(hTheme, hdc, iPartId, iStateId, pBoundingRectLocal, pContentRectLocal); 367 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeBackgroundExtent(hTheme, hdc, iPartId, iStateId, pContentRectLocal, pExtentRectLocal); 415 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeBackgroundRegion(hTheme, hdc, iPartId, iStateId, pRectLocal, pRegionLocal); 461 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeBool(hTheme, iPartId, iStateId, iPropId, pfValLocal); 507 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeColor(hTheme, iPartId, iStateId, iPropId, pColorLocal); 559 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeDocumentationProperty(pszThemeNameLocal, pszPropertyNameLocal, pszValueBuffLocal, pszValueBuff.Length); 595 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeEnumValue(hTheme, iPartId, iStateId, iPropId, piValLocal); 643 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeFilename(hTheme, iPartId, iStateId, iPropId, pszThemeFileNameLocal, pszThemeFileName.Length); 696 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeFont(hTheme, hdc, iPartId, iStateId, iPropId, pFontLocal); 744 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeInt(hTheme, iPartId, iStateId, iPropId, piValLocal); 794 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeMargins(hTheme, hdc, iPartId, iStateId, iPropId, prc.HasValue ? &prcLocal : null, pMarginsLocal); 852 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemePartSize(hTheme, hdc, iPartId, iStateId, prc.HasValue ? &prcLocal : null, eSize, pszLocal); 899 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemePosition(hTheme, iPartId, iStateId, iPropId, pPointLocal); 945 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeString(hTheme, iPartId, iStateId, iPropId, pszBuffLocal, pszBuff.Length); 1016 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeSysInt(hTheme, iIntId, piValueLocal); 1061 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeTextExtent(hTheme, hdc, iPartId, iStateId, pszTextLocal, cchCharCount, dwTextFlags, pBoundingRect.HasValue ? &pBoundingRectLocal : null, pExtentRectLocal); 1121 winmdroot.Foundation.HRESULT __result = PInvoke.GetThemeTextMetrics(hTheme, hdc, iPartId, iStateId, ptmLocal); 1166 winmdroot.Foundation.HRESULT __result = PInvoke.HitTestThemeBackground(hTheme, hdc, iPartId, iStateId, dwOptions, pRectLocal, hrgn, ptTest, pwHitTestCodeLocal); 1287 winmdroot.UI.Controls.HTHEME __result = PInvoke.OpenThemeData(hwnd, pszClassListLocal); 1332 winmdroot.Foundation.HRESULT __result = PInvoke.SetWindowTheme(hwnd, pszSubAppNameLocal, pszSubIdListLocal);
_generated\428\Windows.Win32.PInvoke.winspool.drv.g.cs (2)
54 int __result = PInvoke.DocumentProperties(hWnd, hPrinter, pDeviceName, pDevModeOutputLocal, pDevModeInput.HasValue ? &pDevModeInputLocal : null, fMode); 63 int __result = PInvoke.DocumentProperties(hWnd, hPrinter, pDeviceName, default(winmdroot.Graphics.Gdi.DEVMODEW* ), pDevModeInput.HasValue ? &pDevModeInputLocal : null, fMode);
Interop\Richedit\Interop.PARAFORMAT.cs (1)
22public fixed int rgxTabs[(int)PInvoke.MAX_TAB_STOPS];
Microsoft\VisualStudio\Shell\IVsPerPropertyBrowsing.cs (1)
183/// <see cref="ITypeInfo.GetDocumentation(int, BSTR*, BSTR*, uint*, BSTR*)"/> with <see cref="PInvoke.MEMBERID_NIL"/>.
System\Windows\Forms\AccessibilityExtensions.cs (2)
11/// <inheritdoc cref="PInvoke.LresultFromObject(Guid*, WPARAM, IUnknown*)"/> 18return PInvoke.LresultFromObject(
System\Windows\Forms\Automation\UiaTextProvider.cs (1)
125return (int)PInvoke.SendInput(1, i, sizeof(INPUT));
System\Windows\Forms\Automation\UiaTextRange.cs (5)
362PInvoke.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 916PInvoke.UiaGetReservedNotSupportedValue(&unknown).ThrowOnFailure();
System\Windows\Forms\DeviceContextExtensions.cs (8)
47PInvoke.FillRect( 92PInvoke.MoveToEx(hdc, lines[i], lines[i + 1], &oldPoint); 93PInvoke.LineTo(hdc, lines[i + 2], lines[i + 3]); 94PInvoke.MoveToEx(hdc, oldPoint.X, oldPoint.Y, lppt: null); 101/// Calls <see cref="PInvoke.GetNearestColor(HDC, COLORREF)"/> to get the nearest color for the given 119Color newColor = ColorTranslator.FromWin32((int)PInvoke.GetNearestColor(hdc, (COLORREF)(uint)ColorTranslator.ToWin32(color)).Value); 146PInvoke.Ellipse(hdc, left, top, right, bottom); 156PInvoke.FillRect(
System\Windows\Forms\FileDialogCustomPlace.cs (2)
70int result = PInvoke.SHGetKnownFolderPath(reference, 0, HANDLE.Null, (PWSTR*)path); 78return PInvoke.SHCreateShellItem(filePathString);
System\Windows\Forms\Internals\ScaleHelper.cs (15)
77return (int)PInvoke.GetDpiForSystem(); 87HRESULT result = PInvoke.GetProcessDpiAwareness( 115DPI_AWARENESS_CONTEXT dpiAwareness = PInvoke.GetThreadDpiAwarenessContextInternal(); 356PInvoke.GetSystemMetricsForDpi(SYSTEM_METRICS_INDEX.SM_CXSMICON, OneHundredPercentLogicalDpi), 357PInvoke.GetSystemMetricsForDpi(SYSTEM_METRICS_INDEX.SM_CXSMICON, OneHundredPercentLogicalDpi)) 418DPI_AWARENESS_CONTEXT dpiAwareness = PInvoke.GetThreadDpiAwarenessContextInternal(); 447PInvoke.GetProcessDpiAwareness(HANDLE.Null, out PROCESS_DPI_AWARENESS processDpiAwareness); 461return PInvoke.IsProcessDPIAware() ? HighDpiMode.SystemAware : HighDpiMode.DpiUnaware; 474int width = PInvoke.GetCurrentSystemMetrics(SYSTEM_METRICS_INDEX.SM_CXSMICON, (uint)dpi); 475int height = PInvoke.GetCurrentSystemMetrics(SYSTEM_METRICS_INDEX.SM_CYSMICON, (uint)dpi); 496PInvoke.IsValidDpiAwarenessContext(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2) 501PInvoke.IsValidDpiAwarenessContext(DPI_AWARENESS_CONTEXT.DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED) 507success = PInvoke.SetProcessDpiAwarenessContext(dpiAwareness); 519success = PInvoke.SetProcessDpiAwareness(dpiAwareness).Succeeded; 533success = PInvoke.SetProcessDPIAware();
System\Windows\Forms\Internals\ScaleHelper.DpiAwarenessScope.cs (7)
42_originalDpiAwarenessContext = PInvoke.GetThreadDpiAwarenessContext(); 45if (!PInvoke.AreDpiAwarenessContextsEqual(_originalDpiAwarenessContext, context)) 47if (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(&current) && current == s_hActCtx)) 32bool success = PInvoke.ActivateActCtx(s_hActCtx, &cookie); 42bool success = PInvoke.DeactivateActCtx(0, _cookie); 60dwFlags = PInvoke.ACTCTX_FLAG_HMODULE_VALID | PInvoke.ACTCTX_FLAG_RESOURCE_NAME_VALID, 66s_hActCtx = PInvoke.CreateActCtx(act); 106s_hActCtx = PInvoke.CreateActCtx(act);
Windows\Win32\Interop.RegisteredMessage.cs (2)
17s_wmMouseEnterMessage = PInvoke.RegisterWindowMessage("WinFormsMouseEnter"); 30s_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. 24PInvoke.SHGetSpecialFolderLocation(rootFolderCsidl, out ITEMIDLIST* rootFolderId); 27PInvoke.SHGetSpecialFolderLocation((int)Environment.SpecialFolder.Desktop, out rootFolderId); 53ITEMIDLIST* resultId = PInvoke.SHBrowseForFolder(&bi); 64bool success = PInvoke.SHGetPathFromIDListEx(resultId, b, (uint)buffer.Length, GPFIDL_FLAGS.GPFIDL_UNCPRINTER);