7631 references to NativeMethods
System.Windows.Forms (7631)
misc\DpiHelper.cs (2)
108IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 113UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC));
winforms\Managed\System\WinForms\AccessibleObject.cs (104)
78private int accObjId = NativeMethods.OBJID_CLIENT; // Indicates what kind of 'inner' system accessible object we are using 114systemIAccessible.accLocation(out left, out top, out width, out height, NativeMethods.CHILDID_SELF); 118if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 135return systemIAccessible.get_accDefaultAction(NativeMethods.CHILDID_SELF); 140if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 158return systemIAccessible.get_accDescription(NativeMethods.CHILDID_SELF); 161if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 187return systemIAccessible.get_accHelp(NativeMethods.CHILDID_SELF); 190if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 208return systemIAccessible.get_accKeyboardShortcut(NativeMethods.CHILDID_SELF); 211if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 230return systemIAccessible.get_accName(NativeMethods.CHILDID_SELF); 233if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 244systemIAccessible.set_accName(NativeMethods.CHILDID_SELF, value); 247if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 279return (AccessibleRole) systemIAccessible.get_accRole(NativeMethods.CHILDID_SELF); 295return (AccessibleStates) systemIAccessible.get_accState(NativeMethods.CHILDID_SELF); 313return systemIAccessible.get_accValue(NativeMethods.CHILDID_SELF); 316if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 328systemIAccessible.set_accValue(NativeMethods.CHILDID_SELF, value); 331if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 418if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 436int retVal = systemIAccessible.get_accHelpTopic(out fileName, NativeMethods.CHILDID_SELF); 443if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 480if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 514if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 539if (AccessibilityImprovements.Level3 && patternId == NativeMethods.UIA_InvokePatternId) { 569if (AccessibilityImprovements.Level3 && propertyID == NativeMethods.UIA_IsInvokePatternAvailablePropertyId) { 629return NativeMethods.CHILDID_SELF; 913int hr = NativeMethods.E_NOINTERFACE; 923hr = NativeMethods.S_OK; 944return NativeMethods.E_POINTER; 955return NativeMethods.E_NOTIMPL; 1007NativeMethods.UiaRect UnsafeNativeMethods.IRawElementProviderFragment.BoundingRectangle { 1009return new NativeMethods.UiaRect(BoundingRectangle); 1272if (childID.Equals(NativeMethods.CHILDID_SELF)) { 1292if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 1325if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 1361if (childID.Equals(NativeMethods.CHILDID_SELF)) { 1402if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 1432if (childID.Equals(NativeMethods.CHILDID_SELF)) { 1454if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 1481if (childID.Equals(NativeMethods.CHILDID_SELF)) { 1499if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 1523if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 1547if (childID.Equals(NativeMethods.CHILDID_SELF)) { 1614if (childID.Equals(NativeMethods.CHILDID_SELF)) { 1632if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 1654if (childID.Equals(NativeMethods.CHILDID_SELF)) { 1670if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 1684if (!childID.Equals(NativeMethods.CHILDID_SELF)) { 1716if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 1738if (childID.Equals(NativeMethods.CHILDID_SELF)) { 1754if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 1775if (childID.Equals(NativeMethods.CHILDID_SELF)) { 1791if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 1817if (childID.Equals(NativeMethods.CHILDID_SELF)) { 1833if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 1863if (childID.Equals(NativeMethods.CHILDID_SELF)) { 1928if (childID.Equals(NativeMethods.CHILDID_SELF)) { 1969if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 1995if (childID.Equals(NativeMethods.CHILDID_SELF)) { 2028if (childID.Equals(NativeMethods.CHILDID_SELF)) { 2044if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 2068if (childID.Equals(NativeMethods.CHILDID_SELF)) { 2105if (childID.Equals(NativeMethods.CHILDID_SELF)) { 2124if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 2166return NativeMethods.E_FAIL; 2266if (!SysNavigate((int)navdir, NativeMethods.CHILDID_SELF, out retObject)) 2267retObject = systemIAccessible.accNavigate((int)navdir, NativeMethods.CHILDID_SELF); 2271if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 2297if (e.ErrorCode != NativeMethods.DISP_E_MEMBERNOTFOUND) { 2307return NativeMethods.CHILDID_SELF; 2352return AccessibleObjectId == NativeMethods.OBJID_CLIENT; 2363return AccessibleObjectId == NativeMethods.OBJID_WINDOW; 2390Guid IID_IAccessible = new Guid(NativeMethods.uuid_IAccessible); 2399Guid IID_IEnumVariant = new Guid(NativeMethods.uuid_IEnumVariant); 2428if (!childID.Equals(NativeMethods.CHILDID_SELF)) 2452childID = NativeMethods.CHILDID_SELF; 2454else if (childID.Equals(NativeMethods.DISP_E_PARAMNOTFOUND)) { 2616args[i] = NativeMethods.CHILDID_SELF; 2741int result = NativeMethods.S_FALSE; 2756return result == NativeMethods.S_OK; 2771return result == NativeMethods.S_OK; 2780return result == NativeMethods.S_OK; 2789return result == NativeMethods.S_OK; 2899return (ns[0] == n) ? NativeMethods.S_OK : NativeMethods.S_FALSE; 3336if (hr >= NativeMethods.S_OK) { 3359pidChild = NativeMethods.CHILDID_SELF; 3360return NativeMethods.S_OK; 3401if (patternId == NativeMethods.UIA_ExpandCollapsePatternId) { 3404else if (patternId == NativeMethods.UIA_ValuePatternId) { 3407else if (AccessibilityImprovements.Level3 && patternId == NativeMethods.UIA_RangeValuePatternId) { 3410else if (patternId == NativeMethods.UIA_TogglePatternId) { 3413else if (patternId == NativeMethods.UIA_TablePatternId) { 3416else if (patternId == NativeMethods.UIA_TableItemPatternId) { 3419else if (patternId == NativeMethods.UIA_GridPatternId) { 3422else if (patternId == NativeMethods.UIA_GridItemPatternId) { 3425else if (AccessibilityImprovements.Level3 && patternId == NativeMethods.UIA_InvokePatternId) { 3428else if (AccessibilityImprovements.Level3 && patternId == NativeMethods.UIA_LegacyIAccessiblePatternId) { 3431else if (AccessibilityImprovements.Level3 && patternId == NativeMethods.UIA_SelectionPatternId) { 3434else if (AccessibilityImprovements.Level3 && patternId == NativeMethods.UIA_SelectionItemPatternId) { 3475NativeMethods.UiaRect UnsafeNativeMethods.IRawElementProviderFragment.BoundingRectangle {
winforms\Managed\System\WinForms\Application.cs (118)
370StringBuilder sb = UnsafeNativeMethods.GetModuleFileNameLongPath(NativeMethods.NullHandleRef); 645StringBuilder sb = UnsafeNativeMethods.GetModuleFileNameLongPath(NativeMethods.NullHandleRef); 800null, NativeMethods.NullHandleRef, 801NativeMethods.RDW_INVALIDATE | 802NativeMethods.RDW_FRAME | 803NativeMethods.RDW_ERASE | 804NativeMethods.RDW_ALLCHILDREN); 816new NativeMethods.EnumChildrenCallback(Application.SendThemeChangedRecursive), 817NativeMethods.NullHandleRef); 820UnsafeNativeMethods.SendMessage(new HandleRef(null, handle), NativeMethods.WM_THEMECHANGED, 0, 0); 878NativeMethods.MSG msg = new NativeMethods.MSG(); 1023ThreadContext.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopDoEvents, null); 1029ThreadContext.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopDoEventsModal, null); 1309Debug.Assert(((int)UnsafeNativeMethods.GetWindowLong(handle, NativeMethods.GWL_STYLE) & NativeMethods.WS_CHILD) != 0, "Only WS_CHILD windows should be parked."); 1486ThreadContext.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopMain, new ApplicationContext()); 1495ThreadContext.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopMain, new ApplicationContext(mainForm)); 1506ThreadContext.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopMain, context); 1517ThreadContext.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopModalForm, new ModalApplicationContext(form)); 1679public NativeMethods.MSOCRINFOSTRUCT componentInfo; 1712return NativeMethods.E_NOINTERFACE; 1741NativeMethods.MSOCRINFOSTRUCT pcrinfo, 1799NativeMethods.MSOCRINFOSTRUCT info 1932if (uContext == NativeMethods.MSOCM.msoccontextAll || uContext == NativeMethods.MSOCM.msoccontextMine) { 1982if (uContext == NativeMethods.MSOCM.msoccontextAll || uContext == NativeMethods.MSOCM.msoccontextMine) { 2021NativeMethods.MSG msg = new NativeMethods.MSG(); 2022return !UnsafeNativeMethods.PeekMessage(ref msg, NativeMethods.NullHandleRef, 0, 0, NativeMethods.PM_NOREMOVE); 2063NativeMethods.MSG msg = new NativeMethods.MSG(); 2064NativeMethods.MSG[] rgmsg = new NativeMethods.MSG[] {msg}; 2098bool peeked = UnsafeNativeMethods.PeekMessage(ref msg, NativeMethods.NullHandleRef, 0, 0, NativeMethods.PM_NOREMOVE); 2112UnsafeNativeMethods.GetMessageW(ref msg, NativeMethods.NullHandleRef, 0, 0); 2116UnsafeNativeMethods.GetMessageA(ref msg, NativeMethods.NullHandleRef, 0, 0); 2119if (msg.message == NativeMethods.WM_QUIT) { 2124if (reason != NativeMethods.MSOCM.msoloopMain) { 2154if (reason == NativeMethods.MSOCM.msoloopDoEvents || 2155reason == NativeMethods.MSOCM.msoloopDoEventsModal) { 2185UnsafeNativeMethods.MsgWaitForMultipleObjectsEx(0, IntPtr.Zero, 100, NativeMethods.QS_ALLINPUT, NativeMethods.MWMO_INPUTAVAILABLE); 2197if (!UnsafeNativeMethods.PeekMessage(ref msg, NativeMethods.NullHandleRef, 0, 0, NativeMethods.PM_NOREMOVE)) { 2269NativeMethods.MSOCRINFOSTRUCT info, 2274if (dwgac == NativeMethods.MSOCM.msogacActive) { 2277else if (dwgac == NativeMethods.MSOCM.msogacTracking) { 2280else if (dwgac == NativeMethods.MSOCM.msogacTrackingOrActive) { 2370private NativeMethods.MSG tempMsg = new NativeMethods.MSG(); 2398NativeMethods.DUPLICATE_SAME_ACCESS); 2447if (NativeMethods.Succeeded(UnsafeNativeMethods.CoRegisterMessageFilter(NativeMethods.NullHandleRef, ref msgFilterPtr)) && msgFilterPtr != (IntPtr)0) { 2470if (NativeMethods.Succeeded(hr) && retval != IntPtr.Zero) { 2484if (NativeMethods.Succeeded(hr) && pmsocm != IntPtr.Zero) { 2544NativeMethods.MSOCRINFOSTRUCT info = new NativeMethods.MSOCRINFOSTRUCT(); 2545info.cbSize = Marshal.SizeOf(typeof(NativeMethods.MSOCRINFOSTRUCT)); 2547info.grfcrf = NativeMethods.MSOCM.msocrfPreTranslateAll | NativeMethods.MSOCM.msocrfNeedIdleTime; 2548info.grfcadvf = NativeMethods.MSOCM.msocadvfModal; 2730cm.OnComponentEnterState((IntPtr)componentID, NativeMethods.MSOCM.msocstateModal, NativeMethods.MSOCM.msoccontextAll, 0, 0, 0); 2942cm.FOnComponentExitState((IntPtr)componentID, NativeMethods.MSOCM.msocstateModal, NativeMethods.MSOCM.msoccontextAll, 0, 0); 3076return totalMessageLoopCount > 0 && baseLoopReason == NativeMethods.MSOCM.msoloopMain; 3141if (ComponentManager.FGetActiveComponent(NativeMethods.MSOCM.msogacActive, activeComponents, null, 0) && 3197if (ret == NativeMethods.RPC_E_CHANGED_MODE) { 3312UnsafeNativeMethods.PostThreadMessage(id, NativeMethods.WM_QUIT, IntPtr.Zero, IntPtr.Zero); 3360if (reason == NativeMethods.MSOCM.msoloopModalForm && !SystemInformation.UserInteractive) { 3368if (reason == NativeMethods.MSOCM.msoloopMain) { 3378if (reason == NativeMethods.MSOCM.msoloopMain) { 3407if (reason == NativeMethods.MSOCM.msoloopDoEventsModal) { 3411if (reason == NativeMethods.MSOCM.msoloopModalForm || reason == NativeMethods.MSOCM.msoloopModalAlert) { 3428hwndOwner = new HandleRef(null, UnsafeNativeMethods.GetWindowLong(new HandleRef(currentForm, currentForm.Handle), NativeMethods.GWL_HWNDPARENT)); 3470else if (reason == NativeMethods.MSOCM.msoloopDoEvents || 3471reason == NativeMethods.MSOCM.msoloopDoEventsModal) { 3503if (reason == NativeMethods.MSOCM.msoloopMain) { 3521NativeMethods.MSG msg = new NativeMethods.MSG(); 3527bool peeked = UnsafeNativeMethods.PeekMessage(ref msg, NativeMethods.NullHandleRef, 0, 0, NativeMethods.PM_NOREMOVE); 3537if (!UnsafeNativeMethods.GetMessageW(ref msg, NativeMethods.NullHandleRef, 0, 0)) { 3544if (!UnsafeNativeMethods.GetMessageA(ref msg, NativeMethods.NullHandleRef, 0, 0)) { 3566else if (!UnsafeNativeMethods.PeekMessage(ref msg, NativeMethods.NullHandleRef, 0, 0, NativeMethods.PM_NOREMOVE)) { 3577internal bool ProcessFilters(ref NativeMethods.MSG msg, out bool modified) { 3643internal bool PreTranslateMessage(ref NativeMethods.MSG msg) { 3649if (msg.message >= NativeMethods.WM_KEYFIRST 3650&& msg.message <= NativeMethods.WM_KEYLAST) { 3651if (msg.message == NativeMethods.WM_CHAR) { 3697IntPtr hwndRoot = UnsafeNativeMethods.GetAncestor(new HandleRef(null, msg.hwnd), NativeMethods.GA_ROOT); 3804bool UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(ref NativeMethods.MSG msg) { 3834if (uStateID == NativeMethods.MSOCM.msocstateModal) { 3950bool UnsafeNativeMethods.IMsoComponent.FContinueMessageLoop(int reason, int pvLoopData, NativeMethods.MSG[] msgPeeked) { 3963case NativeMethods.MSOCM.msoloopFocusWait: 3974case NativeMethods.MSOCM.msoloopModalAlert: 3975case NativeMethods.MSOCM.msoloopModalForm: 3986case NativeMethods.MSOCM.msoloopDoEvents: 3987case NativeMethods.MSOCM.msoloopDoEventsModal: 3990if (!UnsafeNativeMethods.PeekMessage(ref tempMsg, NativeMethods.NullHandleRef, 0, 0, NativeMethods.PM_NOREMOVE)) { 4068cp.Parent = (IntPtr)NativeMethods.HWND_MESSAGE; 4098private const int WM_CHECKDESTROY = NativeMethods.WM_USER + 0x01; 4121cp.Parent = (IntPtr)NativeMethods.HWND_MESSAGE; 4167IntPtr hwndChild = UnsafeNativeMethods.GetWindow(new HandleRef(this, Handle), NativeMethods.GW_CHILD); 4207if (m.Msg != NativeMethods.WM_SHOWWINDOW) { 4209if (m.Msg == NativeMethods.WM_PARENTNOTIFY) { 4210if (NativeMethods.Util.LOWORD(unchecked( (int) (long)m.WParam)) == NativeMethods.WM_DESTROY) { 4241new NativeMethods.EnumThreadWindowsCallback(this.Callback), 4242NativeMethods.NullHandleRef); 4345IntPtr parentHandle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, MainForm.Handle), NativeMethods.GWL_HWNDPARENT);
winforms\Managed\System\WinForms\ArrangeDirection.cs (4)
36Down = NativeMethods.ARW_DOWN, 44Left = NativeMethods.ARW_LEFT, 52Right = NativeMethods.ARW_RIGHT, 60Up = NativeMethods.ARW_UP,
winforms\Managed\System\WinForms\ArrangeStartingPosition.cs (5)
34BottomLeft = NativeMethods.ARW_BOTTOMLEFT, 42BottomRight = NativeMethods.ARW_BOTTOMRIGHT, 51Hide = NativeMethods.ARW_HIDE, 60TopLeft = NativeMethods.ARW_TOPLEFT, 68TopRight = NativeMethods.ARW_TOPRIGHT,
winforms\Managed\System\WinForms\AxHost.cs (296)
219private NativeMethods.IPerPropertyBrowsing iPerPropertyBrowsing; 220private NativeMethods.ICategorizeProperties iCategorizeProperties; 316cp.Style = cp.Style & (~NativeMethods.WS_VISIBLE); 343int hr = GetOleObject().GetMiscStatus(NativeMethods.ActiveX.DVASPECT_CONTENT, out bits); 344if (!NativeMethods.Failed(hr)) { 1166AmbientChanged(NativeMethods.ActiveX.DISPID_AMBIENT_FONT); 1175AmbientChanged(NativeMethods.ActiveX.DISPID_AMBIENT_FORECOLOR); 1184AmbientChanged(NativeMethods.ActiveX.DISPID_AMBIENT_BACKCOLOR); 1245oleCtl.OnAmbientPropertyChange(NativeMethods.ActiveX.DISPID_AMBIENT_DISPLAYNAME); 1367if (NativeMethods.Failed(hr)) { 1443private NativeMethods.COMRECT GetClipRect(NativeMethods.COMRECT clipRect) { 1452IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 1454return NativeMethods.E_FAIL; 1455logPixelsX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSX); 1456logPixelsY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSY); 1458UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 1461return NativeMethods.S_OK; 1464private void HiMetric2Pixel(NativeMethods.tagSIZEL sz, NativeMethods.tagSIZEL szout) { 1465NativeMethods._POINTL phm = new NativeMethods._POINTL(); 1468NativeMethods.tagPOINTF pcont = new NativeMethods.tagPOINTF(); 1469((UnsafeNativeMethods.IOleControlSite)oleSite).TransformCoords(phm, pcont, NativeMethods.ActiveX.XFORMCOORDS_SIZE | NativeMethods.ActiveX.XFORMCOORDS_HIMETRICTOCONTAINER); 1474private void Pixel2hiMetric(NativeMethods.tagSIZEL sz, NativeMethods.tagSIZEL szout) { 1475NativeMethods.tagPOINTF pcont = new NativeMethods.tagPOINTF(); 1478NativeMethods._POINTL phm = new NativeMethods._POINTL(); 1479((UnsafeNativeMethods.IOleControlSite)oleSite).TransformCoords(phm, pcont, NativeMethods.ActiveX.XFORMCOORDS_SIZE | NativeMethods.ActiveX.XFORMCOORDS_CONTAINERTOHIMETRIC); 1505NativeMethods.tagSIZEL sz = new NativeMethods.tagSIZEL(); 1511GetOleObject().SetExtent(NativeMethods.ActiveX.DVASPECT_CONTENT, sz); 1517GetOleObject().GetExtent(NativeMethods.ActiveX.DVASPECT_CONTENT, sz); 1519GetOleObject().SetExtent(NativeMethods.ActiveX.DVASPECT_CONTENT, sz); 1530NativeMethods.tagSIZEL sz = new NativeMethods.tagSIZEL(); 1531GetOleObject().GetExtent(NativeMethods.ActiveX.DVASPECT_CONTENT, sz); 1548GetInPlaceObject().SetObjectRects(FillInRect(new NativeMethods.COMRECT(), bounds), GetClipRect(new NativeMethods.COMRECT())); 1615IntPtr currentWndproc = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 1626UnsafeNativeMethods.SetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC, new HandleRef(this, currentWndproc)); 1680Debug.Assert(NativeMethods.Succeeded(hr), "Failed in UiDeactivate: " + hr.ToString(CultureInfo.InvariantCulture)); 2041NativeMethods.MSG win32Message = new NativeMethods.MSG(); 2059if (hr == NativeMethods.S_OK) { 2063else if (hr == NativeMethods.S_FALSE) { 2105NativeMethods.tagCONTROLINFO ctlInfo = new NativeMethods.tagCONTROLINFO(); 2107if (NativeMethods.Failed(hr)) { 2110NativeMethods.MSG msg = new NativeMethods.MSG(); 2115msg.message = NativeMethods.WM_SYSKEYDOWN; 2119NativeMethods.POINT p = new NativeMethods.POINT(); 2358int hr = NativeMethods.E_FAIL; 2373if (hr == NativeMethods.S_FALSE) { 2384else if (NativeMethods.Failed(hr)) { 2401case NativeMethods.ActiveX.DISPID_AMBIENT_USERMODE: 2404case NativeMethods.ActiveX.DISPID_AMBIENT_AUTOCLIP: 2407case NativeMethods.ActiveX.DISPID_AMBIENT_MESSAGEREFLECT: 2410case NativeMethods.ActiveX.DISPID_AMBIENT_UIDEAD: 2413case NativeMethods.ActiveX.DISPID_AMBIENT_DISPLAYASDEFAULT: 2416case NativeMethods.ActiveX.DISPID_AMBIENT_FONT: 2422case NativeMethods.ActiveX.DISPID_AMBIENT_SHOWGRABHANDLES: 2425case NativeMethods.ActiveX.DISPID_AMBIENT_SHOWHATCHING: 2428case NativeMethods.ActiveX.DISPID_AMBIENT_BACKCOLOR: 2433case NativeMethods.ActiveX.DISPID_AMBIENT_FORECOLOR: 2438case NativeMethods.ActiveX.DISPID_AMBIENT_DISPLAYNAME: 2442case NativeMethods.ActiveX.DISPID_AMBIENT_LOCALEID: 2445case NativeMethods.ActiveX.DISPID_AMBIENT_RIGHTTOLEFT: 2470GetOleObject().DoVerb(verb, IntPtr.Zero, oleSite, -1, parent != null ? parent.Handle : IntPtr.Zero, FillInRect(new NativeMethods.COMRECT(), Bounds)); 2536NativeMethods.tagLICINFO licInfo = new NativeMethods.tagLICINFO(); 2560ret = UnsafeNativeMethods.CoCreateInstance(ref clsid, null, INPROC_SERVER, ref NativeMethods.ActiveX.IID_IUnknown); 2573icf2.CreateInstanceLic(null, null, ref NativeMethods.ActiveX.IID_IUnknown, license, out instance); 2624NativeMethods.ICategorizeProperties icp = GetCategorizeProperties(); 2644if (hr == NativeMethods.S_OK && name != null) { 3008Debug.Assert(dispid != NativeMethods.ActiveX.DISPID_UNKNOWN, "Wrong dispid sent to GetPropertyDescriptorFromDispid"); 3098if (hr != NativeMethods.S_OK) { 3276return(GetOcx() is NativeMethods.ISpecifyPropertyPages); 3286NativeMethods.ISpecifyPropertyPages ispp = (NativeMethods.ISpecifyPropertyPages) GetOcx(); 3288NativeMethods.tagCAUUID uuids = new NativeMethods.tagCAUUID(); 3307NativeMethods.OCPFIPARAMS opcparams = new NativeMethods.OCPFIPARAMS(); 3357NativeMethods.ISpecifyPropertyPages ispp = (NativeMethods.ISpecifyPropertyPages) GetOcx(); 3358NativeMethods.tagCAUUID uuids = new NativeMethods.tagCAUUID(); 3385((UnsafeNativeMethods.IPropertyNotifySink)oleSite).OnChanged(NativeMethods.MEMBERID_NIL); 3432case NativeMethods.WM_ERASEBKGND: 3434case NativeMethods.WM_REFLECT + NativeMethods.WM_NOTIFYFORMAT: 3436case NativeMethods.WM_SETCURSOR: 3437case NativeMethods.WM_SYSCOLORCHANGE: 3443case NativeMethods.WM_DRAWITEM: 3445case NativeMethods.WM_LBUTTONDBLCLK: 3446case NativeMethods.WM_LBUTTONUP: 3447case NativeMethods.WM_MBUTTONDBLCLK: 3448case NativeMethods.WM_MBUTTONUP: 3449case NativeMethods.WM_RBUTTONDBLCLK: 3450case NativeMethods.WM_RBUTTONUP: 3454case NativeMethods.WM_LBUTTONDOWN: 3455case NativeMethods.WM_MBUTTONDOWN: 3456case NativeMethods.WM_RBUTTONDOWN: 3463case NativeMethods.WM_KILLFOCUS: 3475case NativeMethods.WM_COMMAND: 3480case NativeMethods.WM_CONTEXTMENU: 3484case NativeMethods.WM_DESTROY: 3500if (NativeMethods.Succeeded(ipo.GetWindow(out hwnd))) { 3515case NativeMethods.WM_HELP: 3521case NativeMethods.WM_KEYUP: 3536case NativeMethods.WM_NCDESTROY: 3561IntPtr wndProc = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 3591wndprocAddr = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_WNDPROC); 3713if (cpc.FindConnectionPoint(ref tmp, out connectionPoint) != NativeMethods.S_OK) { 3733if (hr == NativeMethods.S_OK) { 3963return NativeMethods.E_INVALIDARG; 3967return NativeMethods.S_OK; 3971return NativeMethods.E_NOINTERFACE; 3981return NativeMethods.S_OK; 3987return NativeMethods.S_OK; 3991return NativeMethods.S_FALSE; 4059return NativeMethods.S_OK; 4064return NativeMethods.E_NOTIMPL; 4071return NativeMethods.E_NOTIMPL; 4073return NativeMethods.S_OK; 4076int UnsafeNativeMethods.IOleControlSite.TransformCoords(NativeMethods._POINTL pPtlHimetric, NativeMethods.tagPOINTF pPtfContainer, int dwFlags) { 4078if (NativeMethods.Failed(hr)) 4081if ((dwFlags & NativeMethods.ActiveX.XFORMCOORDS_HIMETRICTOCONTAINER) != 0) { 4082if ((dwFlags & NativeMethods.ActiveX.XFORMCOORDS_SIZE) != 0) { 4086else if ((dwFlags & NativeMethods.ActiveX.XFORMCOORDS_POSITION) != 0) { 4092return NativeMethods.E_INVALIDARG; 4095else if ((dwFlags & NativeMethods.ActiveX.XFORMCOORDS_CONTAINERTOHIMETRIC) != 0) { 4096if ((dwFlags & NativeMethods.ActiveX.XFORMCOORDS_SIZE) != 0) { 4100else if ((dwFlags & NativeMethods.ActiveX.XFORMCOORDS_POSITION) != 0) { 4106return NativeMethods.E_INVALIDARG; 4111return NativeMethods.E_INVALIDARG; 4114return NativeMethods.S_OK; 4117int UnsafeNativeMethods.IOleControlSite.TranslateAccelerator(ref NativeMethods.MSG pMsg, int grfModifiers) { 4129return f ? NativeMethods.S_OK : NativeMethods.S_FALSE; 4138return NativeMethods.S_OK; 4144return NativeMethods.S_OK; 4146return NativeMethods.E_NOTIMPL; 4153return NativeMethods.E_NOTIMPL; 4159return NativeMethods.E_NOTIMPL; 4165return NativeMethods.S_OK; 4173return NativeMethods.S_OK; 4189return NativeMethods.S_OK; 4192if (NativeMethods.Succeeded(host.GetInPlaceObject().GetWindow(out hwnd))) { 4205return NativeMethods.S_OK; 4210return NativeMethods.S_OK; 4215return NativeMethods.E_NOTIMPL; 4243return NativeMethods.E_NOTIMPL; 4248return NativeMethods.S_OK; 4256return NativeMethods.S_OK; 4263return NativeMethods.S_OK; 4267NativeMethods.COMRECT lprcPosRect, NativeMethods.COMRECT lprcClipRect, NativeMethods.tagOIFI lpFrameInfo) { 4273lpFrameInfo.cb = Marshal.SizeOf(typeof(NativeMethods.tagOIFI)); 4279return NativeMethods.S_OK; 4282int UnsafeNativeMethods.IOleInPlaceSite.Scroll(NativeMethods.tagSIZE scrollExtant) { 4290return(NativeMethods.S_FALSE); 4299return NativeMethods.S_OK; 4311return NativeMethods.S_OK; 4316return NativeMethods.S_OK; 4324int UnsafeNativeMethods.IOleInPlaceSite.OnPosRectChange(NativeMethods.COMRECT lprcPosRect) { 4337host.GetInPlaceObject().SetObjectRects(lprcPosRect, host.GetClipRect(new NativeMethods.COMRECT())); 4343return NativeMethods.S_OK; 4361if (dispid != NativeMethods.ActiveX.DISPID_UNKNOWN) { 4414return NativeMethods.S_OK; 4457qaContainer.dwAmbientFlags = NativeMethods.ActiveX.QACONTAINER_AUTOCLIP | NativeMethods.ActiveX.QACONTAINER_MESSAGEREFLECT | 4458NativeMethods.ActiveX.QACONTAINER_SUPPORTSMNEMONICS; 4460qaContainer.dwAmbientFlags |= NativeMethods.ActiveX.QACONTAINER_USERMODE; 4592axState[fOwnWindow] = ((bits & NativeMethods.ActiveX.OLEMISC_INVISIBLEATRUNTIME) != 0) && IsUserMode(); 4593axState[fSimpleFrame] = ((bits & NativeMethods.ActiveX.OLEMISC_SIMPLEFRAME) != 0); 4600if ((miscStatusBits & NativeMethods.ActiveX.OLEMISC_SETCLIENTSITEFIRST) != 0) { 4613private static NativeMethods.COMRECT FillInRect(NativeMethods.COMRECT dest, Rectangle source) { 4700private NativeMethods.ICategorizeProperties GetCategorizeProperties() { 4703if (instance is NativeMethods.ICategorizeProperties) { 4704iCategorizeProperties = (NativeMethods.ICategorizeProperties) instance; 4710private NativeMethods.IPerPropertyBrowsing GetPerPropertyBrowsing() { 4713if (instance is NativeMethods.IPerPropertyBrowsing) { 4714iPerPropertyBrowsing = (NativeMethods.IPerPropertyBrowsing) instance; 4748return new NativeMethods.PICTDESCbmp(bmp); 4754return new NativeMethods.PICTDESCemf(mf); 4781NativeMethods.PICTDESCicon pictdesc = new NativeMethods.PICTDESCicon(Icon.FromHandle(cursor.Handle)); 4810if (type == NativeMethods.Ole.PICTYPE_BITMAP) { 4832if (type == NativeMethods.Ole.PICTYPE_BITMAP) { 4846case NativeMethods.Ole.PICTYPE_ICON: 4848case NativeMethods.Ole.PICTYPE_METAFILE: 4853case NativeMethods.Ole.PICTYPE_ENHMETAFILE: 4855case NativeMethods.Ole.PICTYPE_BITMAP: 4857case NativeMethods.Ole.PICTYPE_NONE: 4860case NativeMethods.Ole.PICTYPE_UNINITIALIZED: 4868private static NativeMethods.FONTDESC GetFONTDESCFromFont(Font font) { 4869NativeMethods.FONTDESC fdesc = null; 4875fdesc = (NativeMethods.FONTDESC)fontTable[font]; 4879fdesc = new NativeMethods.FONTDESC(); 4882NativeMethods.LOGFONT logfont = new NativeMethods.LOGFONT(); 5153return NativeMethods.E_INVALIDARG; 5157return NativeMethods.E_INVALIDARG; 5178return NativeMethods.S_OK; 5207return NativeMethods.E_INVALIDARG; 5228return(NativeMethods.S_FALSE); 5230return NativeMethods.S_OK; 5236return(NativeMethods.S_FALSE); 5238return NativeMethods.S_OK; 5456bool selected = (dwWhich & NativeMethods.ActiveX.GC_WCH_FSELECTED) != 0; 5457bool reverse = (dwWhich & NativeMethods.ActiveX.GC_WCH_FREVERSEDIR) != 0; 5459bool onlyNext = (dwWhich & NativeMethods.ActiveX.GC_WCH_FONLYNEXT) != 0; 5460bool onlyPrev = (dwWhich & NativeMethods.ActiveX.GC_WCH_FONLYPREV) != 0; 5461dwWhich = dwWhich & ~(NativeMethods.ActiveX.GC_WCH_FSELECTED | NativeMethods.ActiveX.GC_WCH_FREVERSEDIR | 5462NativeMethods.ActiveX.GC_WCH_FONLYNEXT | NativeMethods.ActiveX.GC_WCH_FONLYPREV); 5467if (dwWhich == NativeMethods.ActiveX.GC_WCH_CONTAINER || dwWhich == NativeMethods.ActiveX.GC_WCH_CONTAINED) { 5480case NativeMethods.ActiveX.GC_WCH_CONTAINED: 5484case NativeMethods.ActiveX.GC_WCH_SIBLING: 5500case NativeMethods.ActiveX.GC_WCH_CONTAINER: 5514case NativeMethods.ActiveX.GC_WCH_ALL: 5555if (hostctl != null && (dwOleContF & NativeMethods.ActiveX.OLECONTF_EMBEDDINGS) != 0) { 5558else if ((dwOleContF & NativeMethods.ActiveX.OLECONTF_OTHERS) != 0) { 5924return NativeMethods.E_NOTIMPL; 5943return NativeMethods.S_OK; 5947return NativeMethods.S_OK; 5956return NativeMethods.E_NOTIMPL; 5968return NativeMethods.S_OK; 5975int UnsafeNativeMethods.IOleInPlaceFrame.GetBorder(NativeMethods.COMRECT lprectBorder) { 5977return NativeMethods.E_NOTIMPL; 5984int UnsafeNativeMethods.IOleInPlaceFrame.RequestBorderSpace(NativeMethods.COMRECT pborderwidths) { 5986return NativeMethods.E_NOTIMPL; 5993int UnsafeNativeMethods.IOleInPlaceFrame.SetBorderSpace(NativeMethods.COMRECT pborderwidths) { 5995return NativeMethods.E_NOTIMPL; 6026return NativeMethods.S_OK; 6061return NativeMethods.S_OK; 6068int UnsafeNativeMethods.IOleInPlaceFrame.InsertMenus(IntPtr hmenuShared, NativeMethods.tagOleMenuGroupWidths lpMenuWidths) { 6070return NativeMethods.S_OK; 6079return NativeMethods.E_NOTIMPL; 6088return NativeMethods.E_NOTIMPL; 6097return NativeMethods.E_NOTIMPL; 6106return NativeMethods.E_NOTIMPL; 6112int UnsafeNativeMethods.IOleInPlaceFrame.TranslateAccelerator(ref NativeMethods.MSG lpmsg, short wID) { 6114return NativeMethods.S_FALSE; 6141return NativeMethods.S_OK; 6160return NativeMethods.E_INVALIDARG; 6164return NativeMethods.S_OK; 6168return NativeMethods.E_NOINTERFACE; 6176if (rval < NativeMethods.ActiveX.ALIGN_MIN || rval > NativeMethods.ActiveX.ALIGN_MAX) { 6177rval = NativeMethods.ActiveX.ALIGN_NO_CHANGE; 6693hglobal = UnsafeNativeMethods.GlobalAlloc(NativeMethods.GMEM_MOVEABLE, length); 6709NativeMethods.STGM_CREATE | NativeMethods.STGM_READWRITE | NativeMethods.STGM_SHARE_EXCLUSIVE, 0); 6713null, NativeMethods.STGM_READWRITE | NativeMethods.STGM_SHARE_EXCLUSIVE, 0, 0); 6791NativeMethods.STATSTG stat = new NativeMethods.STATSTG(); 6792iLockBytes.Stat(stat, NativeMethods.Ole.STATFLAG_NONAME); 6886return NativeMethods.E_INVALIDARG; 6896return (pVar == null) ? NativeMethods.E_INVALIDARG : NativeMethods.S_OK; 6903return NativeMethods.S_OK; 6907return NativeMethods.S_OK; 7033return NativeMethods.ActiveX.DISPID_UNKNOWN; 7080NativeMethods.IPerPropertyBrowsing ippb = owner.GetPerPropertyBrowsing(); 7083if (NativeMethods.Succeeded(ippb.MapPropertyToPage(dispid, out rval))) { 7219NativeMethods.IPerPropertyBrowsing ppb = owner.GetPerPropertyBrowsing(); 7225NativeMethods.CA_STRUCT caStrings = new NativeMethods.CA_STRUCT(); 7226NativeMethods.CA_STRUCT caCookies = new NativeMethods.CA_STRUCT(); 7228int hr = NativeMethods.S_OK; 7240if (hr != NativeMethods.S_OK) { 7429NativeMethods.IPerPropertyBrowsing ppb = (NativeMethods.IPerPropertyBrowsing)owner.GetPerPropertyBrowsing(); 7436NativeMethods.VARIANT var = new NativeMethods.VARIANT(); 7449var.vt = (short)NativeMethods.tagVT.VT_EMPTY; 7451if (hr == NativeMethods.S_OK && var.vt != (short)NativeMethods.tagVT.VT_EMPTY) {
winforms\Managed\System\WinForms\Border3DSide.cs (5)
36Left = NativeMethods.BF_LEFT, 46Top = NativeMethods.BF_TOP, 56Right = NativeMethods.BF_RIGHT, 66Bottom = NativeMethods.BF_BOTTOM, 77Middle = NativeMethods.BF_MIDDLE,
winforms\Managed\System\WinForms\Border3DStyle.cs (11)
34Adjust = NativeMethods.BF_ADJUST, 43Bump = NativeMethods.EDGE_BUMP, 52Etched = NativeMethods.EDGE_ETCHED, 60Flat = NativeMethods.BF_FLAT | NativeMethods.EDGE_SUNKEN, 69Raised = NativeMethods.EDGE_RAISED, 77RaisedInner = NativeMethods.BDR_RAISEDINNER, 86RaisedOuter = NativeMethods.BDR_RAISEDOUTER, 94Sunken = NativeMethods.EDGE_SUNKEN, 103SunkenInner = NativeMethods.BDR_SUNKENINNER, 111SunkenOuter = NativeMethods.BDR_SUNKENOUTER,
winforms\Managed\System\WinForms\Button.cs (8)
159cp.Style |= NativeMethods.BS_OWNERDRAW; 162cp.Style |= NativeMethods.BS_PUSHBUTTON; 164cp.Style |= NativeMethods.BS_DEFPUSHBUTTON; 404case NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND: 405if (NativeMethods.Util.HIWORD(m.WParam) == NativeMethods.BN_CLICKED) { 412case NativeMethods.WM_ERASEBKGND:
winforms\Managed\System\WinForms\ButtonBase.cs (23)
201cp.ExStyle &= ~NativeMethods.WS_EX_RIGHT; // WS_EX_RIGHT overrides the BS_XXXX alignment styles 203cp.Style |= NativeMethods.BS_MULTILINE; 206cp.Style |= NativeMethods.BS_DEFPUSHBUTTON; 212cp.Style |= NativeMethods.BS_LEFT; 215cp.Style |= NativeMethods.BS_RIGHT; 218cp.Style |= NativeMethods.BS_CENTER; 222cp.Style |= NativeMethods.BS_TOP; 225cp.Style |= NativeMethods.BS_BOTTOM; 228cp.Style |= NativeMethods.BS_VCENTER; 1080SendMessage(NativeMethods.BM_SETSTATE, 1, 0); 1107SendMessage(NativeMethods.BM_SETSTATE, 0, 0); 1272case NativeMethods.BM_CLICK: 1284case NativeMethods.BM_SETSTATE: 1289case NativeMethods.WM_KILLFOCUS: 1290case NativeMethods.WM_CANCELMODE: 1291case NativeMethods.WM_CAPTURECHANGED: 1303case NativeMethods.WM_LBUTTONUP: 1304case NativeMethods.WM_MBUTTONUP: 1305case NativeMethods.WM_RBUTTONUP: 1322case NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND: 1323if (NativeMethods.Util.HIWORD(m.WParam) == NativeMethods.BN_CLICKED && !ValidationCancelled) {
winforms\Managed\System\WinForms\ButtonInternal\ButtonStandardAdapter.cs (2)
98NativeMethods.RECT r = new NativeMethods.RECT(bounds.X, bounds.Y, bounds.Right, bounds.Bottom);
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxBaseAdapter.cs (4)
257NativeMethods.RECT rcCheck = NativeMethods.RECT.FromXYWH(0, 0, fullSize.Width, fullSize.Height); 264NativeMethods.DFC_MENU, NativeMethods.DFCS_MENUCHECK);
winforms\Managed\System\WinForms\ButtonState.cs (4)
37Checked = NativeMethods.DFCS_CHECKED, 46Flat = NativeMethods.DFCS_FLAT, 55Inactive = NativeMethods.DFCS_INACTIVE, 76Pushed = NativeMethods.DFCS_PUSHED,
winforms\Managed\System\WinForms\CaptionButton.cs (5)
34Close = NativeMethods.DFCS_CAPTIONCLOSE, 42Help = NativeMethods.DFCS_CAPTIONHELP, 50Maximize = NativeMethods.DFCS_CAPTIONMAX, 58Minimize = NativeMethods.DFCS_CAPTIONMIN, 66Restore = NativeMethods.DFCS_CAPTIONRESTORE,
winforms\Managed\System\WinForms\CheckBox.cs (6)
268SendMessage(NativeMethods.BM_SETCHECK, (int)checkState, 0); 318cp.Style |= NativeMethods.BS_OWNERDRAW; 321cp.Style |= NativeMethods.BS_3STATE; 323cp.Style |= NativeMethods.BS_PUSHLIKE; 330cp.Style |= NativeMethods.BS_RIGHTBUTTON; 610SendMessage(NativeMethods.BM_SETCHECK, (int)checkState, 0);
winforms\Managed\System\WinForms\CheckedListBox.cs (19)
194cp.Style |= NativeMethods.LBS_OWNERDRAWFIXED | NativeMethods.LBS_WANTKEYBOARDINPUT; 549NativeMethods.RECT rect = new NativeMethods.RECT(); 550SendMessage(NativeMethods.LB_GETITEMRECT, index, ref rect); 627SendMessage(NativeMethods.LB_SETITEMHEIGHT, 0, ItemHeight); 893SendMessage(NativeMethods.LB_SETITEMHEIGHT, 0, ItemHeight); 1029switch (NativeMethods.Util.HIWORD(m.WParam)) { 1030case NativeMethods.LBN_SELCHANGE: 1036case NativeMethods.LBN_DBLCLK: 1056int keycode = NativeMethods.Util.LOWORD(m.WParam); 1072m.Result = NativeMethods.InvalidIntPtr; 1086case NativeMethods.WM_REFLECT + NativeMethods.WM_CHARTOITEM: 1087m.Result = NativeMethods.InvalidIntPtr; 1089case NativeMethods.WM_REFLECT + NativeMethods.WM_VKEYTOITEM: 1671NativeMethods.POINT pt = new NativeMethods.POINT(rect.X, rect.Y);
winforms\Managed\System\WinForms\Clipboard.cs (2)
74if (format != NativeMethods.CF_TEXT && 75format != NativeMethods.CF_UNICODETEXT &&
winforms\Managed\System\WinForms\ColorDialog.cs (17)
76return !GetOption(NativeMethods.CC_PREVENTFULLOPEN); 80SetOption(NativeMethods.CC_PREVENTFULLOPEN, !value); 98return GetOption(NativeMethods.CC_ANYCOLOR); 102SetOption(NativeMethods.CC_ANYCOLOR, value); 165return GetOption(NativeMethods.CC_FULLOPEN); 169SetOption(NativeMethods.CC_FULLOPEN, value); 216return GetOption(NativeMethods.CC_SHOWHELP); 219SetOption(NativeMethods.CC_SHOWHELP, value); 239return GetOption(NativeMethods.CC_SOLIDCOLOR); 242SetOption(NativeMethods.CC_SOLIDCOLOR, value); 280NativeMethods.WndProc hookProcPtr = new NativeMethods.WndProc(this.HookProc); 281NativeMethods.CHOOSECOLOR cc = new NativeMethods.CHOOSECOLOR(); 290int flags = Options | (NativeMethods.CC_RGBINIT | NativeMethods.CC_ENABLEHOOK); 293flags &= ~NativeMethods.CC_FULLOPEN;
winforms\Managed\System\WinForms\ColumnHeader.cs (8)
211ListView.SetColumnInfo(NativeMethods.LVCF_IMAGE, this); 243ListView.SetColumnInfo(NativeMethods.LVCF_IMAGE, this); 306listview.SetColumnInfo(NativeMethods.LVCF_TEXT, this); 349listview.SetColumnInfo(NativeMethods.LVCF_FMT, this); 397IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(listview, listview.Handle), NativeMethods.LVM_GETHEADER, 0, 0); 399int nativeColumnCount = (int)UnsafeNativeMethods.SendMessage(new HandleRef(listview, hwndHdr), NativeMethods.HDM_GETITEMCOUNT, 0, 0); 401width = (int)UnsafeNativeMethods.SendMessage(new HandleRef(listview, listview.Handle), NativeMethods.LVM_GETCOLUMNWIDTH, Index, 0); 475 UnsafeNativeMethods.SendMessage(new HandleRef(this.listview, this.listview.Handle), NativeMethods.LVM_SETCOLUMNORDERARRAY, cols.Length, cols);
winforms\Managed\System\WinForms\ComboBox.cs (285)
420cp.Style |= NativeMethods.WS_VSCROLL | NativeMethods.CBS_HASSTRINGS | NativeMethods.CBS_AUTOHSCROLL; 421cp.ExStyle |= NativeMethods.WS_EX_CLIENTEDGE; 422if (!integralHeight) cp.Style |= NativeMethods.CBS_NOINTEGRALHEIGHT; 426cp.Style |= NativeMethods.CBS_SIMPLE; 429cp.Style |= NativeMethods.CBS_DROPDOWN; 434cp.Style |= NativeMethods.CBS_DROPDOWNLIST; 442cp.Style |= NativeMethods.CBS_OWNERDRAWFIXED; 445cp.Style |= NativeMethods.CBS_OWNERDRAWVARIABLE; 548SendMessage(NativeMethods.CB_SETDROPPEDWIDTH, value, 0); 602return unchecked( (int) (long)SendMessage(NativeMethods.CB_GETDROPPEDSTATE, 0, 0) ) != 0; 615SendMessage(NativeMethods.CB_SHOWDROPDOWN, value ? -1 : 0, 0); 739int h = unchecked( (int) (long)SendMessage(NativeMethods.CB_GETITEMHEIGHT, 0, 0) ); 853if (IsHandleCreated) SendMessage(NativeMethods.CB_LIMITTEXT, value, 0); 1037return unchecked( (int) (long)SendMessage(NativeMethods.CB_GETCURSEL, 0, 0) ); 1055SendMessage(NativeMethods.CB_SETCURSEL, value, 0); 1132UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.EM_REPLACESEL, NativeMethods.InvalidIntPtr, str); 1152UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.CB_GETEDITSEL, start, end); 1173UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.CB_GETEDITSEL, value, (int[])null); 1607NativeMethods.RECT comboRectMid = new NativeMethods.RECT(); 1612NativeMethods.RECT editRectMid = new NativeMethods.RECT(); 1616int comboXMid = NativeMethods.Util.SignedLOWORD(m.LParam) + (editRectMid.left - comboRectMid.left); 1617int comboYMid = NativeMethods.Util.SignedHIWORD(m.LParam) + (editRectMid.top - comboRectMid.top); 1632case NativeMethods.WM_CHAR: 1645case NativeMethods.WM_SYSCHAR: 1658case NativeMethods.WM_KEYDOWN: 1659case NativeMethods.WM_SYSKEYDOWN: 1689case NativeMethods.WM_INPUTLANGCHANGE: 1693case NativeMethods.WM_KEYUP: 1694case NativeMethods.WM_SYSKEYUP: 1711case NativeMethods.WM_KILLFOCUS: 1730case NativeMethods.WM_SETFOCUS: 1766case NativeMethods.WM_SETFONT: 1769UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.EM_SETMARGINS, 1770NativeMethods.EC_LEFTMARGIN | NativeMethods.EC_RIGHTMARGIN, 0); 1773case NativeMethods.WM_LBUTTONDBLCLK: 1789case NativeMethods.WM_MBUTTONDBLCLK: 1805case NativeMethods.WM_RBUTTONDBLCLK: 1821case NativeMethods.WM_LBUTTONDOWN: 1834case NativeMethods.WM_LBUTTONUP: 1837NativeMethods.RECT r = new NativeMethods.RECT(); 1842int x = NativeMethods.Util.SignedLOWORD(m.LParam); 1843int y = NativeMethods.Util.SignedHIWORD(m.LParam); 1853OnClick(new MouseEventArgs(MouseButtons.Left, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 1854OnMouseClick(new MouseEventArgs(MouseButtons.Left, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 1872case NativeMethods.WM_MBUTTONDOWN: 1885case NativeMethods.WM_RBUTTONDOWN: 1903case NativeMethods.WM_MBUTTONUP: 1910OnMouseUp(new MouseEventArgs(MouseButtons.Middle, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 1912case NativeMethods.WM_RBUTTONUP: 1927case NativeMethods.WM_CONTEXTMENU: 1930UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.WM_CONTEXTMENU, m.WParam, m.LParam); 1937case NativeMethods.WM_MOUSEMOVE: 1946case NativeMethods.WM_SETCURSOR: 1947if (Cursor != DefaultCursor && childEdit != null && m.HWnd == childEdit.Handle && NativeMethods.Util.LOWORD(m.LParam) == NativeMethods.HTCLIENT) { 1955case NativeMethods.WM_MOUSELEAVE: 1982NativeMethods.RECT rect = new NativeMethods.RECT(); 2177int h = unchecked( (int) (long)SendMessage(NativeMethods.CB_GETITEMHEIGHT, index, 0) ); 2201if ((msg == NativeMethods.WM_CTLCOLORSTATIC) && !ShouldSerializeBackColor()) { 2207else if ((msg == NativeMethods.WM_CTLCOLORLISTBOX) && GetStyle(ControlStyles.UserPaint)) { 2223if (m.Msg == NativeMethods.WM_KEYDOWN) { 2236else if (m.Msg == NativeMethods.WM_CHAR) { 2294null, NativeMethods.NullHandleRef, 2295NativeMethods.RDW_INVALIDATE | 2296NativeMethods.RDW_FRAME | // Control.Invalidate(true) doesn't invalidate the non-client region 2297NativeMethods.RDW_ERASE | 2298NativeMethods.RDW_ALLCHILDREN); 2331int insertIndex = unchecked( (int) (long)SendMessage(NativeMethods.CB_ADDSTRING, 0, GetItemText(item))); 2347SendMessage(NativeMethods.CB_RESETCONTENT, 0, 0); 2357int len = unchecked( (int) (long)SendMessage(NativeMethods.CB_GETLBTEXTLEN, index, 0)); 2359UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.CB_GETLBTEXT, index, sb); 2369int insertIndex = unchecked( (int) (long)SendMessage(NativeMethods.CB_INSERTSTRING, index, GetItemText(item))); 2392SendMessage(NativeMethods.CB_DELETESTRING, index, 0); 2429SendMessage(NativeMethods.CB_LIMITTEXT, MaxLength, 0); 2440IntPtr hwnd = UnsafeNativeMethods.GetWindow(new HandleRef(this, Handle), NativeMethods.GW_CHILD); 2451hwnd = UnsafeNativeMethods.GetWindow(new HandleRef(this, hwnd), NativeMethods.GW_HWNDNEXT); 2459UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.EM_SETMARGINS, 2460NativeMethods.EC_LEFTMARGIN | NativeMethods.EC_RIGHTMARGIN, 0); 2467SendMessage(NativeMethods.CB_SETDROPPEDWIDTH, dropDownWidth, 0); 2504SendMessage(NativeMethods.CB_SETCURSEL, selectedIndex, 0); 2560NativeMethods.UIA_ExpandCollapseExpandCollapseStatePropertyId, 2966AccessibilityObject.RaiseAutomationEvent(NativeMethods.UIA_AutomationFocusChangedEventId); 2971NativeMethods.UIA_ExpandCollapseExpandCollapseStatePropertyId, 3164int mode = NativeMethods.AUTOSUGGEST_OFF | NativeMethods.AUTOAPPEND_OFF; 3188int mode = NativeMethods.AUTOSUGGEST_OFF | NativeMethods.AUTOAPPEND_OFF; 3211int mode = NativeMethods.AUTOSUGGEST_OFF | NativeMethods.AUTOAPPEND_OFF; 3220mode |= NativeMethods.AUTOSUGGEST | NativeMethods.AUTOAPPEND_OFF; 3223mode |= NativeMethods.AUTOAPPEND | NativeMethods.AUTOSUGGEST_OFF; 3226mode |= NativeMethods.AUTOSUGGEST; 3227mode |= NativeMethods.AUTOAPPEND; 3238int mode = NativeMethods.AUTOSUGGEST_OFF | NativeMethods.AUTOAPPEND_OFF; 3260SendMessage(NativeMethods.CB_SETEDITSEL, 0, NativeMethods.Util.MAKELPARAM(start, end)); 3307SendMessage(NativeMethods.CB_SETCURSEL, DataManager.Position, 0); 3376SafeNativeMethods.SetWindowPos(new HandleRef(this, dropDownHandle), NativeMethods.NullHandleRef, 0, 0, DropDownWidth, height, 3377NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOZORDER); 3393SendMessage(NativeMethods.CB_SETITEMHEIGHT, -1, ItemHeight); 3394SendMessage(NativeMethods.CB_SETITEMHEIGHT, 0, ItemHeight); 3397SendMessage(NativeMethods.CB_SETITEMHEIGHT, -1, ItemHeight); 3400int original = unchecked( (int) (long)SendMessage(NativeMethods.CB_GETITEMHEIGHT, i, 0)); 3404SendMessage(NativeMethods.CB_SETITEMHEIGHT, i, mievent.ItemHeight); 3443UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.WM_SETTEXT, IntPtr.Zero, s); 3453NativeMethods.RECT rect = new NativeMethods.RECT(); 3479if (unchecked((int)(long)m.WParam) == (NativeMethods.WM_CREATE | 1000 << 16)) { 3567switch (NativeMethods.Util.HIWORD(m.WParam)) { 3568case NativeMethods.CBN_DBLCLK: 3571case NativeMethods.CBN_EDITUPDATE: 3574case NativeMethods.CBN_CLOSEUP: 3582case NativeMethods.CBN_DROPDOWN: 3589case NativeMethods.CBN_EDITCHANGE: 3592case NativeMethods.CBN_SELCHANGE: 3596case NativeMethods.CBN_SELENDOK: 3606NativeMethods.DRAWITEMSTRUCT dis = (NativeMethods.DRAWITEMSTRUCT)m.GetLParam(typeof(NativeMethods.DRAWITEMSTRUCT)); 3631NativeMethods.MEASUREITEMSTRUCT mis = (NativeMethods.MEASUREITEMSTRUCT)m.GetLParam(typeof(NativeMethods.MEASUREITEMSTRUCT)); 3661case NativeMethods.WM_SETFOCUS: 3671case NativeMethods.WM_KILLFOCUS: 3689UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_MOUSELEAVE, 0, 0); 3697case NativeMethods.WM_CTLCOLOREDIT: 3698case NativeMethods.WM_CTLCOLORLISTBOX: 3701case NativeMethods.WM_ERASEBKGND: 3704case NativeMethods.WM_PARENTNOTIFY: 3707case NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND: 3710case NativeMethods.WM_REFLECT + NativeMethods.WM_DRAWITEM: 3713case NativeMethods.WM_REFLECT + NativeMethods.WM_MEASUREITEM: 3716case NativeMethods.WM_LBUTTONDOWN: 3720case NativeMethods.WM_LBUTTONUP: 3723NativeMethods.RECT r = new NativeMethods.RECT(); 3727int x = NativeMethods.Util.SignedLOWORD(m.LParam); 3728int y = NativeMethods.Util.SignedHIWORD(m.LParam); 3739OnClick(new MouseEventArgs(MouseButtons.Left, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 3740OnMouseClick(new MouseEventArgs(MouseButtons.Left, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 3751case NativeMethods.WM_MOUSELEAVE: 3756case NativeMethods.WM_PAINT: 3763NativeMethods.RegionFlags updateRegionFlags = (NativeMethods.RegionFlags)SafeNativeMethods.GetUpdateRgn(new HandleRef(this, this.Handle), new HandleRef(this, wr.HRegion), true); 3771NativeMethods.PAINTSTRUCT ps = new NativeMethods.PAINTSTRUCT(); 3784if (updateRegionFlags != NativeMethods.RegionFlags.ERROR) { 3789if (updateRegionFlags != NativeMethods.RegionFlags.ERROR) { 3809case NativeMethods.WM_PRINTCLIENT: 3814if ((unchecked( (int) (long)m.LParam) & NativeMethods.PRF_CLIENT) == NativeMethods.PRF_CLIENT) { 3825case NativeMethods.WM_SETCURSOR: 3829case NativeMethods.WM_SETFONT: 3838case NativeMethods.WM_WINDOWPOSCHANGED: 3845case NativeMethods.WM_NCDESTROY: 3851if (m.Msg == NativeMethods.WM_MOUSEENTER) { 3877case NativeMethods.WM_GETOBJECT: 3880case NativeMethods.WM_MOUSEMOVE: 3919if (AccessibilityImprovements.Level3 && m.LParam == (IntPtr)NativeMethods.UiaRootObjectId && 3950if (NativeMethods.OBJID_CLIENT == unchecked((int)(long)m.LParam)) { 3954Guid IID_IAccessible = new Guid(NativeMethods.uuid_IAccessible); 4514if (patternId == NativeMethods.UIA_ExpandCollapsePatternId) { 4521if (patternId == NativeMethods.UIA_ValuePatternId) { 4559case NativeMethods.UIA_NamePropertyId: 4561case NativeMethods.UIA_IsExpandCollapsePatternAvailablePropertyId: 4562return (object)this.IsPatternSupported(NativeMethods.UIA_ExpandCollapsePatternId); 4563case NativeMethods.UIA_IsValuePatternAvailablePropertyId: 4564return (object)this.IsPatternSupported(NativeMethods.UIA_ValuePatternId); 4683case NativeMethods.UIA_RuntimeIdPropertyId: 4685case NativeMethods.UIA_BoundingRectanglePropertyId: 4687case NativeMethods.UIA_ControlTypePropertyId: 4688return NativeMethods.UIA_ListItemControlTypeId; 4689case NativeMethods.UIA_NamePropertyId: 4691case NativeMethods.UIA_AccessKeyPropertyId: 4693case NativeMethods.UIA_HasKeyboardFocusPropertyId: 4695case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 4697case NativeMethods.UIA_IsEnabledPropertyId: 4699case NativeMethods.UIA_HelpTextPropertyId: 4701case NativeMethods.UIA_IsControlElementPropertyId: 4703case NativeMethods.UIA_IsContentElementPropertyId: 4705case NativeMethods.UIA_IsPasswordPropertyId: 4707case NativeMethods.UIA_IsOffscreenPropertyId: 4709case NativeMethods.UIA_IsSelectionItemPatternAvailablePropertyId: 4711case NativeMethods.UIA_SelectionItemIsSelectedPropertyId: 4713case NativeMethods.UIA_SelectionItemSelectionContainerPropertyId: 4736if (patternId == NativeMethods.UIA_LegacyIAccessiblePatternId || 4737patternId == NativeMethods.UIA_InvokePatternId || 4738patternId == NativeMethods.UIA_SelectionItemPatternId) { 4796RaiseAutomationEvent(NativeMethods.UIA_AutomationFocusChangedEventId); 4979case NativeMethods.UIA_ControlTypePropertyId: 4980return NativeMethods.UIA_ComboBoxControlTypeId; 4981case NativeMethods.UIA_HasKeyboardFocusPropertyId: 4983case NativeMethods.UIA_NativeWindowHandlePropertyId: 5015itemAccessibleObject.RaiseAutomationEvent(NativeMethods.UIA_SelectionItem_ElementSelectedEventId); 5022RaiseAutomationEvent(NativeMethods.UIA_AutomationFocusChangedEventId); 5054Debug.WriteLine("Edit parent " + _owner.AccessibilityObject.GetPropertyValue(NativeMethods.UIA_ControlTypePropertyId)); 5101case NativeMethods.UIA_RuntimeIdPropertyId: 5103case NativeMethods.UIA_BoundingRectanglePropertyId: 5105case NativeMethods.UIA_ControlTypePropertyId: 5106return NativeMethods.UIA_EditControlTypeId; 5107case NativeMethods.UIA_NamePropertyId: 5109case NativeMethods.UIA_AccessKeyPropertyId: 5111case NativeMethods.UIA_HasKeyboardFocusPropertyId: 5113case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 5115case NativeMethods.UIA_IsEnabledPropertyId: 5117case NativeMethods.UIA_AutomationIdPropertyId: 5119case NativeMethods.UIA_HelpTextPropertyId: 5121case NativeMethods.UIA_IsPasswordPropertyId: 5123case NativeMethods.UIA_NativeWindowHandlePropertyId: 5125case NativeMethods.UIA_IsOffscreenPropertyId: 5264case NativeMethods.UIA_RuntimeIdPropertyId: 5266case NativeMethods.UIA_BoundingRectanglePropertyId: 5268case NativeMethods.UIA_ControlTypePropertyId: 5269return NativeMethods.UIA_ListControlTypeId; 5270case NativeMethods.UIA_NamePropertyId: 5272case NativeMethods.UIA_AccessKeyPropertyId: 5274case NativeMethods.UIA_HasKeyboardFocusPropertyId: 5276case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 5278case NativeMethods.UIA_IsEnabledPropertyId: 5280case NativeMethods.UIA_AutomationIdPropertyId: 5282case NativeMethods.UIA_HelpTextPropertyId: 5284case NativeMethods.UIA_IsPasswordPropertyId: 5286case NativeMethods.UIA_NativeWindowHandlePropertyId: 5288case NativeMethods.UIA_IsOffscreenPropertyId: 5290case NativeMethods.UIA_IsSelectionPatternAvailablePropertyId: 5292case NativeMethods.UIA_SelectionCanSelectMultiplePropertyId: 5294case NativeMethods.UIA_SelectionIsSelectionRequiredPropertyId: 5343if (patternId == NativeMethods.UIA_LegacyIAccessiblePatternId || 5344patternId == NativeMethods.UIA_SelectionPatternId) { 5489case NativeMethods.UIA_RuntimeIdPropertyId: 5491case NativeMethods.UIA_BoundingRectanglePropertyId: 5493case NativeMethods.UIA_ControlTypePropertyId: 5494return NativeMethods.UIA_TextControlTypeId; 5495case NativeMethods.UIA_NamePropertyId: 5497case NativeMethods.UIA_AccessKeyPropertyId: 5499case NativeMethods.UIA_HasKeyboardFocusPropertyId: 5501case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 5503case NativeMethods.UIA_IsEnabledPropertyId: 5505case NativeMethods.UIA_HelpTextPropertyId: 5507case NativeMethods.UIA_IsPasswordPropertyId: 5508case NativeMethods.UIA_IsOffscreenPropertyId: 5651case NativeMethods.UIA_RuntimeIdPropertyId: 5653case NativeMethods.UIA_BoundingRectanglePropertyId: 5655case NativeMethods.UIA_ControlTypePropertyId: 5656return NativeMethods.UIA_ButtonControlTypeId; 5657case NativeMethods.UIA_NamePropertyId: 5659case NativeMethods.UIA_AccessKeyPropertyId: 5661case NativeMethods.UIA_HasKeyboardFocusPropertyId: 5663case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 5665case NativeMethods.UIA_IsEnabledPropertyId: 5667case NativeMethods.UIA_HelpTextPropertyId: 5669case NativeMethods.UIA_IsPasswordPropertyId: 5671case NativeMethods.UIA_IsOffscreenPropertyId: 5704if (patternId == NativeMethods.UIA_LegacyIAccessiblePatternId || 5705patternId == NativeMethods.UIA_InvokePatternId) { 5768new NativeMethods.EnumChildrenCallback(ACNativeWindow.RegisterACWindowRecursive), 5769NativeMethods.NullHandleRef); 5810if (m.Msg == NativeMethods.WM_NCDESTROY) { 5871UnsafeNativeMethods.EnumThreadWindows(SafeNativeMethods.GetCurrentThreadId(), new NativeMethods.EnumThreadWindowsCallback(this.Callback), new HandleRef(null, IntPtr.Zero)); 6101NativeMethods.RECT validRect; 6109validRect = new NativeMethods.RECT(topOwnerDrawArea); 6114validRect = new NativeMethods.RECT(bottomOwnerDrawArea); 6119validRect = new NativeMethods.RECT(leftOwnerDrawArea); 6124validRect = new NativeMethods.RECT(rightOwnerDrawArea);
winforms\Managed\System\WinForms\CommonDialog.cs (14)
37private const int CDM_SETDEFAULTFOCUS = NativeMethods.WM_USER + 0x51; 147if (msg == NativeMethods.WM_INITDIALOG) { 157else if (msg == NativeMethods.WM_SETFOCUS) { 177NativeMethods.RECT r = new NativeMethods.RECT(); 182SafeNativeMethods.SetWindowPos(new HandleRef(null, hWnd), NativeMethods.NullHandleRef, x, y, 0, 0, NativeMethods.SWP_NOSIZE | 183NativeMethods.SWP_NOZORDER | NativeMethods.SWP_NOACTIVATE); 297NativeMethods.WndProc ownerProc = new NativeMethods.WndProc(this.OwnerWndProc); 304defOwnerWndProc = UnsafeNativeMethods.SetWindowLong(new HandleRef(this, hwndOwner), NativeMethods.GWL_WNDPROC, ownerProc); 319IntPtr currentSubClass = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, hwndOwner), NativeMethods.GWL_WNDPROC); 321UnsafeNativeMethods.SetWindowLong(new HandleRef(this, hwndOwner), NativeMethods.GWL_WNDPROC, new HandleRef(this, defOwnerWndProc));
winforms\Managed\System\WinForms\ComponentManagerBroker.cs (14)
200Debug.Assert(NativeMethods.Succeeded(hr), "ICorRuntimeHost failed to return the default domain. The only way that should happen is if it hasn't been started yet, but if it hasn't been started how are we running managed code?"); 204Debug.Assert(NativeMethods.Failed(hr) || domain != null, "ICorRuntimeHost::GetDefaultDomain succeeded but didn't retrn us an app domain."); 312bool UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(ref NativeMethods.MSG msg) { 364bool UnsafeNativeMethods.IMsoComponent.FContinueMessageLoop(int reason, int pvLoopData, NativeMethods.MSG[] msgPeeked) { 423bool UnsafeNativeMethods.IMsoComponentManager.FRegisterComponent(UnsafeNativeMethods.IMsoComponent component, NativeMethods.MSOCRINFOSTRUCT pcrinfo, out IntPtr dwComponentID) { 500bool UnsafeNativeMethods.IMsoComponentManager.FUpdateComponentRegistration(IntPtr dwComponentID, NativeMethods.MSOCRINFOSTRUCT info) { 554if (uContext == NativeMethods.MSOCM.msoccontextAll || uContext == NativeMethods.MSOCM.msoccontextMine) { 567if (uContext == NativeMethods.MSOCM.msoccontextAll || uContext == NativeMethods.MSOCM.msoccontextMine) { 603bool UnsafeNativeMethods.IMsoComponentManager.FGetActiveComponent(int dwgac, UnsafeNativeMethods.IMsoComponent[] ppic, NativeMethods.MSOCRINFOSTRUCT info, int dwReserved) { 611if (dwgac == NativeMethods.MSOCM.msogacActive) { 614else if (dwgac == NativeMethods.MSOCM.msogacTracking) { 617else if (dwgac == NativeMethods.MSOCM.msogacTrackingOrActive) {
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\BaseCAMarshaler.cs (1)
37protected BaseCAMarshaler(NativeMethods.CA_STRUCT caStruct) : base() {
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2AboutBoxPropertyDescriptor.cs (8)
23public Com2AboutBoxPropertyDescriptor() : base(NativeMethods.ActiveX.DISPID_ABOUTBOX, "About", new Attribute[]{new DispIdAttribute(NativeMethods.ActiveX.DISPID_ABOUTBOX), 163NativeMethods.tagEXCEPINFO pExcepInfo = new NativeMethods.tagEXCEPINFO(); 166int hr = pDisp.Invoke(NativeMethods.ActiveX.DISPID_ABOUTBOX, 169NativeMethods.DISPATCH_METHOD, 170new NativeMethods.tagDISPPARAMS(), 174Debug.Assert(NativeMethods.Succeeded(hr), "Failed to launch about box.");
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2ComponentEditor.cs (16)
22if (obj is NativeMethods.IPerPropertyBrowsing) { 25int hr = ((NativeMethods.IPerPropertyBrowsing)obj).MapPropertyToPage(NativeMethods.MEMBERID_NIL, out guid); 26if ((hr == NativeMethods.S_OK) && !guid.Equals(Guid.Empty)) { 31if (obj is NativeMethods.ISpecifyPropertyPages) { 33NativeMethods.tagCAUUID uuids = new NativeMethods.tagCAUUID(); 35((NativeMethods.ISpecifyPropertyPages)obj).GetPages(uuids); 62if (obj is NativeMethods.IPerPropertyBrowsing) { 65int hr = ((NativeMethods.IPerPropertyBrowsing)obj).MapPropertyToPage(NativeMethods.MEMBERID_NIL, out guid); 66if (hr == NativeMethods.S_OK) { 75if (obj is NativeMethods.ISpecifyPropertyPages) { 80NativeMethods.tagCAUUID uuids = new NativeMethods.tagCAUUID(); 82((NativeMethods.ISpecifyPropertyPages)obj).GetPages(uuids);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2ICategorizePropertiesHandler.cs (17)
20return typeof(NativeMethods.ICategorizeProperties); 29if (obj is NativeMethods.ICategorizeProperties) { 30NativeMethods.ICategorizeProperties catObj = (NativeMethods.ICategorizeProperties)obj; 35if (NativeMethods.S_OK == catObj.MapPropertyToCategory(dispid, ref categoryID)) { 39case NativeMethods.ActiveX.PROPCAT_Nil: 41case NativeMethods.ActiveX.PROPCAT_Misc: 43case NativeMethods.ActiveX.PROPCAT_Font: 45case NativeMethods.ActiveX.PROPCAT_Position: 47case NativeMethods.ActiveX.PROPCAT_Appearance: 49case NativeMethods.ActiveX.PROPCAT_Behavior: 51case NativeMethods.ActiveX.PROPCAT_Data: 53case NativeMethods.ActiveX.PROPCAT_List: 55case NativeMethods.ActiveX.PROPCAT_Text: 57case NativeMethods.ActiveX.PROPCAT_Scale: 59case NativeMethods.ActiveX.PROPCAT_DDE: 63if (NativeMethods.S_OK == catObj.GetCategoryName(categoryID, CultureInfo.CurrentCulture.LCID, out categoryName)) {
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2IManagedPerPropertyBrowsingHandler.cs (5)
22return typeof(NativeMethods.IManagedPerPropertyBrowsing); 43if (target is NativeMethods.IManagedPerPropertyBrowsing) { 44Attribute[] attrs = GetComponentAttributes((NativeMethods.IManagedPerPropertyBrowsing)target,sender.DISPID); 53internal static Attribute[] GetComponentAttributes(NativeMethods.IManagedPerPropertyBrowsing target, int dispid) { 60if (hr != NativeMethods.S_OK || cItems == 0) {
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2IPerPropertyBrowsingHandler.cs (28)
22return typeof(NativeMethods.IPerPropertyBrowsing); 38private Guid GetPropertyPageGuid(NativeMethods.IPerPropertyBrowsing target, int dispid) { 42if (hr == NativeMethods.S_OK) { 48internal static string GetDisplayString(NativeMethods.IPerPropertyBrowsing ppb, int dispid, ref bool success) { 51if (hr == NativeMethods.S_OK) { 68NativeMethods.IPerPropertyBrowsing target = sender.TargetObject as NativeMethods.IPerPropertyBrowsing; 84if (sender.TargetObject is NativeMethods.IPerPropertyBrowsing) { 95string displayString = GetDisplayString((NativeMethods.IPerPropertyBrowsing)sender.TargetObject, sender.DISPID, ref success); 107if (sender.TargetObject is NativeMethods.IPerPropertyBrowsing) { 108NativeMethods.IPerPropertyBrowsing ppb = (NativeMethods.IPerPropertyBrowsing)sender.TargetObject; 113NativeMethods.CA_STRUCT caStrings = new NativeMethods.CA_STRUCT(); 114NativeMethods.CA_STRUCT caCookies = new NativeMethods.CA_STRUCT(); 116int hr = NativeMethods.S_OK; 133if (hr != NativeMethods.S_OK) { 191string val = GetDisplayString((NativeMethods.IPerPropertyBrowsing)itemsEnum.target.TargetObject, itemsEnum.target.DISPID, ref success); 266NativeMethods.IPerPropertyBrowsing ppb = (NativeMethods.IPerPropertyBrowsing)target.TargetObject; 275NativeMethods.VARIANT var = new NativeMethods.VARIANT(); 289var.vt = (short)NativeMethods.tagVT.VT_EMPTY; 291if (hr == NativeMethods.S_OK && var.vt != (short)NativeMethods.tagVT.VT_EMPTY) { 309if (hr == NativeMethods.S_OK) { 356string displayString = Com2IPerPropertyBrowsingHandler.GetDisplayString((NativeMethods.IPerPropertyBrowsing)target.TargetObject, target.DISPID, ref success);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2IProvidePropertyBuilderHandler.cs (8)
21return typeof(NativeMethods.IProvidePropertyBuilder); 25private bool GetBuilderGuidString(NativeMethods.IProvidePropertyBuilder target, int dispid, ref string strGuidBldr, int[] bldrType) { 28if (NativeMethods.Failed(target.MapPropertyToBuilder(dispid, bldrType, pGuidBldr, ref valid))) { 69NativeMethods.IProvidePropertyBuilder target = sender.TargetObject as NativeMethods.IProvidePropertyBuilder; 86if (target is NativeMethods.IProvidePropertyBuilder) { 87NativeMethods.IProvidePropertyBuilder propBuilder = (NativeMethods.IProvidePropertyBuilder)target;
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2IVsPerPropertyBrowsingHandler.cs (44)
36return typeof(NativeMethods.IVsPerPropertyBrowsing); 41if (propDesc.TargetObject is NativeMethods.IVsPerPropertyBrowsing) { 43int hr = ((NativeMethods.IVsPerPropertyBrowsing)propDesc.TargetObject).DisplayChildProperties(propDesc.DISPID, ref pfHide); 44return (hr == NativeMethods.S_OK && pfHide); 75NativeMethods.IVsPerPropertyBrowsing vsObj = sender.TargetObject as NativeMethods.IVsPerPropertyBrowsing; 84if (hr == NativeMethods.S_OK && pHelpString[0] != null){ 97if (sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing){ 98NativeMethods.IVsPerPropertyBrowsing vsObj = (NativeMethods.IVsPerPropertyBrowsing)sender.TargetObject; 100int hr = NativeMethods.S_OK; 111if (hr == NativeMethods.S_OK){ 120if (hr == NativeMethods.S_OK && pfDisplay){ 125Debug.Assert(sender.TargetObject == null || sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing, "Object is not " + Interface.Name + "!"); 129if (sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing) { 130NativeMethods.IVsPerPropertyBrowsing target = (NativeMethods.IVsPerPropertyBrowsing)sender.TargetObject; 134if (NativeMethods.Succeeded(hr)){ 138Debug.Assert(sender.TargetObject == null || sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing, "Object is not " + Interface.Name + "!"); 146if (sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing){ 147NativeMethods.IVsPerPropertyBrowsing vsObj = (NativeMethods.IVsPerPropertyBrowsing)sender.TargetObject; 152if (hr == NativeMethods.S_OK && pNameString[0] != null){ 156Debug.Assert(sender.TargetObject == null || sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing, "Object is not " + Interface.Name + "!"); 164if (sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing){ 165NativeMethods.IVsPerPropertyBrowsing vsObj = (NativeMethods.IVsPerPropertyBrowsing)sender.TargetObject; 171if (hr == NativeMethods.S_OK){ 182if (sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing){ 186NativeMethods.IVsPerPropertyBrowsing vsObj = (NativeMethods.IVsPerPropertyBrowsing)sender.TargetObject; 193gveevent.TypeConverter = new Com2IDispatchConverter(sender, (hr == NativeMethods.S_OK && pfResult)); 196gveevent.TypeConverter = new Com2IDispatchConverter(sender, (hr == NativeMethods.S_OK && pfResult), gveevent.TypeConverter); 200Debug.Assert(sender.TargetObject == null || sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing, "Object is not " + Interface.Name + "!"); 204if (sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing) { 207NativeMethods.IVsPerPropertyBrowsing target = (NativeMethods.IVsPerPropertyBrowsing)sender.TargetObject; 212if (NativeMethods.Succeeded(hr)){ 216Debug.Assert(sender.TargetObject == null || sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing, "Object is not " + Interface.Name + "!"); 220if (sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing){ 221NativeMethods.IVsPerPropertyBrowsing vsObj = (NativeMethods.IVsPerPropertyBrowsing)sender.TargetObject; 227if (hr == NativeMethods.S_OK && !pfResult){ 232Debug.Assert(sender.TargetObject == null || sender.TargetObject is NativeMethods.IVsPerPropertyBrowsing, "Object is not " + Interface.Name + "!");
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PictureConverter.cs (6)
32if (pd.DISPID == NativeMethods.ActiveX.DISPID_MOUSEICON || pd.Name.IndexOf("Icon") != -1) { 72case NativeMethods.Ole.PICTYPE_ICON: 76case NativeMethods.Ole.PICTYPE_BITMAP: 112NativeMethods.PICTDESC pictdesc = null; 116pictdesc = NativeMethods.PICTDESC.CreateIconPICTDESC(((Icon)lastManaged).Handle); 119pictdesc = NativeMethods.PICTDESC.CreateBitmapPICTDESC(((Bitmap)lastManaged).GetHbitmap(), lastPalette);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2Properties.cs (6)
84typeof(NativeMethods.ICategorizeProperties), 85typeof(NativeMethods.IProvidePropertyBuilder), 86typeof(NativeMethods.IPerPropertyBrowsing), 87typeof(NativeMethods.IVsPerPropertyBrowsing), 88typeof(NativeMethods.IManagedPerPropertyBrowsing)}; 412if (!NativeMethods.Succeeded(hr)) {
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyBuilderUITypeEditor.cs (4)
69Debug.Assert(obj is NativeMethods.IProvidePropertyBuilder, "object is not IProvidePropertyBuilder"); 70NativeMethods.IProvidePropertyBuilder propBuilder = (NativeMethods.IProvidePropertyBuilder)obj; 72if (NativeMethods.Failed(propBuilder.ExecuteBuilder(propDesc.DISPID,
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (25)
283if (NativeMethods.Succeeded(hr)) { 875NativeMethods.tagEXCEPINFO pExcepInfo = new NativeMethods.tagEXCEPINFO(); 881NativeMethods.DISPATCH_PROPERTYGET, 882new NativeMethods.tagDISPPARAMS(), 887case NativeMethods.S_OK: 888case NativeMethods.S_FALSE: 897case NativeMethods.DISP_E_EXCEPTION: 1233NativeMethods.tagDISPPARAMS dp = new NativeMethods.tagDISPPARAMS(); 1234NativeMethods.tagEXCEPINFO excepInfo = new NativeMethods.tagEXCEPINFO(); 1237int[] namedArgs = new int[]{NativeMethods.DISPID_PROPERTYPUT}; 1252NativeMethods.DISPATCH_PROPERTYPUT, 1259if (hr == NativeMethods.DISP_E_EXCEPTION && excepInfo.scode != 0) { 1265case NativeMethods.E_ABORT: 1266case NativeMethods.OLE_E_PROMPTSAVECANCELLED: 1269case NativeMethods.S_OK: 1270case NativeMethods.S_FALSE: 1280if (NativeMethods.Succeeded(((UnsafeNativeMethods.ISupportErrorInfo)pDisp).InterfaceSupportsErrorInfo(ref g))) { 1285if (NativeMethods.Succeeded(pErrorInfo.GetDescription(ref info))) { 1295int result = SafeNativeMethods.FormatMessage(NativeMethods.FORMAT_MESSAGE_FROM_SYSTEM | 1296NativeMethods.FORMAT_MESSAGE_IGNORE_INSERTS, 1297NativeMethods.NullHandleRef, 1302NativeMethods.NullHandleRef);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (144)
85if (obj is NativeMethods.IProvideClassInfo) { 86NativeMethods.IProvideClassInfo pProvideClassInfo = (NativeMethods.IProvideClassInfo)obj; 121if (obj is NativeMethods.IProvideMultipleClassInfo) { 122NativeMethods.IProvideMultipleClassInfo pCI = (NativeMethods.IProvideMultipleClassInfo)obj; 123if (!NativeMethods.Succeeded(pCI.GetMultiTypeInfoCount(ref n)) || n == 0) { 131if (NativeMethods.Failed(pCI.GetInfoOfIndex(i, 1 /*MULTICLASSINFO_GETTYPEINFO*/, ref temp, 0, 0, IntPtr.Zero, IntPtr.Zero))){ 156int dispid = NativeMethods.DISPID_UNKNOWN; 169cnd.GetPropertyValue(obj, NativeMethods.ActiveX.DISPID_Name, ref succeeded); 171dispid = NativeMethods.ActiveX.DISPID_Name; 183int[] pDispid = new int[]{NativeMethods.DISPID_UNKNOWN}; 186if (NativeMethods.Succeeded(hr)){ 252props = InternalGetProperties(obj, ti, NativeMethods.MEMBERID_NIL, ref temp); 285if (!NativeMethods.Succeeded(hr)) { 290NativeMethods.tagTYPEATTR typeAttr = null; 295typeAttr = new NativeMethods.tagTYPEATTR(); 298typeAttr = (NativeMethods.tagTYPEATTR)structCache.GetStruct(typeof(NativeMethods.tagTYPEATTR)); 324private static Type GetValueTypeFromTypeDesc(NativeMethods.tagTYPEDESC typeDesc, UnsafeNativeMethods.ITypeInfo typeInfo, Object[] typeData, StructCache structCache) { 328switch ((NativeMethods.tagVT)typeDesc.vt) { 330return VTToType((NativeMethods.tagVT)typeDesc.vt); 332case NativeMethods.tagVT.VT_UNKNOWN: 333case NativeMethods.tagVT.VT_DISPATCH: 338return VTToType((NativeMethods.tagVT)typeDesc.vt); 340case NativeMethods.tagVT.VT_USERDEFINED: 346case NativeMethods.tagVT.VT_PTR: 349NativeMethods.tagTYPEDESC refTypeDesc = (NativeMethods.tagTYPEDESC)structCache.GetStruct(typeof(NativeMethods.tagTYPEDESC)); 359refTypeDesc = new NativeMethods.tagTYPEDESC(); 364if (refTypeDesc.vt == (int)NativeMethods.tagVT.VT_VARIANT) { 365return VTToType((NativeMethods.tagVT)refTypeDesc.vt); 379if (!NativeMethods.Succeeded(hr)) { 392if (!NativeMethods.Succeeded(hr)) { 397NativeMethods.tagTYPEATTR refTypeAttr = (NativeMethods.tagTYPEATTR)structCache.GetStruct(typeof(NativeMethods.tagTYPEATTR));//(tagTYPEATTR)Marshal.PtrToStructure(pRefTypeAttr, typeof(tagTYPEATTR)); 407switch ((NativeMethods.tagTYPEKIND)refTypeAttr.typekind) { 409case NativeMethods.tagTYPEKIND.TKIND_ENUM: 412case NativeMethods.tagTYPEKIND.TKIND_ALIAS: 415case NativeMethods.tagTYPEKIND.TKIND_DISPATCH: 416return VTToType(NativeMethods.tagVT.VT_DISPATCH); 417case NativeMethods.tagTYPEKIND.TKIND_INTERFACE: 418case NativeMethods.tagTYPEKIND.TKIND_COCLASS: 419return VTToType(NativeMethods.tagVT.VT_UNKNOWN); 481int hr = NativeMethods.S_OK; 499if (!NativeMethods.Succeeded(hr)) { 506hr = NativeMethods.S_OK; 512props[pi.Index] = new Com2PropertyDescriptor(pi.DispId, pi.Name, temp, pi.ReadOnly != PropInfo.ReadOnlyFalse, pi.ValueType, pi.TypeData, !NativeMethods.Succeeded(hr)); 525private static PropInfo ProcessDataCore(UnsafeNativeMethods.ITypeInfo typeInfo, IDictionary propInfoList, int dispid, int nameDispID, NativeMethods.tagTYPEDESC typeDesc, int flags, StructCache structCache) { 536if (!NativeMethods.Succeeded(hr)) { 579flags |= (int)NativeMethods.tagVARFLAGS.VARFLAG_FNONBROWSABLE; 588if ((flags & (int)NativeMethods.tagVARFLAGS.VARFLAG_FREADONLY) != 0) { 592if ((flags & (int)NativeMethods.tagVARFLAGS.VARFLAG_FHIDDEN) != 0 || 593(flags & (int)NativeMethods.tagVARFLAGS.VARFLAG_FNONBROWSABLE) != 0 || 595dispid == NativeMethods.ActiveX.DISPID_HWND) { 600if ((flags & (int)NativeMethods.tagVARFLAGS.VARFLAG_FUIDEFAULT) != 0) { 604if ((flags & (int)NativeMethods.tagVARFLAGS.VARFLAG_FBINDABLE) != 0 && 605(flags & (int)NativeMethods.tagVARFLAGS.VARFLAG_FDISPLAYBIND) != 0) { 624if (!NativeMethods.Succeeded(hr) || pTypeAttr == IntPtr.Zero) { 628NativeMethods.tagTYPEATTR typeAttr = (NativeMethods.tagTYPEATTR)structCache.GetStruct(typeof(NativeMethods.tagTYPEATTR));//(tagTYPEATTR)Marshal.PtrToStructure(pTypeAttr, typeof(tagTYPEATTR)); 633NativeMethods.tagFUNCDESC funcDesc = null; 634NativeMethods.tagELEMDESC ed = null; 637funcDesc = (NativeMethods.tagFUNCDESC)structCache.GetStruct(typeof(NativeMethods.tagFUNCDESC)); 638ed = (NativeMethods.tagELEMDESC)structCache.GetStruct(typeof(NativeMethods.tagELEMDESC)); 647if (!NativeMethods.Succeeded(hr) || pFuncDesc == IntPtr.Zero) { 655if (funcDesc.invkind == (int)NativeMethods.tagINVOKEKIND.INVOKE_FUNC || 656(dispidToGet != NativeMethods.MEMBERID_NIL && funcDesc.memid != dispidToGet)) { 658if (funcDesc.memid == NativeMethods.ActiveX.DISPID_ABOUTBOX) { 664NativeMethods.tagTYPEDESC typeDesc; 667isPropGet = (funcDesc.invkind == (int)NativeMethods.tagINVOKEKIND.INVOKE_PROPERTYGET); 729if (!NativeMethods.Succeeded(hr) || pTypeAttr == IntPtr.Zero) { 733NativeMethods.tagTYPEATTR typeAttr = (NativeMethods.tagTYPEATTR)structCache.GetStruct(typeof(NativeMethods.tagTYPEATTR));//(tagTYPEATTR)Marshal.PtrToStructure(pTypeAttr, typeof(tagTYPEATTR)); 750NativeMethods.tagVARDESC varDesc = (NativeMethods.tagVARDESC)structCache.GetStruct(typeof(NativeMethods.tagVARDESC)); 756enumTypeInfo.GetDocumentation(NativeMethods.MEMBERID_NIL, ref enumName, ref helpstr, null, null); 765if (!NativeMethods.Succeeded(hr) || pVarDesc == IntPtr.Zero) { 775varDesc.varkind != (int)NativeMethods.tagVARKIND.VAR_CONST || 788if (!NativeMethods.Succeeded(hr)) { 887if (!NativeMethods.Succeeded(hr) || pTypeAttr == IntPtr.Zero) { 891NativeMethods.tagTYPEATTR typeAttr = (NativeMethods.tagTYPEATTR)structCache.GetStruct(typeof(NativeMethods.tagTYPEATTR));//(tagTYPEATTR)Marshal.PtrToStructure(pTypeAttr, typeof(tagTYPEATTR)); 898NativeMethods.tagVARDESC varDesc = (NativeMethods.tagVARDESC)structCache.GetStruct(typeof(NativeMethods.tagVARDESC)); 904if (!NativeMethods.Succeeded(hr) || pVarDesc == IntPtr.Zero) { 914if (varDesc.varkind == (int)NativeMethods.tagVARKIND.VAR_CONST || 915(dispidToGet != NativeMethods.MEMBERID_NIL && varDesc.memid != dispidToGet)) { 939private static Type VTToType(NativeMethods.tagVT vt) { 941case NativeMethods.tagVT.VT_EMPTY: 942case NativeMethods.tagVT.VT_NULL: 944case NativeMethods.tagVT.VT_I1: 946case NativeMethods.tagVT.VT_UI1: 949case NativeMethods.tagVT.VT_I2: 951case NativeMethods.tagVT.VT_UI2: 955case NativeMethods.tagVT.VT_I4: 956case NativeMethods.tagVT.VT_INT: 959case NativeMethods.tagVT.VT_UI4: 960case NativeMethods.tagVT.VT_UINT: 963case NativeMethods.tagVT.VT_I8: 965case NativeMethods.tagVT.VT_UI8: 968case NativeMethods.tagVT.VT_R4: 971case NativeMethods.tagVT.VT_R8: 974case NativeMethods.tagVT.VT_CY: 976case NativeMethods.tagVT.VT_DATE: 978case NativeMethods.tagVT.VT_BSTR: 979case NativeMethods.tagVT.VT_LPSTR: 980case NativeMethods.tagVT.VT_LPWSTR: 983case NativeMethods.tagVT.VT_DISPATCH: 985case NativeMethods.tagVT.VT_UNKNOWN: 988case NativeMethods.tagVT.VT_ERROR: 989case NativeMethods.tagVT.VT_HRESULT: 992case NativeMethods.tagVT.VT_BOOL: 995case NativeMethods.tagVT.VT_VARIANT: 997case NativeMethods.tagVT.VT_CLSID: 1000case NativeMethods.tagVT.VT_FILETIME: 1001return typeof(NativeMethods.FILETIME); 1003case NativeMethods.tagVT.VT_USERDEFINED: 1011case NativeMethods.tagVT.VT_VOID: 1012case NativeMethods.tagVT.VT_PTR: 1013case NativeMethods.tagVT.VT_SAFEARRAY: 1014case NativeMethods.tagVT.VT_CARRAY: 1016case NativeMethods.tagVT.VT_RECORD: 1017case NativeMethods.tagVT.VT_BLOB: 1018case NativeMethods.tagVT.VT_STREAM: 1019case NativeMethods.tagVT.VT_STORAGE: 1020case NativeMethods.tagVT.VT_STREAMED_OBJECT: 1021case NativeMethods.tagVT.VT_STORED_OBJECT: 1022case NativeMethods.tagVT.VT_BLOB_OBJECT: 1023case NativeMethods.tagVT.VT_CF: 1024case NativeMethods.tagVT.VT_BSTR_BLOB: 1025case NativeMethods.tagVT.VT_VECTOR: 1026case NativeMethods.tagVT.VT_ARRAY: 1027case NativeMethods.tagVT.VT_BYREF: 1028case NativeMethods.tagVT.VT_RESERVED:
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\ComNativeDescriptor.cs (19)
97if (component is NativeMethods.IVsPerPropertyBrowsing) { 98int hr = ((NativeMethods.IVsPerPropertyBrowsing)component).GetClassName(ref name); 99if (NativeMethods.Succeeded(hr) && name != null) { 115pTypeInfo.GetDocumentation(NativeMethods.MEMBERID_NIL, ref name, ref desc, null, null); 144if (dispid != NativeMethods.MEMBERID_NIL) { 164dispid[0] = NativeMethods.DISPID_UNKNOWN; 169if (dispid[0] == NativeMethods.DISPID_UNKNOWN || NativeMethods.Failed(hr)) { 184if (GetPropertyValue(component, dispid, pVarResult) == NativeMethods.S_OK) { 196return NativeMethods.E_NOINTERFACE; 201NativeMethods.tagEXCEPINFO pExcepInfo = new NativeMethods.tagEXCEPINFO(); 209NativeMethods.DISPATCH_PROPERTYGET, 210new NativeMethods.tagDISPPARAMS(), 218if (hr == NativeMethods.DISP_E_EXCEPTION) { 231return NativeMethods.E_FAIL; 330if (component is NativeMethods.IManagedPerPropertyBrowsing) { 331Object[] temp = Com2IManagedPerPropertyBrowsingHandler.GetComponentAttributes((NativeMethods.IManagedPerPropertyBrowsing)component, NativeMethods.MEMBERID_NIL);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\Int32CAMarshaler.cs (1)
20public Int32CAMarshaler(NativeMethods.CA_STRUCT caStruct) : base(caStruct) {
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\OleStrCAMarshaler.cs (1)
20public OleStrCAMarshaler(NativeMethods.CA_STRUCT caAddr) : base(caAddr) {
winforms\Managed\System\WinForms\ContainerControl.cs (10)
299cp.ExStyle |= NativeMethods.WS_EX_CONTROLPARENT; 715NativeMethods.RECT clientRectangle = new NativeMethods.RECT(); 717NativeMethods.POINT topLeftPoint = new NativeMethods.POINT(0, 0); 739IntPtr dc = UnsafeNativeMethods.CreateCompatibleDC(NativeMethods.NullHandleRef); 758NativeMethods.TEXTMETRIC tm = new NativeMethods.TEXTMETRIC(); 763if ((tm.tmPitchAndFamily & NativeMethods.TMPF_FIXED_PITCH) != 0) { 1942case NativeMethods.WM_SETFOCUS:
winforms\Managed\System\WinForms\ContextMenu.cs (8)
198Show(control, pos, NativeMethods.TPM_VERTICAL | NativeMethods.TPM_RIGHTBUTTON); 213Show(control, pos, NativeMethods.TPM_VERTICAL | NativeMethods.TPM_RIGHTBUTTON | NativeMethods.TPM_RIGHTALIGN); 216Show(control, pos, NativeMethods.TPM_VERTICAL | NativeMethods.TPM_RIGHTBUTTON | NativeMethods.TPM_LEFTALIGN);
winforms\Managed\System\WinForms\Control.cs (766)
299private static int mouseWheelMessage = NativeMethods.WM_MOUSEWHEEL; 427private NativeMethods.TRACKMOUSEEVENT trackMouseEvent; 541NativeMethods.RECT rect = new NativeMethods.RECT(); 636ncAccessibleObject = new ControlAccessibleObject(this, NativeMethods.OBJID_WINDOW); 654case NativeMethods.OBJID_CLIENT: 657case NativeMethods.OBJID_WINDOW: 1078DispId(NativeMethods.ActiveX.DISPID_BACKCOLOR), 1872cp.Style = NativeMethods.WS_CLIPCHILDREN; 1874cp.ExStyle |= NativeMethods.WS_EX_CONTROLPARENT; 1876cp.ClassStyle = NativeMethods.CS_DBLCLKS; 1883cp.Style |= NativeMethods.WS_CHILD | NativeMethods.WS_CLIPSIBLINGS; 1889if ((state & STATE_TABSTOP) != 0) cp.Style |= NativeMethods.WS_TABSTOP; 1890if ((state & STATE_VISIBLE) != 0) cp.Style |= NativeMethods.WS_VISIBLE; 1894if (!Enabled) cp.Style |= NativeMethods.WS_DISABLED; 1905cp.ExStyle |= NativeMethods.WS_EX_RTLREADING; 1906cp.ExStyle |= NativeMethods.WS_EX_RIGHT; 1907cp.ExStyle |= NativeMethods.WS_EX_LEFTSCROLLBAR; 2086NativeMethods.POINT p = new NativeMethods.POINT(); 2087NativeMethods.RECT r = new NativeMethods.RECT(); 2092SendMessage(NativeMethods.WM_SETCURSOR, Handle, (IntPtr)NativeMethods.HTCLIENT); 2425DispId(NativeMethods.ActiveX.DISPID_ENABLED), 2491DispId(NativeMethods.ActiveX.DISPID_FONT), 2708DispId(NativeMethods.ActiveX.DISPID_FORECOLOR), 2851DispId(NativeMethods.ActiveX.DISPID_HWND), 2991NativeMethods.RECT temp = new NativeMethods.RECT(); 3015(next = UnsafeNativeMethods.GetWindow(new HandleRef(null, prev), NativeMethods.GW_HWNDPREV)) != IntPtr.Zero; 3174SetState(STATE_MIRRORED, (cp.ExStyle & NativeMethods.WS_EX_LAYOUTRTL) != 0); 3382NativeMethods.POINT pt = new NativeMethods.POINT(); 3965DispId(NativeMethods.ActiveX.DISPID_TABSTOP), 3975if (IsHandleCreated) SetWindowStyle(NativeMethods.WS_TABSTOP, value); 4035DispId(NativeMethods.ActiveX.DISPID_TEXT), 4213int actionMask = (NativeMethods.UISF_HIDEACCEL | 4214(AccessibilityImprovements.Level1 ? 0 : NativeMethods.UISF_HIDEFOCUS)) << 16; 4220NativeMethods.WM_CHANGEUISTATE, 4221(IntPtr)(actionMask | NativeMethods.UIS_SET), 4258int actionMask = (NativeMethods.UISF_HIDEACCEL | NativeMethods.UISF_HIDEFOCUS) << 16; 4263NativeMethods.WM_CHANGEUISTATE, 4264(IntPtr)(actionMask | NativeMethods.UIS_SET), 4277return NativeMethods.SW_SHOW; 4419if ((returnValue && exitCode != NativeMethods.STILL_ACTIVE) || 4420(!returnValue && Marshal.GetLastWin32Error() == NativeMethods.ERROR_INVALID_HANDLE) || 4472return unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE)); 4475UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE, new HandleRef(null, (IntPtr)value)); 4485return unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE)); 4488UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)value)); 5283AccessibilityNotifyClients(accEvent, NativeMethods.OBJID_CLIENT, childID); 5603if (updateCount == 0) SendMessage(NativeMethods.WM_SETREDRAW, 0, 0); 5616SafeNativeMethods.SetWindowPos(new HandleRef(window, Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0, 5617NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOSIZE); 5801SetState(STATE_MIRRORED, (cp.ExStyle & NativeMethods.WS_EX_LAYOUTRTL) != 0); 5809if (cp.X != NativeMethods.CW_USEDEFAULT) { 5812if (cp.Y != NativeMethods.CW_USEDEFAULT) { 5820if (cp.Parent == IntPtr.Zero && (cp.Style & NativeMethods.WS_CHILD) != 0) { 5821Debug.Assert((cp.ExStyle & NativeMethods.WS_EX_MDICHILD) == 0, "Can't put MDI child forms on the parking form"); 5947NativeMethods.MSG msg = new NativeMethods.MSG(); 5949threadCallbackMessage, NativeMethods.PM_NOREMOVE)) { 5978if (0 != (NativeMethods.WS_EX_MDICHILD & (int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(window, InternalHandle), NativeMethods.GWL_EXSTYLE))) { 5979UnsafeNativeMethods.DefMDIChildProc(InternalHandle, NativeMethods.WM_CLOSE, IntPtr.Zero, IntPtr.Zero); 6174UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.WM_PRINT, (IntPtr)hDc, 6175(IntPtr)(NativeMethods.PRF_CHILDREN | NativeMethods.PRF_CLIENT | NativeMethods.PRF_ERASEBKGND | NativeMethods.PRF_NONCLIENT)); 6240SendMessage(NativeMethods.WM_SETREDRAW, -1, 0); 6409handle = UnsafeNativeMethods.GetAncestor(new HandleRef(null, handle), NativeMethods.GA_PARENT); 6568System.Internal.HandleCollector.Add(handle, NativeMethods.CommonHandles.GDI); 6587NativeMethods.RECT adornments = new NativeMethods.RECT(0, 0, 0, 0); 6641case NativeMethods.XBUTTON1: 6643case NativeMethods.XBUTTON2: 6802for (IntPtr hWndChild = UnsafeNativeMethods.GetWindow(new HandleRef(null, hWndParent), NativeMethods.GW_CHILD); 6804hWndChild = UnsafeNativeMethods.GetWindow(new HandleRef(null, hWndChild), NativeMethods.GW_HWNDNEXT)) { 7057throw new Win32Exception(NativeMethods.ERROR_INVALID_HANDLE); 7105trackMouseEvent = new NativeMethods.TRACKMOUSEEVENT(); 7106trackMouseEvent.dwFlags = NativeMethods.TME_LEAVE | NativeMethods.TME_HOVER; 7147return UnsafeNativeMethods.GetStockObject(NativeMethods.HOLLOW_BRUSH); 7171hwndMouseWheel = UnsafeNativeMethods.FindWindow(NativeMethods.MOUSEZ_CLASSNAME, NativeMethods.MOUSEZ_TITLE); 7178int message = SafeNativeMethods.RegisterWindowMessage(NativeMethods.MSH_MOUSEWHEEL); 7220NativeMethods.RDW_INVALIDATE | 7221NativeMethods.RDW_ERASE | 7222NativeMethods.RDW_ALLCHILDREN); 7270null, NativeMethods.NullHandleRef, 7271NativeMethods.RDW_INVALIDATE | 7272NativeMethods.RDW_ERASE | 7273NativeMethods.RDW_ALLCHILDREN); 7313NativeMethods.RECT rcArea = NativeMethods.RECT.FromXYWH(rc.X, rc.Y, rc.Width, rc.Height); 7315ref rcArea, NativeMethods.NullHandleRef, 7316NativeMethods.RDW_INVALIDATE | 7317NativeMethods.RDW_ERASE | 7318NativeMethods.RDW_ALLCHILDREN); 7321NativeMethods.RECT rcArea = 7322NativeMethods.RECT.FromXYWH(rc.X, rc.Y, rc.Width, 7617mask = NativeMethods.DLGC_WANTCHARS | NativeMethods.DLGC_WANTALLKEYS | NativeMethods.DLGC_WANTTAB; 7620mask = NativeMethods.DLGC_WANTCHARS | NativeMethods.DLGC_WANTALLKEYS; 7622return(unchecked( (int) (long)SendMessage(NativeMethods.WM_GETDLGCODE, 0, 0)) & mask) != 0; 7645int mask = NativeMethods.DLGC_WANTALLKEYS; 7648mask = NativeMethods.DLGC_WANTALLKEYS | NativeMethods.DLGC_WANTTAB; 7654mask = NativeMethods.DLGC_WANTALLKEYS | NativeMethods.DLGC_WANTARROWS; 7659return(unchecked( (int) (long)SendMessage(NativeMethods.WM_GETDLGCODE, 0, 0)) & mask) != 0; 7757internal void AdjustWindowRectEx(ref NativeMethods.RECT rect, int style, bool bMenu, int exStyle) { 8516IntPtr flags = (IntPtr)(NativeMethods.PRF_CHILDREN | NativeMethods.PRF_CLIENT | NativeMethods.PRF_ERASEBKGND | NativeMethods.PRF_NONCLIENT); 8524m = Message.Create(this.Handle, NativeMethods.WM_PRINTCLIENT, hdc, flags); 8830NativeMethods.SCROLLINFO si = new NativeMethods.SCROLLINFO(); 8831si.cbSize = Marshal.SizeOf(typeof(NativeMethods.SCROLLINFO)); 8832si.fMask = NativeMethods.SIF_RANGE; 8833if (UnsafeNativeMethods.GetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_HORZ,si) != false) { 8835SendMessage(NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, si.nPos), 0); 9403NativeMethods.RECT rect = new NativeMethods.RECT(); 10089NativeMethods.POINT point = new NativeMethods.POINT(p.X, p.Y); 10090UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new HandleRef(this, Handle), point, 1); 10106NativeMethods.POINT point = new NativeMethods.POINT(p.X, p.Y); 10107UnsafeNativeMethods.MapWindowPoints(new HandleRef(this, Handle), NativeMethods.NullHandleRef, point, 1); 10157if (msg.Msg == NativeMethods.WM_KEYDOWN || msg.Msg == NativeMethods.WM_SYSKEYDOWN) { 10184else if (msg.Msg == NativeMethods.WM_CHAR || msg.Msg == NativeMethods.WM_SYSCHAR) { 10185if (msg.Msg == NativeMethods.WM_CHAR && IsInputChar((char)msg.WParam)) { 10247if (msg.Msg == NativeMethods.WM_KEYDOWN || msg.Msg == NativeMethods.WM_SYSKEYDOWN) { 10263if (msg.Msg == NativeMethods.WM_KEYDOWN || msg.Msg == NativeMethods.WM_SYSKEYDOWN) { 10272else if (msg.Msg == NativeMethods.WM_CHAR || msg.Msg == NativeMethods.WM_SYSCHAR) { 10338Debug.Assert(UnsafeNativeMethods.GetObjectType(hDC) == NativeMethods.OBJ_ENHMETADC, 10340Debug.Assert(((long) lParam & NativeMethods.PRF_CHILDREN) != 0, 10344lParam = (IntPtr)((long) lParam & ~NativeMethods.PRF_CHILDREN); 10348NativeMethods.POINT viewportOrg = new NativeMethods.POINT(); 10357NativeMethods.RegionFlags selectResult = (NativeMethods.RegionFlags)SafeNativeMethods.SelectClipRgn(hDC, hClippingRegion); 10358Debug.Assert((selectResult == NativeMethods.RegionFlags.SIMPLEREGION || 10359selectResult == NativeMethods.RegionFlags.NULLREGION), 10375PrintToMetaFile_SendPrintMessage(hDC, (IntPtr)((long)lParam & ~NativeMethods.PRF_CLIENT)); 10378NativeMethods.RECT windowRect = new NativeMethods.RECT(); 10387PrintToMetaFile_SendPrintMessage(hDC, (IntPtr)((long)lParam & ~NativeMethods.PRF_NONCLIENT)); 10404SendMessage(NativeMethods.WM_PRINT, hDC.Handle, lParam); 10412lParam = (IntPtr)((long) lParam | NativeMethods.PRF_CHILDREN); 10419SendMessage(NativeMethods.WM_PRINT, dcWrapper.HDC, lParam); 10516if (m.Msg == NativeMethods.WM_CHAR || m.Msg == NativeMethods.WM_SYSCHAR) { 10532else if (m.Msg == NativeMethods.WM_IME_CHAR) { 10648if (m.Msg == NativeMethods.WM_KEYDOWN || m.Msg == NativeMethods.WM_SYSKEYDOWN) { 10664RemovePendingMessages(NativeMethods.WM_CHAR, NativeMethods.WM_CHAR); 10665RemovePendingMessages(NativeMethods.WM_SYSCHAR, NativeMethods.WM_SYSCHAR); 10666RemovePendingMessages(NativeMethods.WM_IME_CHAR, NativeMethods.WM_IME_CHAR); 10777int current = unchecked( (int) (long)SendMessage(NativeMethods.WM_QUERYUISTATE, 0, 0)); 10783current = (int)topMostParent.SendMessage(NativeMethods.WM_QUERYUISTATE, 0, 0); 10794if ((current & NativeMethods.UISF_HIDEACCEL) != 0) { 10796toClear |= NativeMethods.UISF_HIDEACCEL; 10801if ((current & NativeMethods.UISF_HIDEFOCUS) != 0) { 10803toClear |= NativeMethods.UISF_HIDEFOCUS; 10826UnsafeNativeMethods.GetParent(new HandleRef(null, topMostParent.Handle)) == IntPtr.Zero ? NativeMethods.WM_CHANGEUISTATE : NativeMethods.WM_UPDATEUISTATE, 10827(IntPtr)(NativeMethods.UIS_CLEAR | (toClear << 16)), 10856NativeMethods.MSG msg = new NativeMethods.MSG(); 10860NativeMethods.PM_REMOVE)) { 11061NativeMethods.RECT rect = NativeMethods.RECT.FromXYWH(r.X, r.Y, r.Width, r.Height); 11062UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new HandleRef(this, Handle), ref rect, 2); 11078NativeMethods.RECT rect = NativeMethods.RECT.FromXYWH(r.X, r.Y, r.Width, r.Height); 11079UnsafeNativeMethods.MapWindowPoints(new HandleRef(this, Handle), NativeMethods.NullHandleRef, ref rect, 2); 11098m.Result = control.SendMessage(NativeMethods.WM_REFLECT + m.Msg, m.WParam, m.LParam); 11248if (n != 0 && n != NativeMethods.DRAGDROP_E_ALREADYREGISTERED) { 11257if (n != 0 && n != NativeMethods.DRAGDROP_E_NOTREGISTERED) { 11483NativeMethods.RECT adornments = new NativeMethods.RECT(0, 0, 0, 0); 11762internal IntPtr SendMessage(int msg, int wparam, ref NativeMethods.RECT lparam) { 11793SafeNativeMethods.SetWindowPos(new HandleRef(window, Handle), NativeMethods.HWND_BOTTOM, 0, 0, 0, 0, 11794NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOSIZE); 11885int flags = NativeMethods.SWP_NOZORDER | NativeMethods.SWP_NOACTIVATE; 11888flags |= NativeMethods.SWP_NOMOVE; 11891flags |= NativeMethods.SWP_NOSIZE; 11898SafeNativeMethods.SetWindowPos(new HandleRef(window, Handle), NativeMethods.NullHandleRef, x, y, width, height, flags); 11953NativeMethods.RECT rect = new NativeMethods.RECT(0, 0, width, height); 11968Debug.Assert(value != NativeMethods.InvalidIntPtr, "Outdated call to SetParentHandle"); 12131SafeNativeMethods.ShowWindow(new HandleRef(this, Handle), value ? ShowParams : NativeMethods.SW_HIDE); 12145NativeMethods.NullHandleRef, 12147NativeMethods.SWP_NOSIZE 12148| NativeMethods.SWP_NOMOVE 12149| NativeMethods.SWP_NOZORDER 12150| NativeMethods.SWP_NOACTIVATE 12151| (value ? NativeMethods.SWP_SHOWWINDOW : NativeMethods.SWP_HIDEWINDOW)); 12198new HandleRef(window, Handle), NativeMethods.NullHandleRef, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | 12199NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOZORDER | NativeMethods.SWP_NOACTIVATE | 12200(value ? NativeMethods.SWP_SHOWWINDOW : NativeMethods.SWP_HIDEWINDOW)); 12414SendMessage(NativeMethods.WM_SETFONT, FontHandle, 0 /*redraw = false*/); 12418int styleFlags = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 12419UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)(value? styleFlags | flag: styleFlags & ~flag))); 12516NativeMethods.RECT rect = new NativeMethods.RECT(); 12522UnsafeNativeMethods.MapWindowPoints(NativeMethods.NullHandleRef, new HandleRef(null, UnsafeNativeMethods.GetParent(new HandleRef(window, InternalHandle))), ref rect, 2); 12539NativeMethods.RECT rect = new NativeMethods.RECT(); 12644while ((hWnd = UnsafeNativeMethods.GetWindow(new HandleRef(null, hWnd), NativeMethods.GW_HWNDPREV)) != IntPtr.Zero) { 12697IntPtr prevHandle = (IntPtr)NativeMethods.HWND_TOP; 12705if (UnsafeNativeMethods.GetWindow(new HandleRef(ctl.window, ctl.Handle), NativeMethods.GW_HWNDPREV) != prevHandle) { 12709NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOSIZE); 12745cp.Style |= NativeMethods.WS_VISIBLE; 12752SetState(STATE_MIRRORED, (cp.ExStyle & NativeMethods.WS_EX_LAYOUTRTL) != 0); 12756new HandleRef(this, Handle), NativeMethods.NullHandleRef, 0, 0, 0, 0, 12757NativeMethods.SWP_DRAWFRAME | NativeMethods.SWP_NOACTIVATE | NativeMethods.SWP_NOMOVE 12758| NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOZORDER); 12802int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(null, lastParentHandle), NativeMethods.GWL_STYLE))); 12804if ((style & NativeMethods.WS_CHILD) == 0) { 12811UnsafeNativeMethods.PostMessage(new HandleRef(null, lastParentHandle), NativeMethods.WM_CLOSE, IntPtr.Zero, IntPtr.Zero); 12834if (Command.DispatchID(NativeMethods.Util.LOWORD(m.WParam))) return; 12858int x = NativeMethods.Util.SignedLOWORD(m.LParam); 12859int y = NativeMethods.Util.SignedHIWORD(m.LParam); 12937NativeMethods.DRAWITEMSTRUCT dis = (NativeMethods.DRAWITEMSTRUCT)m.GetLParam(typeof(NativeMethods.DRAWITEMSTRUCT)); 12964NativeMethods.RECT rc = new NativeMethods.RECT(); 13034if (m.Msg == NativeMethods.WM_GETOBJECT && m.LParam == (IntPtr)NativeMethods.UiaRootObjectId && this.SupportsUiaProviders) { 13073Guid IID_IAccessible = new Guid(NativeMethods.uuid_IAccessible); 13138case NativeMethods.HLP_FILE : Help.ShowHelp (this, hpi.HelpFilePath); 13140case NativeMethods.HLP_KEYWORD : Help.ShowHelp (this, hpi.HelpFilePath, hpi.Keyword); 13142case NativeMethods.HLP_NAVIGATOR : Help.ShowHelp (this, hpi.HelpFilePath, hpi.Navigator); 13144case NativeMethods.HLP_OBJECT : Help.ShowHelp (this, hpi.HelpFilePath, hpi.Navigator, hpi.Param); 13150NativeMethods.HELPINFO info = (NativeMethods.HELPINFO)m.GetLParam(typeof(NativeMethods.HELPINFO)); 13185NativeMethods.MEASUREITEMSTRUCT mis = (NativeMethods.MEASUREITEMSTRUCT)m.GetLParam(typeof(NativeMethods.MEASUREITEMSTRUCT)); 13225int item = NativeMethods.Util.LOWORD(m.WParam); 13226int flags = NativeMethods.Util.HIWORD(m.WParam); 13230if ((flags & NativeMethods.MF_SYSMENU) != 0) { 13233else if ((flags & NativeMethods.MF_POPUP) == 0) { 13390OnMouseDown(new MouseEventArgs(button, clicks, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 13476OnMouseMove(new MouseEventArgs(MouseButtons, 0, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 13487int x = NativeMethods.Util.SignedLOWORD(m.LParam); 13488int y = NativeMethods.Util.SignedHIWORD(m.LParam); 13503SendMessage(NativeMethods.WM_CONTEXTMENU, this.Handle, NativeMethods.Util.MAKELPARAM(pt.X, pt.Y)); 13519OnClick(new MouseEventArgs(button, clicks, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 13520OnMouseClick(new MouseEventArgs(button, clicks, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 13526OnDoubleClick(new MouseEventArgs(button, 2, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 13527OnMouseDoubleClick(new MouseEventArgs(button, 2, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 13532OnMouseUp(new MouseEventArgs(button, clicks, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 13551Point p = new Point(NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam)); 13557NativeMethods.Util.SignedHIWORD(m.WParam)); 13583NativeMethods.NMHDR* nmhdr = (NativeMethods.NMHDR*)m.LParam; 13585if(nmhdr->code == NativeMethods.TTN_SHOW) { 13586m.Result = UnsafeNativeMethods.SendMessage(new HandleRef(null, nmhdr->hwndFrom), NativeMethods.WM_REFLECT + m.Msg, m.WParam, m.LParam); 13589if(nmhdr->code == NativeMethods.TTN_POP) { 13590UnsafeNativeMethods.SendMessage(new HandleRef(null, nmhdr->hwndFrom), NativeMethods.WM_REFLECT + m.Msg, m.WParam, m.LParam); 13627IntPtr handle = window.GetHandleFromID((short)NativeMethods.Util.LOWORD(m.WParam)); 13631m.Result = control.SendMessage(NativeMethods.WM_REFLECT + m.Msg, handle, m.LParam); 13661NativeMethods.PAINTSTRUCT ps = new NativeMethods.PAINTSTRUCT(); 13818if (m.WParam == InternalHandle && NativeMethods.Util.LOWORD(m.LParam) == NativeMethods.HTCLIENT) { 13838NativeMethods.WINDOWPOS* wp = (NativeMethods.WINDOWPOS *)m.LParam; 13843if ((wp->flags & NativeMethods.SWP_NOMOVE) == 0 && (wp->x != Left || wp->y != Top)) { 13846if ((wp->flags & NativeMethods.SWP_NOSIZE) == 0 && (wp->cx != Width || wp->cy != Height)) { 13864int msg = NativeMethods.Util.LOWORD(m.WParam); 13867case NativeMethods.WM_CREATE: 13870case NativeMethods.WM_DESTROY: 13873hWnd = UnsafeNativeMethods.GetDlgItem(new HandleRef(this, Handle), NativeMethods.Util.HIWORD(m.WParam)); 14000int cmd = NativeMethods.Util.LOWORD(m.WParam); 14004if (cmd == NativeMethods.UIS_INITIALIZE) { 14017if ((NativeMethods.Util.HIWORD(m.WParam) & NativeMethods.UISF_HIDEACCEL) != 0) { 14021bool showKeyboard = (cmd == NativeMethods.UIS_CLEAR); 14039if ((NativeMethods.Util.HIWORD(m.WParam) & NativeMethods.UISF_HIDEFOCUS) != 0) { 14043bool showFocus = (cmd == NativeMethods.UIS_CLEAR); 14078NativeMethods.WINDOWPOS* wp = (NativeMethods.WINDOWPOS *)m.LParam; 14079if ((wp->flags & NativeMethods.SWP_NOZORDER) == 0) { 14127case NativeMethods.WM_CAPTURECHANGED: 14131case NativeMethods.WM_GETOBJECT: 14135case NativeMethods.WM_COMMAND: 14138case NativeMethods.WM_CLOSE: 14141case NativeMethods.WM_CONTEXTMENU: 14144case NativeMethods.WM_DISPLAYCHANGE: 14147case NativeMethods.WM_DRAWITEM: 14150case NativeMethods.WM_ERASEBKGND: 14154case NativeMethods.WM_EXITMENULOOP: 14158case NativeMethods.WM_HELP: 14162case NativeMethods.WM_PAINT: 14171case NativeMethods.WM_PRINTCLIENT: 14180case NativeMethods.WM_INITMENUPOPUP: 14184case NativeMethods.WM_SYSCOMMAND: 14185if ((unchecked((int)(long)m.WParam) & 0xFFF0) == NativeMethods.SC_KEYMENU) { 14196case NativeMethods.WM_INPUTLANGCHANGE: 14200case NativeMethods.WM_INPUTLANGCHANGEREQUEST: 14204case NativeMethods.WM_MEASUREITEM: 14207case NativeMethods.WM_MENUCHAR: 14211case NativeMethods.WM_MENUSELECT: 14215case NativeMethods.WM_SETCURSOR: 14219case NativeMethods.WM_WINDOWPOSCHANGING: 14223case NativeMethods.WM_CHAR: 14224case NativeMethods.WM_KEYDOWN: 14225case NativeMethods.WM_SYSKEYDOWN: 14226case NativeMethods.WM_KEYUP: 14227case NativeMethods.WM_SYSKEYUP: 14230case NativeMethods.WM_CREATE: 14233case NativeMethods.WM_DESTROY: 14238case NativeMethods.WM_CTLCOLOR: 14239case NativeMethods.WM_CTLCOLORBTN: 14240case NativeMethods.WM_CTLCOLORDLG: 14241case NativeMethods.WM_CTLCOLORMSGBOX: 14242case NativeMethods.WM_CTLCOLORSCROLLBAR: 14243case NativeMethods.WM_CTLCOLOREDIT: 14244case NativeMethods.WM_CTLCOLORLISTBOX: 14245case NativeMethods.WM_CTLCOLORSTATIC: 14252case NativeMethods.WM_REFLECT + NativeMethods.WM_CTLCOLOR: 14253case NativeMethods.WM_REFLECT + NativeMethods.WM_CTLCOLORBTN: 14254case NativeMethods.WM_REFLECT + NativeMethods.WM_CTLCOLORDLG: 14255case NativeMethods.WM_REFLECT + NativeMethods.WM_CTLCOLORMSGBOX: 14256case NativeMethods.WM_REFLECT + NativeMethods.WM_CTLCOLORSCROLLBAR: 14257case NativeMethods.WM_REFLECT + NativeMethods.WM_CTLCOLOREDIT: 14258case NativeMethods.WM_REFLECT + NativeMethods.WM_CTLCOLORLISTBOX: 14259case NativeMethods.WM_REFLECT + NativeMethods.WM_CTLCOLORSTATIC: 14262case NativeMethods.WM_HSCROLL: 14263case NativeMethods.WM_VSCROLL: 14264case NativeMethods.WM_DELETEITEM: 14265case NativeMethods.WM_VKEYTOITEM: 14266case NativeMethods.WM_CHARTOITEM: 14267case NativeMethods.WM_COMPAREITEM: 14272case NativeMethods.WM_IME_CHAR: 14275case NativeMethods.WM_IME_STARTCOMPOSITION: 14278case NativeMethods.WM_IME_ENDCOMPOSITION: 14281case NativeMethods.WM_IME_NOTIFY: 14284case NativeMethods.WM_KILLFOCUS: 14287case NativeMethods.WM_LBUTTONDBLCLK: 14293case NativeMethods.WM_LBUTTONDOWN: 14296case NativeMethods.WM_LBUTTONUP: 14299case NativeMethods.WM_MBUTTONDBLCLK: 14305case NativeMethods.WM_MBUTTONDOWN: 14308case NativeMethods.WM_MBUTTONUP: 14311case NativeMethods.WM_XBUTTONDOWN: 14312WmMouseDown(ref m, GetXButton(NativeMethods.Util.HIWORD(m.WParam)), 1); 14314case NativeMethods.WM_XBUTTONUP: 14315WmMouseUp(ref m, GetXButton(NativeMethods.Util.HIWORD(m.WParam)), 1); 14317case NativeMethods.WM_XBUTTONDBLCLK: 14318WmMouseDown(ref m, GetXButton(NativeMethods.Util.HIWORD(m.WParam)), 2); 14323case NativeMethods.WM_MOUSELEAVE: 14326case NativeMethods.WM_DPICHANGED_BEFOREPARENT: 14332case NativeMethods.WM_DPICHANGED_AFTERPARENT: 14338case NativeMethods.WM_MOUSEMOVE: 14341case NativeMethods.WM_MOUSEWHEEL: 14344case NativeMethods.WM_MOVE: 14347case NativeMethods.WM_NOTIFY: 14350case NativeMethods.WM_NOTIFYFORMAT: 14353case NativeMethods.WM_REFLECT + NativeMethods.WM_NOTIFYFORMAT: 14354m.Result = (IntPtr)(Marshal.SystemDefaultCharSize == 1 ? NativeMethods.NFR_ANSI : NativeMethods.NFR_UNICODE); 14356case NativeMethods.WM_SHOWWINDOW: 14359case NativeMethods.WM_RBUTTONDBLCLK: 14365case NativeMethods.WM_RBUTTONDOWN: 14368case NativeMethods.WM_RBUTTONUP: 14371case NativeMethods.WM_SETFOCUS: 14374case NativeMethods.WM_MOUSEHOVER: 14377case NativeMethods.WM_WINDOWPOSCHANGED: 14380case NativeMethods.WM_QUERYNEWPALETTE: 14383case NativeMethods.WM_UPDATEUISTATE: 14386case NativeMethods.WM_PARENTNOTIFY: 14412keyState |= (Keys)((UnsafeNativeMethods.GetKeyState((int)Keys.ControlKey) < 0) ? NativeMethods.MK_CONTROL : 0); 14413keyState |= (Keys)((UnsafeNativeMethods.GetKeyState((int)Keys.ShiftKey) < 0) ? NativeMethods.MK_SHIFT : 0); 14426NativeMethods.WM_MOUSEWHEEL, 14436if (m.Msg == NativeMethods.WM_MOUSEENTER) { 14636case NativeMethods.WM_MOUSELEAVE: 14640case NativeMethods.WM_MOUSEMOVE: 14644control.SendMessage(NativeMethods.WM_MOUSEENTER, 0, 0); 14652case NativeMethods.WM_MOUSEWHEEL: 15274int UnsafeNativeMethods.IOleControl.GetControlInfo(NativeMethods.tagCONTROLINFO pCI) { 15277pCI.cb = Marshal.SizeOf(typeof(NativeMethods.tagCONTROLINFO)); 15283pCI.dwFlags |= NativeMethods.CTRLINFO_EATS_RETURN; 15286pCI.dwFlags |= NativeMethods.CTRLINFO_EATS_ESCAPE; 15290return NativeMethods.S_OK; 15297int UnsafeNativeMethods.IOleControl.OnMnemonic(ref NativeMethods.MSG pMsg) { 15304return NativeMethods.S_OK; 15316return NativeMethods.S_OK; 15327return NativeMethods.S_OK; 15350int UnsafeNativeMethods.IOleInPlaceActiveObject.TranslateAccelerator(ref NativeMethods.MSG lpmsg) { 15379void UnsafeNativeMethods.IOleInPlaceActiveObject.ResizeBorder(NativeMethods.COMRECT prcBorder, UnsafeNativeMethods.IOleInPlaceUIWindow pUIWindow, bool fFrameWindow) { 15439void UnsafeNativeMethods.IOleInPlaceObject.SetObjectRects(NativeMethods.COMRECT lprcPosRect, NativeMethods.COMRECT lprcClipRect) { 15462return NativeMethods.S_OK; 15482return NativeMethods.S_OK; 15492return NativeMethods.S_OK; 15501return NativeMethods.E_NOTIMPL; 15511return NativeMethods.E_NOTIMPL; 15520return NativeMethods.E_NOTIMPL; 15530return NativeMethods.E_NOTIMPL; 15537int UnsafeNativeMethods.IOleObject.DoVerb(int iVerb, IntPtr lpmsg, UnsafeNativeMethods.IOleClientSite pActiveSite, int lindex, IntPtr hwndParent, NativeMethods.COMRECT lprcPosRect) { 15568return NativeMethods.S_OK; 15586return NativeMethods.S_OK; 15595return NativeMethods.S_OK; 15605return NativeMethods.S_OK; 15614if (dwFormOfType == NativeMethods.USERCLASSTYPE_FULL) { 15620return NativeMethods.S_OK; 15627int UnsafeNativeMethods.IOleObject.SetExtent(int dwDrawAspect, NativeMethods.tagSIZEL pSizel) { 15632return NativeMethods.S_OK; 15639int UnsafeNativeMethods.IOleObject.GetExtent(int dwDrawAspect, NativeMethods.tagSIZEL pSizel) { 15645return NativeMethods.S_OK; 15655return NativeMethods.S_OK; 15667return NativeMethods.S_OK; 15677return NativeMethods.E_NOTIMPL; 15685if ((dwAspect & NativeMethods.DVASPECT_CONTENT) != 0) { 15686int status = NativeMethods.OLEMISC_ACTIVATEWHENVISIBLE | NativeMethods.OLEMISC_INSIDEOUT | NativeMethods.OLEMISC_SETCLIENTSITEFIRST; 15689status |= NativeMethods.OLEMISC_RECOMPOSEONRESIZE; 15693status |= NativeMethods.OLEMISC_ACTSLIKEBUTTON; 15702return NativeMethods.DV_E_DVASPECT; 15704return NativeMethods.S_OK; 15711int UnsafeNativeMethods.IOleObject.SetColorScheme(NativeMethods.tagLOGPALETTE pLogpal) { 15713return NativeMethods.S_OK; 15815return NativeMethods.S_OK; 15916void UnsafeNativeMethods.IQuickActivate.SetContentExtent(NativeMethods.tagSIZEL pSizel) { 15919ActiveXInstance.SetExtent(NativeMethods.DVASPECT_CONTENT, pSizel); 15927void UnsafeNativeMethods.IQuickActivate.GetContentExtent(NativeMethods.tagSIZEL pSizel) { 15930ActiveXInstance.GetExtent(NativeMethods.DVASPECT_CONTENT, pSizel); 15938int UnsafeNativeMethods.IViewObject.Draw(int dwDrawAspect, int lindex, IntPtr pvAspect, NativeMethods.tagDVTARGETDEVICE ptd, 15939IntPtr hdcTargetDev, IntPtr hdcDraw, NativeMethods.COMRECT lprcBounds, NativeMethods.COMRECT lprcWBounds, 15956return NativeMethods.S_OK; 15963int UnsafeNativeMethods.IViewObject.GetColorSet(int dwDrawAspect, int lindex, IntPtr pvAspect, NativeMethods.tagDVTARGETDEVICE ptd, 15964IntPtr hicTargetDev, NativeMethods.tagLOGPALETTE ppColorSet) { 15970return NativeMethods.E_NOTIMPL; 15979return NativeMethods.E_NOTIMPL; 15988return NativeMethods.E_NOTIMPL; 16013void UnsafeNativeMethods.IViewObject2.Draw(int dwDrawAspect, int lindex, IntPtr pvAspect, NativeMethods.tagDVTARGETDEVICE ptd, 16014IntPtr hdcTargetDev, IntPtr hdcDraw, NativeMethods.COMRECT lprcBounds, NativeMethods.COMRECT lprcWBounds, 16027int UnsafeNativeMethods.IViewObject2.GetColorSet(int dwDrawAspect, int lindex, IntPtr pvAspect, NativeMethods.tagDVTARGETDEVICE ptd, 16028IntPtr hicTargetDev, NativeMethods.tagLOGPALETTE ppColorSet) { 16034return NativeMethods.E_NOTIMPL; 16043return NativeMethods.E_NOTIMPL; 16052return NativeMethods.E_NOTIMPL; 16077void UnsafeNativeMethods.IViewObject2.GetExtent(int dwDrawAspect, int lindex, NativeMethods.tagDVTARGETDEVICE ptd, NativeMethods.tagSIZEL lpsizel) { 16193NativeMethods.RECT rectangle = new NativeMethods.RECT(); 16267private static NativeMethods.tagOLEVERB[] axVerbs; 16297private NativeMethods.COMRECT adjustRect; // temporary rect used during OnPosRectChange && SetObjectRects 16315new AmbientProperty("Font", NativeMethods.ActiveX.DISPID_AMBIENT_FONT), 16316new AmbientProperty("BackColor", NativeMethods.ActiveX.DISPID_AMBIENT_BACKCOLOR), 16317new AmbientProperty("ForeColor", NativeMethods.ActiveX.DISPID_AMBIENT_FORECOLOR) 16328AmbientProperty prop = LookupAmbient(NativeMethods.ActiveX.DISPID_AMBIENT_BACKCOLOR); 16332if (GetAmbientProperty(NativeMethods.ActiveX.DISPID_AMBIENT_BACKCOLOR, ref obj)) { 16366AmbientProperty prop = LookupAmbient(NativeMethods.ActiveX.DISPID_AMBIENT_FONT); 16370if (GetAmbientProperty(NativeMethods.ActiveX.DISPID_AMBIENT_FONT, ref obj)) { 16410AmbientProperty prop = LookupAmbient(NativeMethods.ActiveX.DISPID_AMBIENT_FORECOLOR); 16414if (GetAmbientProperty(NativeMethods.ActiveX.DISPID_AMBIENT_FORECOLOR, ref obj)) { 16484if (NativeMethods.Succeeded(clientSite.GetContainer(out container)) && container is NativeMethods.IHTMLDocument) { 16509IntPtr dc = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 16510logPixels.X = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), NativeMethods.LOGPIXELSX); 16511logPixels.Y = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, dc), NativeMethods.LOGPIXELSY); 16512UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc)); 16536if ((dwSaveOption == NativeMethods.OLECLOSE_SAVEIFDIRTY || 16537dwSaveOption == NativeMethods.OLECLOSE_PROMPTSAVE) && 16551internal void DoVerb(int iVerb, IntPtr lpmsg, UnsafeNativeMethods.IOleClientSite pActiveSite, int lindex, IntPtr hwndParent, NativeMethods.COMRECT lprcPosRect) { 16554case NativeMethods.OLEIVERB_SHOW: 16555case NativeMethods.OLEIVERB_INPLACEACTIVATE: 16556case NativeMethods.OLEIVERB_UIACTIVATE: 16557case NativeMethods.OLEIVERB_PRIMARY: 16565NativeMethods.MSG msg = (NativeMethods.MSG)UnsafeNativeMethods.PtrToStructure(lpmsg, typeof(NativeMethods.MSG)); 16568if (msg.hwnd != control.Handle && msg.message >= NativeMethods.WM_MOUSEFIRST && msg.message <= NativeMethods.WM_MOUSELAST) { 16573NativeMethods.POINT pt = new NativeMethods.POINT(); 16574pt.x = NativeMethods.Util.LOWORD(msg.lParam); 16575pt.y = NativeMethods.Util.HIWORD(msg.lParam); 16588msg.lParam = NativeMethods.Util.MAKELPARAM(pt.x, pt.y); 16598if (msg.message == NativeMethods.WM_KEYDOWN && msg.wParam == (IntPtr)NativeMethods.VK_TAB) { 16609case NativeMethods.OLEIVERB_HIDE: 16637ThrowHr(NativeMethods.E_NOTIMPL); 16646internal void Draw(int dwDrawAspect, int lindex, IntPtr pvAspect, NativeMethods.tagDVTARGETDEVICE ptd, 16647IntPtr hdcTargetDev, IntPtr hdcDraw, NativeMethods.COMRECT prcBounds, NativeMethods.COMRECT lprcWBounds, 16653case NativeMethods.DVASPECT_CONTENT: 16654case NativeMethods.DVASPECT_OPAQUE: 16655case NativeMethods.DVASPECT_TRANSPARENT: 16658ThrowHr(NativeMethods.DV_E_DVASPECT); 16667if (hdcType == NativeMethods.OBJ_METADC) { 16668ThrowHr(NativeMethods.VIEW_E_DRAW); 16671NativeMethods.RECT rc; 16672NativeMethods.POINT pVp = new NativeMethods.POINT(); 16673NativeMethods.POINT pW = new NativeMethods.POINT(); 16674NativeMethods.SIZE sWindowExt = new NativeMethods.SIZE(); 16675NativeMethods.SIZE sViewportExt = new NativeMethods.SIZE(); 16676int iMode = NativeMethods.MM_TEXT; 16685rc = new NativeMethods.RECT(prcBounds.left, prcBounds.top, prcBounds.right, prcBounds.bottom); 16695iMode = SafeNativeMethods.SetMapMode(new HandleRef(null, hdcDraw), NativeMethods.MM_ANISOTROPIC); 16704IntPtr flags = (IntPtr)(NativeMethods.PRF_CHILDREN 16705| NativeMethods.PRF_CLIENT 16706| NativeMethods.PRF_ERASEBKGND 16707| NativeMethods.PRF_NONCLIENT); 16711if(hdcType != NativeMethods.OBJ_ENHMETADC) { 16712control.SendMessage(NativeMethods.WM_PRINT, hdcDraw, flags); 16736NativeMethods.tagOLEVERB verbShow = new NativeMethods.tagOLEVERB(); 16737NativeMethods.tagOLEVERB verbInplaceActivate = new NativeMethods.tagOLEVERB(); 16738NativeMethods.tagOLEVERB verbUIActivate = new NativeMethods.tagOLEVERB(); 16739NativeMethods.tagOLEVERB verbHide = new NativeMethods.tagOLEVERB(); 16740NativeMethods.tagOLEVERB verbPrimary = new NativeMethods.tagOLEVERB(); 16741NativeMethods.tagOLEVERB verbProperties = new NativeMethods.tagOLEVERB(); 16743verbShow.lVerb = NativeMethods.OLEIVERB_SHOW; 16744verbInplaceActivate.lVerb = NativeMethods.OLEIVERB_INPLACEACTIVATE; 16745verbUIActivate.lVerb = NativeMethods.OLEIVERB_UIACTIVATE; 16746verbHide.lVerb = NativeMethods.OLEIVERB_HIDE; 16747verbPrimary.lVerb = NativeMethods.OLEIVERB_PRIMARY; 16748verbProperties.lVerb = NativeMethods.OLEIVERB_PROPERTIES; 16750verbProperties.grfAttribs = NativeMethods.ActiveX.OLEVERBATTRIB_ONCONTAINERMENU; 16752axVerbs = new NativeMethods.tagOLEVERB[] { 16766return NativeMethods.S_OK; 16800paspects[0] = NativeMethods.DVASPECT_CONTENT; 16806if (activeXState[viewAdviseOnlyOnce]) padvf[0] |= NativeMethods.ADVF_ONLYONCE; 16807if (activeXState[viewAdvisePrimeFirst]) padvf[0] |= NativeMethods.ADVF_PRIMEFIRST; 16829int hr = NativeMethods.E_FAIL; 16833hr = disp.Invoke(dispid, ref g, NativeMethods.LOCALE_USER_DEFAULT, 16834NativeMethods.DISPATCH_PROPERTYGET, new NativeMethods.tagDISPPARAMS(), 16840if (NativeMethods.Succeeded(hr)) { 16867internal int GetControlInfo(NativeMethods.tagCONTROLINFO pCI) { 16875int accelSize = UnsafeNativeMethods.SizeOf(typeof(NativeMethods.ACCEL)); 16883NativeMethods.ACCEL accel = new NativeMethods.ACCEL(); 16899accel.fVirt = NativeMethods.FALT | NativeMethods.FVIRTKEY; 16907accel.fVirt = NativeMethods.FALT | NativeMethods.FVIRTKEY | NativeMethods.FSHIFT; 16913accel.fVirt = NativeMethods.FALT | NativeMethods.FVIRTKEY; 16916accel.fVirt |= NativeMethods.FSHIFT; 16949return NativeMethods.S_OK; 16955internal void GetExtent(int dwDrawAspect, NativeMethods.tagSIZEL pSizel) { 16956if ((dwDrawAspect & NativeMethods.DVASPECT_CONTENT) != 0) { 16964ThrowHr(NativeMethods.DV_E_DVASPECT); 17009return NativeMethods.E_FAIL; 17012return NativeMethods.S_OK; 17050if (hr != NativeMethods.S_OK) { 17051if (NativeMethods.Succeeded(hr)) { 17052hr = NativeMethods.E_FAIL; 17067NativeMethods.tagOIFI inPlaceFrameInfo = new NativeMethods.tagOIFI(); 17068inPlaceFrameInfo.cb = UnsafeNativeMethods.SizeOf(typeof(NativeMethods.tagOIFI)); 17077NativeMethods.COMRECT posRect = new NativeMethods.COMRECT(); 17078NativeMethods.COMRECT clipRect = new NativeMethods.COMRECT(); 17121if (verb != NativeMethods.OLEIVERB_PRIMARY && verb != NativeMethods.OLEIVERB_UIACTIVATE) { 17151if (NativeMethods.Failed(hr) && hr != NativeMethods.OLE_E_INVALIDRECT && 17152hr != NativeMethods.INPLACE_E_NOTOOLSPACE && hr != NativeMethods.E_NOTIMPL) { 17158if (NativeMethods.Failed(hr) && hr != NativeMethods.OLE_E_INVALIDRECT && 17159hr != NativeMethods.INPLACE_E_NOTOOLSPACE && hr != NativeMethods.E_NOTIMPL) { 17226return NativeMethods.S_OK; 17229return NativeMethods.S_FALSE; 17264stream = stg.OpenStream(this.GetStreamName(), IntPtr.Zero, NativeMethods.STGM_READ | NativeMethods.STGM_SHARE_EXCLUSIVE, 0); 17267if (e.ErrorCode == NativeMethods.STG_E_FILENOTFOUND) { 17270stream = stg.OpenStream(GetType().FullName, IntPtr.Zero, NativeMethods.STGM_READ | NativeMethods.STGM_SHARE_EXCLUSIVE, 0); 17316int hr = NativeMethods.E_FAIL; 17326if (NativeMethods.Succeeded(hr) && obj != null) { 17386errorCode = NativeMethods.E_FAIL; 17392NativeMethods.tagEXCEPINFO err = new NativeMethods.tagEXCEPINFO(); 17451SafeNativeMethods.CombineRgn(new HandleRef(null, newRegion), new HandleRef(null, region), new HandleRef(this, clipRegion), NativeMethods.RGN_DIFF); 17515if (dispID != NativeMethods.ActiveX.DISPID_UNKNOWN) { 17532case NativeMethods.ActiveX.DISPID_AMBIENT_UIDEAD: 17533if (GetAmbientProperty(NativeMethods.ActiveX.DISPID_AMBIENT_UIDEAD, ref obj)) { 17538case NativeMethods.ActiveX.DISPID_AMBIENT_DISPLAYASDEFAULT: 17540if (ibuttonControl != null && GetAmbientProperty(NativeMethods.ActiveX.DISPID_AMBIENT_DISPLAYASDEFAULT, ref obj)) { 17573if (NativeMethods.Failed(hr) && hr != NativeMethods.INPLACE_E_NOTOOLSPACE && hr != NativeMethods.E_NOTIMPL) { 17595InPlaceActivate(NativeMethods.OLEIVERB_UIACTIVATE); 17617AmbientProperty prop = LookupAmbient(NativeMethods.ActiveX.DISPID_AMBIENT_BACKCOLOR); 17620prop = LookupAmbient(NativeMethods.ActiveX.DISPID_AMBIENT_FORECOLOR); 17627prop = LookupAmbient(NativeMethods.ActiveX.DISPID_AMBIENT_FONT); 17661SetAdvise(NativeMethods.DVASPECT_CONTENT, 0, (IAdviseSink)pQaContainer.pAdviseSink); 17666((UnsafeNativeMethods.IOleObject)control).GetMiscStatus(NativeMethods.DVASPECT_CONTENT, out status); 17990stream = stg.CreateStream(this.GetStreamName(), NativeMethods.STGM_WRITE | NativeMethods.STGM_SHARE_EXCLUSIVE | NativeMethods.STGM_CREATE, 0, 0); 18100if ((aspects & NativeMethods.DVASPECT_CONTENT) == 0) { 18101ThrowHr(NativeMethods.DV_E_DVASPECT); 18106activeXState[viewAdvisePrimeFirst] = (advf & NativeMethods.ADVF_PRIMEFIRST) != 0 ? true : false; 18107activeXState[viewAdviseOnlyOnce] = (advf & NativeMethods.ADVF_ONLYONCE) != 0 ? true : false; 18184if (GetAmbientProperty(NativeMethods.ActiveX.DISPID_AMBIENT_UIDEAD, ref obj)) { 18188if (control is IButtonControl && GetAmbientProperty(NativeMethods.ActiveX.DISPID_AMBIENT_UIDEAD, ref obj)) { 18242internal void SetExtent(int dwDrawAspect, NativeMethods.tagSIZEL pSizel) { 18243if ((dwDrawAspect & NativeMethods.DVASPECT_CONTENT) != 0) { 18270ioleClientSite.OnPosRectChange(NativeMethods.COMRECT.FromXYWH(bounds.X, bounds.Y, bounds.Width, bounds.Height)); 18305ThrowHr(NativeMethods.DV_E_DVASPECT); 18320internal void SetObjectRects(NativeMethods.COMRECT lprcPosRect, NativeMethods.COMRECT lprcClipRect) { 18406NativeMethods.RECT rcIntersect = NativeMethods.RECT.FromXYWH(intersect.X, intersect.Y, intersect.Width, intersect.Height); 18488internal int TranslateAccelerator(ref NativeMethods.MSG lpmsg) { 18506case NativeMethods.WM_KEYDOWN: 18507case NativeMethods.WM_SYSKEYDOWN: 18508case NativeMethods.WM_CHAR: 18509case NativeMethods.WM_SYSCHAR: 18527return NativeMethods.S_OK; 18540return NativeMethods.S_OK; 18551int hr = NativeMethods.S_FALSE; 18559if (UnsafeNativeMethods.GetKeyState(NativeMethods.VK_SHIFT) < 0) keyState |= 1; 18560if (UnsafeNativeMethods.GetKeyState(NativeMethods.VK_CONTROL) < 0) keyState |= 2; 18561if (UnsafeNativeMethods.GetKeyState(NativeMethods.VK_MENU) < 0) keyState |= 4; 18582return NativeMethods.S_OK; 18603return NativeMethods.S_OK; 18612ThrowHr(NativeMethods.OLE_E_NOCONNECTION); 18630NativeMethods.COMRECT rc = new NativeMethods.COMRECT(); 18632if ((flags & NativeMethods.SWP_NOMOVE) != 0) { 18641if ((flags & NativeMethods.SWP_NOSIZE) != 0) { 18665if ((flags & NativeMethods.SWP_NOMOVE) == 0) { 18669if ((flags & NativeMethods.SWP_NOSIZE) == 0) { 18715viewAdviseSink.OnViewChange(NativeMethods.DVASPECT_CONTENT, -1); 18742if (m.Msg >= NativeMethods.WM_MOUSEFIRST && m.Msg <= NativeMethods.WM_MOUSELAST) { 18745if (m.Msg >= NativeMethods.WM_NCLBUTTONDOWN && m.Msg <= NativeMethods.WM_NCMBUTTONDBLCLK) { 18748if (m.Msg >= NativeMethods.WM_KEYFIRST && m.Msg <= NativeMethods.WM_KEYLAST) { 18808return NativeMethods.E_INVALIDARG; 18811return NativeMethods.S_OK; 18818return NativeMethods.S_OK; 18878if (NativeMethods.Succeeded(hr) 18947NativeMethods.tagFONTDESC fontDesc = new NativeMethods.tagFONTDESC(); 18948NativeMethods.LOGFONT logFont = new NativeMethods.LOGFONT(); 18979if (NativeMethods.Failed(hr)) { 19023private NativeMethods.tagOLEVERB[] verbs; 19026internal ActiveXVerbEnum(NativeMethods.tagOLEVERB[] verbs) { 19031public int Next(int celt, NativeMethods.tagOLEVERB rgelt, int[] pceltFetched) { 19063return(celt == 0 ? NativeMethods.S_OK : NativeMethods.S_FALSE); 19069return NativeMethods.S_OK; 19073return NativeMethods.S_FALSE; 19228HandleRef hBitmapDC = NativeMethods.NullHandleRef; 19229HandleRef hBitmap = NativeMethods.NullHandleRef; 19230HandleRef hOriginalBmp = NativeMethods.NullHandleRef; 19231HandleRef hMetafileDC = NativeMethods.NullHandleRef; 19232NativeMethods.RECT destRect; 19238Debug.Assert(UnsafeNativeMethods.GetObjectType(hOriginalDC) == NativeMethods.OBJ_ENHMETADC, 19247destRect = new NativeMethods.RECT(0, 0, size.Width, size.Height); 19248hBitmapDC = new HandleRef(this, UnsafeNativeMethods.CreateCompatibleDC(NativeMethods.NullHandleRef)); 19250int planes = UnsafeNativeMethods.GetDeviceCaps(hBitmapDC, NativeMethods.PLANES); 19251int bitsPixel = UnsafeNativeMethods.GetDeviceCaps(hBitmapDC, NativeMethods.BITSPIXEL); 19280hBitmapDC = NativeMethods.NullHandleRef; 19281hBitmap = NativeMethods.NullHandleRef; 19282hOriginalBmp = NativeMethods.NullHandleRef; 19293private unsafe bool DICopy(HandleRef hdcDest, HandleRef hdcSrc, NativeMethods.RECT rect, bool bStretch) { 19312NativeMethods.BITMAP bmp = new NativeMethods.BITMAP(); 19317NativeMethods.BITMAPINFO_FLAT lpbmi = new NativeMethods.BITMAPINFO_FLAT(); 19318lpbmi.bmiHeader_biSize = Marshal.SizeOf(typeof(NativeMethods.BITMAPINFOHEADER)); 19323lpbmi.bmiHeader_biCompression = NativeMethods.BI_RGB; 19329lpbmi.bmiColors = new byte[NativeMethods.BITMAPINFO_MAX_COLORSIZE*4]; 19335byte[] aj = new byte[Marshal.SizeOf(typeof(NativeMethods.PALETTEENTRY)) * 256]; 19340NativeMethods.RGBQUAD* prgb = (NativeMethods.RGBQUAD*)pcolors; 19341NativeMethods.PALETTEENTRY* lppe = (NativeMethods.PALETTEENTRY*)ppal; 19363ref lpbmi, NativeMethods.DIB_RGB_COLORS); 19387lpBits, ref lpbmi, NativeMethods.DIB_RGB_COLORS, NativeMethods.SRCCOPY); 19388if (iRet == NativeMethods.GDI_ERROR) return fSuccess; 19407private static IntPtr oleAccAvailable = NativeMethods.InvalidIntPtr; 19646if (oleAccAvailable == NativeMethods.InvalidIntPtr) { 19873UnsafeNativeMethods.NotifyWinEvent((int)accEvent, new HandleRef(this, Handle), NativeMethods.OBJID_CLIENT, 0); 19887UnsafeNativeMethods.NotifyWinEvent((int)accEvent, new HandleRef(this, Handle), NativeMethods.OBJID_CLIENT, childID + 1); 19916return RaiseAutomationEvent(NativeMethods.UIA_LiveRegionChangedEventId); 19928if (AccessibilityImprovements.Level3 && propertyID == NativeMethods.UIA_LiveSettingPropertyId && Owner is IAutomationLiveRegion) { 19934case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 19936case NativeMethods.UIA_IsOffscreenPropertyId: 19937case NativeMethods.UIA_IsPasswordPropertyId: 19939case NativeMethods.UIA_AccessKeyPropertyId: 19941case NativeMethods.UIA_HelpTextPropertyId: 19992System.Internal.HandleCollector.Add(handle, NativeMethods.CommonHandles.GDI);
winforms\Managed\System\WinForms\Control.Ime.cs (31)
426focusHandle = UnsafeNativeMethods.GetAncestor(new HandleRef(null, focusHandle), NativeMethods.GA_ROOT); 784if( wparam == NativeMethods.IMN_SETCONVERSIONMODE || wparam == NativeMethods.IMN_SETOPENSTATUS ) { 902IntPtr oldContext = UnsafeNativeMethods.ImmAssociateContext( new HandleRef( null, handle ), NativeMethods.NullHandleRef ); 1000if( ( conversion & NativeMethods.IME_CMODE_NATIVE ) != 0 ) { 1001if( ( conversion & NativeMethods.IME_CMODE_KATAKANA ) != 0 ) { 1002retval = ( ( conversion & NativeMethods.IME_CMODE_FULLSHAPE ) != 0 ) 1008retval = ( ( conversion & NativeMethods.IME_CMODE_FULLSHAPE ) != 0 ) 1015retval = ( ( conversion & NativeMethods.IME_CMODE_FULLSHAPE ) != 0 ) 1405conversion.setBits = NativeMethods.IME_CMODE_FULLSHAPE | NativeMethods.IME_CMODE_NATIVE; 1406conversion.clearBits = NativeMethods.IME_CMODE_KATAKANA; 1411conversion.setBits = NativeMethods.IME_CMODE_FULLSHAPE | NativeMethods.IME_CMODE_KATAKANA | NativeMethods.IME_CMODE_NATIVE; 1417conversion.setBits = NativeMethods.IME_CMODE_KATAKANA | NativeMethods.IME_CMODE_NATIVE; 1418conversion.clearBits = NativeMethods.IME_CMODE_FULLSHAPE; 1423conversion.setBits = NativeMethods.IME_CMODE_FULLSHAPE; 1424conversion.clearBits = NativeMethods.IME_CMODE_KATAKANA | NativeMethods.IME_CMODE_NATIVE; 1430conversion.clearBits = NativeMethods.IME_CMODE_FULLSHAPE | NativeMethods.IME_CMODE_KATAKANA | NativeMethods.IME_CMODE_NATIVE; 1435conversion.setBits = NativeMethods.IME_CMODE_FULLSHAPE | NativeMethods.IME_CMODE_NATIVE; 1441conversion.setBits = NativeMethods.IME_CMODE_NATIVE; 1442conversion.clearBits = NativeMethods.IME_CMODE_FULLSHAPE; 1447conversion.setBits = NativeMethods.IME_CMODE_NATIVE; 1448conversion.clearBits = NativeMethods.IME_CMODE_KATAKANA | NativeMethods.IME_CMODE_FULLSHAPE;
winforms\Managed\System\WinForms\ControlPaint.cs (54)
152NativeMethods.BITMAPINFOHEADER header = new NativeMethods.BITMAPINFOHEADER(); 158header.biCompression = NativeMethods.BI_RGB; 205hBitmap = SafeNativeMethods.CreateDIBSection(new HandleRef(null, hdcS), new HandleRef(null, bitmapInfo), NativeMethods.DIB_RGB_COLORS, 307IntPtr hdcS = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 310UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hdcS)); 331return System.Internal.HandleCollector.Add(colorMask, NativeMethods.CommonHandles.GDI);; 342NativeMethods.LOGBRUSH lb = new NativeMethods.LOGBRUSH(); 344lb.lbStyle = NativeMethods.BS_PATTERN; 954NativeMethods.RECT rc = NativeMethods.RECT.FromXYWH(x, y, width, height); 1120DrawFrameControl(graphics, x, y, width, height, NativeMethods.DFC_BUTTON, 1121NativeMethods.DFCS_BUTTONPUSH | (int) state, Color.Empty, Color.Empty); 1137DrawFrameControl(graphics, x, y, width, height, NativeMethods.DFC_CAPTION, 1160DrawFrameControl(graphics, x, y, width, height, NativeMethods.DFC_BUTTON, 1161NativeMethods.DFCS_BUTTONCHECK | (int) state, Color.Empty, Color.Empty); 1178DrawFrameControl(graphics, x, y, width, height, NativeMethods.DFC_SCROLL, 1179NativeMethods.DFCS_SCROLLCOMBOBOX | (int) state, Color.Empty, Color.Empty); 1278NativeMethods.RECT rcCheck = NativeMethods.RECT.FromXYWH(0, 0, rectangle.Width, rectangle.Height); 1285NativeMethods.DFC_MENU, NativeMethods.DFCS_MENUCHECK); 1361NativeMethods.RECT rcFrame = NativeMethods.RECT.FromXYWH(0, 0, width, height); 1714DrawFrameControl(graphics, x, y, width, height, NativeMethods.DFC_MENU, 1725DrawFrameControl(graphics, x, y, width, height, NativeMethods.DFC_MENU, (int)glyph, foreColor, backColor); 1741DrawFrameControl(graphics, x, y, width, height, NativeMethods.DFC_BUTTON, 1742NativeMethods.DFCS_BUTTON3STATE | (int) state, Color.Empty, Color.Empty); 1758DrawFrameControl(graphics, x, y, width, height, NativeMethods.DFC_BUTTON, 1759NativeMethods.DFCS_BUTTONRADIO | ((int)state), Color.Empty, Color.Empty); 1783IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE); 1788pen = SafeNativeMethods.CreatePen(NativeMethods.PS_DOT, 1, ColorTranslator.ToWin32(backColor)); 1793pen = SafeNativeMethods.CreatePen(NativeMethods.PS_SOLID, 2, ColorTranslator.ToWin32(backColor)); 1798IntPtr oldBrush = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, UnsafeNativeMethods.GetStockObject(NativeMethods.HOLLOW_BRUSH))); 1812UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc)); 1826IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE); 1827IntPtr pen = SafeNativeMethods.CreatePen(NativeMethods.PS_SOLID, 1, ColorTranslator.ToWin32(backColor)); 1830IntPtr oldBrush = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, UnsafeNativeMethods.GetStockObject(NativeMethods.HOLLOW_BRUSH))); 1841UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc)); 1857DrawFrameControl(graphics, x, y, width, height, NativeMethods.DFC_SCROLL, 2007IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE); 2019UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, dc)); 2067NativeMethods.LOGFONT logfont = new NativeMethods.LOGFONT();
winforms\Managed\System\WinForms\Cursor.cs (25)
184NativeMethods.RECT r = new NativeMethods.RECT(); 193NativeMethods.RECT rcClip = NativeMethods.RECT.FromXYWH(value.X, value.Y, value.Width, value.Height); 262NativeMethods.ICONINFO info = new NativeMethods.ICONINFO(); 311NativeMethods.POINT p = new NativeMethods.POINT(); 332UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXCURSOR), 333UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYCURSOR) 365return SafeNativeMethods.CopyImage(new HandleRef(this, Handle), NativeMethods.IMAGE_CURSOR, sz.Width, sz.Height, 0); 465&& imageX == 0 && imageY == 0 && rop == NativeMethods.SRCCOPY 480if (imageX == 0 && imageY == 0 && rop == NativeMethods.SRCCOPY 493if (rop == NativeMethods.SRCCOPY) { 500new HandleRef(this, handle), drawWidth, drawHeight, 0, NativeMethods.NullHandleRef, NativeMethods.DI_NORMAL); 580handle = SafeNativeMethods.LoadCursor(NativeMethods.NullHandleRef, nResourceId); 592NativeMethods.ICONINFO info = new NativeMethods.ICONINFO(); 594NativeMethods.BITMAP bmp = new NativeMethods.BITMAP(); 597UnsafeNativeMethods.GetObject(new HandleRef(null, info.hbmColor), Marshal.SizeOf(typeof(NativeMethods.BITMAP)), bmp); 602UnsafeNativeMethods.GetObject(new HandleRef(null, info.hbmMask), Marshal.SizeOf(typeof(NativeMethods.BITMAP)), bmp); 633if (picture != null && picture.GetPictureType() == NativeMethods.Ole.PICTYPE_ICON) { 640handle = SafeNativeMethods.CopyImageAsCursor(new HandleRef(this, cursorHandle), NativeMethods.IMAGE_CURSOR,
winforms\Managed\System\WinForms\Cursors.cs (14)
102appStarting = new Cursor(NativeMethods.IDC_APPSTARTING,0); 114arrow = new Cursor(NativeMethods.IDC_ARROW,0); 126cross = new Cursor(NativeMethods.IDC_CROSS,0); 138defaultCursor = new Cursor(NativeMethods.IDC_ARROW,0); 150iBeam = new Cursor(NativeMethods.IDC_IBEAM,0); 162no = new Cursor(NativeMethods.IDC_NO,0); 174sizeAll = new Cursor(NativeMethods.IDC_SIZEALL,0); 186sizeNESW = new Cursor(NativeMethods.IDC_SIZENESW,0); 198sizeNS = new Cursor(NativeMethods.IDC_SIZENS,0); 210sizeNWSE = new Cursor(NativeMethods.IDC_SIZENWSE,0); 222sizeWE = new Cursor(NativeMethods.IDC_SIZEWE,0); 234upArrow = new Cursor(NativeMethods.IDC_UPARROW,0); 246wait = new Cursor(NativeMethods.IDC_WAIT,0); 258help = new Cursor(NativeMethods.IDC_HELP,0);
winforms\Managed\System\WinForms\DataFormats.cs (16)
328new Format(UnicodeText, NativeMethods.CF_UNICODETEXT), 329new Format(Text, NativeMethods.CF_TEXT), 330new Format(Bitmap, NativeMethods.CF_BITMAP), 331new Format(MetafilePict, NativeMethods.CF_METAFILEPICT), 332new Format(EnhancedMetafile, NativeMethods.CF_ENHMETAFILE), 333new Format(Dif, NativeMethods.CF_DIF), 334new Format(Tiff, NativeMethods.CF_TIFF), 335new Format(OemText, NativeMethods.CF_OEMTEXT), 336new Format(Dib, NativeMethods.CF_DIB), 337new Format(Palette, NativeMethods.CF_PALETTE), 338new Format(PenData, NativeMethods.CF_PENDATA), 339new Format(Riff, NativeMethods.CF_RIFF), 340new Format(WaveAudio, NativeMethods.CF_WAVE), 341new Format(SymbolicLink, NativeMethods.CF_SYLK), 342new Format(FileDrop, NativeMethods.CF_HDROP), 343new Format(Locale, NativeMethods.CF_LOCALE)
winforms\Managed\System\WinForms\DataGrid.cs (17)
148private NativeMethods.RECT[] cachedScrollableRegion = null; 547DispId(NativeMethods.ActiveX.DISPID_BORDERSTYLE), 2287NativeMethods.RECT[] rects = CreateScrollableRegion(scroll); 2293private void ScrollRectangles(NativeMethods.RECT[] rects, int change) { 2295NativeMethods.RECT scroll; 4379float movePerc = (float)wheelDelta / (float)NativeMethods.WHEEL_DELTA; 5755private NativeMethods.RECT[] CreateScrollableRegion(Rectangle scroll) { 5857IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 5860SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT); 8210if (m.Msg == NativeMethods.WM_KEYDOWN) { 8236} else if (m.Msg == NativeMethods.WM_KEYUP) { 8628NativeMethods.RECT scrollArea = NativeMethods.RECT.FromXYWH(rowsRect.X, rowsRect.Y, rowsRect.Width, rowsRect.Height); 8881NativeMethods.RECT scrollRECT = NativeMethods.RECT.FromXYWH(underParentRows.X, underParentRows.Y - layout.ParentRows.Height, underParentRows.Width, underParentRows.Height + layout.ParentRows.Height);
winforms\Managed\System\WinForms\DataGridTextBox.cs (8)
55if (m.Msg == NativeMethods.WM_PASTE || m.Msg == NativeMethods.WM_CUT || m.Msg == NativeMethods.WM_CLEAR) { 112if (m.Msg == NativeMethods.WM_CHAR) 117if (m.Msg == NativeMethods.WM_CHAR) { 126if (m.Msg == NativeMethods.WM_KEYUP) 195if (m.Msg == NativeMethods.WM_CHAR) return true; 206if (m.Msg == NativeMethods.WM_CHAR) return true;
winforms\Managed\System\WinForms\DataGridToolTip.cs (20)
38NativeMethods.INITCOMMONCONTROLSEX icc = new NativeMethods.INITCOMMONCONTROLSEX(); 39icc.dwICC = NativeMethods.ICC_TAB_CLASSES; 44cparams.ClassName = NativeMethods.TOOLTIPS_CLASS; 45cparams.Style = NativeMethods.TTS_ALWAYSTIP; 49UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 50SafeNativeMethods.SetWindowPos(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.HWND_NOTOPMOST, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOACTIVATE); 51UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETDELAYTIME, NativeMethods.TTDT_INITIAL, 0); 66NativeMethods.TOOLINFO_T toolInfo = new NativeMethods.TOOLINFO_T(); 71toolInfo.rect = NativeMethods.RECT.FromXYWH(iconBounds.X, iconBounds.Y, iconBounds.Width, iconBounds.Height); 72toolInfo.uFlags = NativeMethods.TTF_SUBCLASS; 73UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_ADDTOOL, 0, toolInfo); 78NativeMethods.TOOLINFO_T toolInfo = new NativeMethods.TOOLINFO_T(); 82UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_DELTOOL, 0, toolInfo);
winforms\Managed\System\WinForms\DataGridView.cs (2)
398private NativeMethods.RECT[] cachedScrollableRegion; 3468NativeMethods.RECT[] rects = CreateScrollableRegion(rectTmp);
winforms\Managed\System\WinForms\DataGridViewAccessibleObject.cs (31)
283case NativeMethods.UIA_NamePropertyId: 285case NativeMethods.UIA_HasKeyboardFocusPropertyId: 287case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 289case NativeMethods.UIA_IsEnabledPropertyId: 291case NativeMethods.UIA_IsControlElementPropertyId: 293case NativeMethods.UIA_IsTablePatternAvailablePropertyId: 294case NativeMethods.UIA_IsGridPatternAvailablePropertyId: 296case NativeMethods.UIA_ControlTypePropertyId: 297return NativeMethods.UIA_TableControlTypeId; 298case NativeMethods.UIA_ItemStatusPropertyId: 328if (propertyID == NativeMethods.UIA_IsTablePatternAvailablePropertyId) 330return IsPatternSupported(NativeMethods.UIA_TablePatternId); 332else if (propertyID == NativeMethods.UIA_IsGridPatternAvailablePropertyId) 334return IsPatternSupported(NativeMethods.UIA_GridPatternId); 342if (patternId == NativeMethods.UIA_TablePatternId || 343patternId == NativeMethods.UIA_GridPatternId) 559return patternId.Equals(NativeMethods.UIA_LegacyIAccessiblePatternId); 566case NativeMethods.UIA_NamePropertyId: 568case NativeMethods.UIA_ControlTypePropertyId: 569return NativeMethods.UIA_PaneControlTypeId; 570case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 572case NativeMethods.UIA_HasKeyboardFocusPropertyId: 574case NativeMethods.UIA_IsEnabledPropertyId: 576case NativeMethods.UIA_IsOffscreenPropertyId: 578case NativeMethods.UIA_IsControlElementPropertyId: 579case NativeMethods.UIA_IsContentElementPropertyId: 581case NativeMethods.UIA_IsPasswordPropertyId: 583case NativeMethods.UIA_AccessKeyPropertyId: 585case NativeMethods.UIA_HelpTextPropertyId: 587case NativeMethods.UIA_IsLegacyIAccessiblePatternAvailablePropertyId: 589case NativeMethods.UIA_ProviderDescriptionPropertyId:
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (2)
1156if (propertyID == NativeMethods.UIA_ControlTypePropertyId) 1158return NativeMethods.UIA_ButtonControlTypeId;
winforms\Managed\System\WinForms\DataGridViewCell.cs (20)
5426RaiseAutomationEvent(NativeMethods.UIA_AutomationFocusChangedEventId); 5532case NativeMethods.UIA_NamePropertyId: 5534case NativeMethods.UIA_HasKeyboardFocusPropertyId: 5536case NativeMethods.UIA_IsEnabledPropertyId: 5538case NativeMethods.UIA_AutomationIdPropertyId: 5540case NativeMethods.UIA_HelpTextPropertyId: 5542case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 5544case NativeMethods.UIA_IsPasswordPropertyId: 5546case NativeMethods.UIA_IsOffscreenPropertyId: 5548case NativeMethods.UIA_AccessKeyPropertyId: 5550case NativeMethods.UIA_GridItemContainingGridPropertyId: 5555if (propertyID == NativeMethods.UIA_IsTableItemPatternAvailablePropertyId) 5557return IsPatternSupported(NativeMethods.UIA_TableItemPatternId); 5559else if (propertyID == NativeMethods.UIA_IsGridItemPatternAvailablePropertyId) 5561return IsPatternSupported(NativeMethods.UIA_GridItemPatternId); 5570(patternId.Equals(NativeMethods.UIA_LegacyIAccessiblePatternId) || 5571patternId.Equals(NativeMethods.UIA_InvokePatternId) || 5572patternId.Equals(NativeMethods.UIA_ValuePatternId))) 5577if ((patternId == NativeMethods.UIA_TableItemPatternId || 5578patternId == NativeMethods.UIA_GridItemPatternId) &&
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (9)
1433NativeMethods.RECT rcCheck = NativeMethods.RECT.FromXYWH(0, 0, fullSize.Width, fullSize.Height); 1442NativeMethods.DFC_MENU, NativeMethods.DFCS_MENUCHECK); 1947if (propertyID == NativeMethods.UIA_IsTogglePatternAvailablePropertyId) { 1948return (Object)IsPatternSupported(NativeMethods.UIA_TogglePatternId); 1950else if (propertyID == NativeMethods.UIA_ControlTypePropertyId && AccessibilityImprovements.Level2) 1952return NativeMethods.UIA_CheckBoxControlTypeId; 1959if (patternId == NativeMethods.UIA_TogglePatternId) {
winforms\Managed\System\WinForms\DataGridViewColumnHeaderCell.cs (12)
1582return patternId.Equals(NativeMethods.UIA_LegacyIAccessiblePatternId) || 1583patternId.Equals(NativeMethods.UIA_InvokePatternId); 1592case NativeMethods.UIA_NamePropertyId: 1594case NativeMethods.UIA_ControlTypePropertyId: 1595return NativeMethods.UIA_HeaderControlTypeId; 1596case NativeMethods.UIA_IsEnabledPropertyId: 1598case NativeMethods.UIA_HelpTextPropertyId: 1600case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 1602case NativeMethods.UIA_HasKeyboardFocusPropertyId: 1603case NativeMethods.UIA_IsPasswordPropertyId: 1605case NativeMethods.UIA_IsOffscreenPropertyId: 1607case NativeMethods.UIA_AccessKeyPropertyId:
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (5)
840UnsafeNativeMethods.SendMessage(new HandleRef(comboBox, comboBox.Handle), NativeMethods.CB_SETDROPPEDWIDTH, cachedDropDownWidth, 0); 847int dropDownWidth = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(comboBox, comboBox.Handle), NativeMethods.CB_GETDROPPEDWIDTH, 0, 0)); 850UnsafeNativeMethods.SendMessage(new HandleRef(comboBox, comboBox.Handle), NativeMethods.CB_SETDROPPEDWIDTH, this.DropDownWidth, 0); 3267if (propertyID == NativeMethods.UIA_ControlTypePropertyId) 3269return NativeMethods.UIA_ComboBoxControlTypeId;
winforms\Managed\System\WinForms\DataGridViewComboBoxEditingControl.cs (3)
246if (patternId == NativeMethods.UIA_ExpandCollapsePatternId) 256if (propertyID == NativeMethods.UIA_IsExpandCollapsePatternAvailablePropertyId) 258return IsPatternSupported(NativeMethods.UIA_ExpandCollapsePatternId);
winforms\Managed\System\WinForms\DataGridViewEditingControl.cs (3)
105if (AccessibilityImprovements.Level3 && patternId == NativeMethods.UIA_ExpandCollapsePatternId) 119if (AccessibilityImprovements.Level3 && propertyID == NativeMethods.UIA_IsExpandCollapsePatternAvailablePropertyId) 121return IsPatternSupported(NativeMethods.UIA_ExpandCollapsePatternId);
winforms\Managed\System\WinForms\DataGridViewImageCell.cs (4)
1074if (propertyID == NativeMethods.UIA_ControlTypePropertyId) 1076return NativeMethods.UIA_ImageControlTypeId; 1079if (AccessibilityImprovements.Level3 && propertyID == NativeMethods.UIA_IsInvokePatternAvailablePropertyId) 1089if (AccessibilityImprovements.Level3 && patternId == NativeMethods.UIA_InvokePatternId)
winforms\Managed\System\WinForms\DataGridViewLinkCell.cs (2)
1226if (propertyID == NativeMethods.UIA_ControlTypePropertyId) 1228return NativeMethods.UIA_HyperlinkControlTypeId;
winforms\Managed\System\WinForms\DataGridViewMethods.cs (55)
5428private NativeMethods.RECT[] CreateScrollableRegion(Rectangle scroll) 5767IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 5771SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y, r.Width, DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT); 5772SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y + r.Height - DATAGRIDVIEW_shadowEdgeThickness, r.Width, DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT); 5773SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT); 5774SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X + r.Width - DATAGRIDVIEW_shadowEdgeThickness, r.Y + DATAGRIDVIEW_shadowEdgeThickness, DATAGRIDVIEW_shadowEdgeThickness, r.Height - 2 * DATAGRIDVIEW_shadowEdgeThickness, NativeMethods.PATINVERT); 5788IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 5791SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT); 16924Debug.Assert(this.cumulativeVerticalWheelDelta > -NativeMethods.WHEEL_DELTA); 16925Debug.Assert(this.cumulativeVerticalWheelDelta < NativeMethods.WHEEL_DELTA); 16926Debug.Assert(this.cumulativeHorizontalWheelDelta > -NativeMethods.WHEEL_DELTA); 16927Debug.Assert(this.cumulativeHorizontalWheelDelta < NativeMethods.WHEEL_DELTA); 16934partialNotches = (float) this.cumulativeVerticalWheelDelta / (float) NativeMethods.WHEEL_DELTA; 16939partialNotches = (float) this.cumulativeHorizontalWheelDelta / (float) NativeMethods.WHEEL_DELTA; 16962this.cumulativeVerticalWheelDelta -= fullNotches * NativeMethods.WHEEL_DELTA; 16975this.cumulativeHorizontalWheelDelta -= fullNotches * NativeMethods.WHEEL_DELTA; 17014this.cumulativeVerticalWheelDelta -= (int) ((float) scrollBands * ((float) NativeMethods.WHEEL_DELTA / (float) wheelScrollLines)); 17039this.cumulativeVerticalWheelDelta -= (int) ((float) scrollBands * ((float) NativeMethods.WHEEL_DELTA / (float) wheelScrollLines)); 17068this.cumulativeHorizontalWheelDelta -= (int) ((float) scrollBands * ((float) NativeMethods.WHEEL_DELTA / (float) wheelScrollLines)); 22306if (m.Msg == NativeMethods.WM_SYSKEYDOWN || m.Msg == NativeMethods.WM_KEYDOWN) 22352(m.Msg == NativeMethods.WM_SYSCHAR || m.Msg == NativeMethods.WM_CHAR || m.Msg == NativeMethods.WM_IME_CHAR)) 22378if (m.Msg == NativeMethods.WM_CHAR) 22420if (this.editingControl != null && (m.Msg == NativeMethods.WM_KEYDOWN || m.Msg == NativeMethods.WM_SYSKEYDOWN)) 22432if (m.Msg == NativeMethods.WM_KEYDOWN || m.Msg == NativeMethods.WM_SYSKEYDOWN) 26347private void ScrollRectangles(NativeMethods.RECT[] rects, int change) 26356NativeMethods.RECT scroll; 26470NativeMethods.RECT scrollArea = NativeMethods.RECT.FromXYWH(rowsRect.X, rowsRect.Y, rowsRect.Width, rowsRect.Height); 28339AccessibilityNotifyClients(AccessibleEvents.Reorder, NativeMethods.OBJID_CLIENT, 0); 29914m.Result = (IntPtr)((long)m.Result | NativeMethods.DLGC_WANTARROWS | NativeMethods.DLGC_WANTCHARS); 29919m.Result = (IntPtr) ((long) m.Result | NativeMethods.DLGC_WANTTAB); 29930NativeMethods.NMHDR* nmhdr = (NativeMethods.NMHDR *)m.LParam; 29931if (nmhdr->code == NativeMethods.TTN_GETDISPINFO && !DesignMode) 29938UnsafeNativeMethods.SendMessage(new HandleRef(this, nmhdr->hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 29939NativeMethods.TOOLTIPTEXT ttt = (NativeMethods.TOOLTIPTEXT) m.GetLParam(typeof(NativeMethods.TOOLTIPTEXT)); 29945ttt.uFlags |= NativeMethods.TTF_RTLREADING; 29961case NativeMethods.WM_GETDLGCODE: 29964case NativeMethods.WM_LBUTTONDBLCLK: 29965case NativeMethods.WM_LBUTTONDOWN: 29977case NativeMethods.WM_NOTIFY: 29985case NativeMethods.WM_IME_STARTCOMPOSITION: 29986case NativeMethods.WM_IME_COMPOSITION:
winforms\Managed\System\WinForms\DataGridViewRow.cs (9)
2399return patternId.Equals(NativeMethods.UIA_LegacyIAccessiblePatternId); 2408case NativeMethods.UIA_NamePropertyId: 2410case NativeMethods.UIA_IsEnabledPropertyId: 2412case NativeMethods.UIA_HelpTextPropertyId: 2414case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 2415case NativeMethods.UIA_HasKeyboardFocusPropertyId: 2416case NativeMethods.UIA_IsPasswordPropertyId: 2417case NativeMethods.UIA_IsOffscreenPropertyId: 2419case NativeMethods.UIA_AccessKeyPropertyId:
winforms\Managed\System\WinForms\DataGridViewRowHeaderCell.cs (10)
1500case NativeMethods.UIA_NamePropertyId: 1502case NativeMethods.UIA_ControlTypePropertyId: 1503return NativeMethods.UIA_HeaderControlTypeId; 1504case NativeMethods.UIA_IsEnabledPropertyId: 1506case NativeMethods.UIA_HelpTextPropertyId: 1508case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 1510case NativeMethods.UIA_HasKeyboardFocusPropertyId: 1511case NativeMethods.UIA_IsPasswordPropertyId: 1513case NativeMethods.UIA_IsOffscreenPropertyId: 1515case NativeMethods.UIA_AccessKeyPropertyId:
winforms\Managed\System\WinForms\DataGridViewTextBoxCell.cs (2)
847if (propertyID == NativeMethods.UIA_ControlTypePropertyId) 849return NativeMethods.UIA_EditControlTypeId;
winforms\Managed\System\WinForms\DataGridViewTextBoxEditingControl.cs (9)
266AccessibilityObject.RaiseAutomationEvent(NativeMethods.UIA_AutomationFocusChangedEventId); 294if (m.Msg == NativeMethods.WM_CHAR && 305if (m.Msg == NativeMethods.WM_CHAR && 314if (m.Msg == NativeMethods.WM_KEYDOWN && ModifierKeys == Keys.Control) 421case NativeMethods.UIA_ControlTypePropertyId: 422return NativeMethods.UIA_EditControlTypeId; 423case NativeMethods.UIA_NamePropertyId: 425case NativeMethods.UIA_IsValuePatternAvailablePropertyId: 434if (patternId == NativeMethods.UIA_ValuePatternId)
winforms\Managed\System\WinForms\DataGridViewTopLeftHeaderCell.cs (9)
709case NativeMethods.UIA_NamePropertyId: 711case NativeMethods.UIA_ControlTypePropertyId: 712return NativeMethods.UIA_HeaderControlTypeId; 713case NativeMethods.UIA_IsEnabledPropertyId: 715case NativeMethods.UIA_HelpTextPropertyId: 717case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 718case NativeMethods.UIA_IsPasswordPropertyId: 719case NativeMethods.UIA_IsOffscreenPropertyId: 721case NativeMethods.UIA_AccessKeyPropertyId:
winforms\Managed\System\WinForms\DataGridViewTopRowAccessibleObject.cs (11)
269if (AccessibilityImprovements.Level3 && patternId.Equals(NativeMethods.UIA_LegacyIAccessiblePatternId)) 283case NativeMethods.UIA_NamePropertyId: 285case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 286case NativeMethods.UIA_HasKeyboardFocusPropertyId: 288case NativeMethods.UIA_IsEnabledPropertyId: 290case NativeMethods.UIA_IsOffscreenPropertyId: 292case NativeMethods.UIA_IsContentElementPropertyId: 294case NativeMethods.UIA_IsPasswordPropertyId: 296case NativeMethods.UIA_AccessKeyPropertyId: 297case NativeMethods.UIA_HelpTextPropertyId: 299case NativeMethods.UIA_IsLegacyIAccessiblePatternAvailablePropertyId:
winforms\Managed\System\WinForms\DataObject.cs (64)
146IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 170UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 605if (NativeMethods.Failed(hr)) { 660return (NativeMethods.E_NOTIMPL); 678Marshal.ThrowExceptionForHR(NativeMethods.E_NOTIMPL); 717throw new ExternalException(SR.GetString(SR.ExternalException), NativeMethods.E_NOTIMPL); 760medium.unionmember = UnsafeNativeMethods.GlobalAlloc(NativeMethods.GMEM_MOVEABLE 761| NativeMethods.GMEM_DDESHARE 762| NativeMethods.GMEM_ZEROINIT, 825return NativeMethods.S_FALSE; 844return NativeMethods.S_OK; 869int hr = NativeMethods.E_FAIL; 954handle = UnsafeNativeMethods.GlobalAlloc(NativeMethods.GMEM_MOVEABLE | NativeMethods.GMEM_DDESHARE, size); 956return (NativeMethods.E_OUTOFMEMORY); 960return (NativeMethods.E_OUTOFMEMORY); 971return NativeMethods.S_OK; 981return NativeMethods.S_OK; 984return NativeMethods.S_OK; 987return (NativeMethods.E_INVALIDARG); 1007sizeInBytes += NativeMethods.Util.GetPInvokeStringLength(files[i]) + 1; 1016NativeMethods.GMEM_MOVEABLE | NativeMethods.GMEM_DDESHARE); 1018return (NativeMethods.E_OUTOFMEMORY); 1022return (NativeMethods.E_OUTOFMEMORY); 1048int pinvokeLen = NativeMethods.Util.GetPInvokeStringLength(files[i]); 1066return NativeMethods.S_OK; 1077return (NativeMethods.E_INVALIDARG); 1084NativeMethods.GMEM_MOVEABLE 1085| NativeMethods.GMEM_DDESHARE 1086| NativeMethods.GMEM_ZEROINIT); 1088return (NativeMethods.E_OUTOFMEMORY); 1092return (NativeMethods.E_OUTOFMEMORY); 1110NativeMethods.GMEM_MOVEABLE 1111| NativeMethods.GMEM_DDESHARE 1112| NativeMethods.GMEM_ZEROINIT); 1114return (NativeMethods.E_OUTOFMEMORY); 1118return (NativeMethods.E_OUTOFMEMORY); 1127return NativeMethods.S_OK; 1132return (NativeMethods.E_INVALIDARG); 1141NativeMethods.GMEM_MOVEABLE 1142| NativeMethods.GMEM_DDESHARE 1143| NativeMethods.GMEM_ZEROINIT); 1145return (NativeMethods.E_OUTOFMEMORY); 1149return (NativeMethods.E_OUTOFMEMORY); 1158return NativeMethods.S_OK; 1330return NativeMethods.S_FALSE; 1332return NativeMethods.S_OK; 1338return NativeMethods.S_FALSE; 1341return NativeMethods.S_OK; 1347return NativeMethods.S_OK; 1400if (NativeMethods.S_OK != QueryGetDataUnsafe(ref formatetc)){ 1420NativeMethods.STATSTG sstg = new NativeMethods.STATSTG(); 1421pStream.Stat(sstg, NativeMethods.STATFLAG_DEFAULT ); 1424IntPtr hglobal = UnsafeNativeMethods.GlobalAlloc(NativeMethods.GMEM_MOVEABLE 1425| NativeMethods.GMEM_DDESHARE 1426| NativeMethods.GMEM_ZEROINIT, 1548if (NativeMethods.S_OK == QueryGetDataUnsafe(ref formatetc)) { 1604if (NativeMethods.S_OK == QueryGetDataUnsafe(ref formatetc)) { 1630System.Internal.HandleCollector.Add(medium.unionmember, NativeMethods.CommonHandles.GDI); 1695throw new ExternalException(SR.GetString(SR.ExternalException), NativeMethods.E_OUTOFMEMORY); 1840StringBuilder sb = new StringBuilder(NativeMethods.MAX_PATH); 1996return (hr == NativeMethods.S_OK);
winforms\Managed\System\WinForms\DataStreamFromComStream.cs (1)
120comStream.Commit(NativeMethods.STGC_DEFAULT);
winforms\Managed\System\WinForms\DateTimePicker.cs (93)
66private const int TIMEFORMAT_NOUPDOWN = NativeMethods.DTS_TIMEFORMAT & (~NativeMethods.DTS_UPDOWN); 256SetControlColor(NativeMethods.MCSC_TEXT, value); 323SetControlColor(NativeMethods.MCSC_TITLEBK, value); 348SetControlColor(NativeMethods.MCSC_TITLETEXT, value); 373SetControlColor(NativeMethods.MCSC_TRAILINGTEXT, value); 398SetControlColor(NativeMethods.MCSC_MONTHBK, value); 417NativeMethods.SYSTEMTIME sys = new NativeMethods.SYSTEMTIME(); 418int gdt = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_GETSYSTEMTIME, 0, sys); 419return gdt == NativeMethods.GDT_VALID; 429int gdt = NativeMethods.GDT_VALID; 430NativeMethods.SYSTEMTIME sys = DateTimePicker.DateTimeToSysTime(Value); 431UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 434int gdt = NativeMethods.GDT_NONE; 435NativeMethods.SYSTEMTIME sys = null; 436UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 464cp.ClassName = NativeMethods.WC_DATETIMEPICK; 470cp.Style |= NativeMethods.DTS_LONGDATEFORMAT; 481cp.ExStyle |= NativeMethods.WS_EX_CLIENTEDGE; 485cp.ExStyle |= NativeMethods.WS_EX_LAYOUTRTL; 487cp.ExStyle &= ~(NativeMethods.WS_EX_RTLREADING | NativeMethods.WS_EX_RIGHT | NativeMethods.WS_EX_LEFTSCROLLBAR); 518SendMessage(NativeMethods.DTM_SETFORMAT, 0, customFormat); 572return((style & NativeMethods.DTS_RIGHTALIGN) != 0) 583SetStyleBit((value == LeftRightAlignment.Right), NativeMethods.DTS_RIGHTALIGN); 932return(style & NativeMethods.DTS_SHOWNONE) != 0; 935SetStyleBit(value, NativeMethods.DTS_SHOWNONE); 951return(style & NativeMethods.DTS_UPDOWN) != 0; 955SetStyleBit(value, NativeMethods.DTS_UPDOWN); 1034int gdt = NativeMethods.GDT_VALID; 1035NativeMethods.SYSTEMTIME sys = DateTimePicker.DateTimeToSysTime(value); 1036UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1129NativeMethods.INITCOMMONCONTROLSEX icc = new NativeMethods.INITCOMMONCONTROLSEX(); 1130icc.dwICC = NativeMethods.ICC_DATE_CLASSES; 1147int gdt = NativeMethods.GDT_VALID; 1148NativeMethods.SYSTEMTIME sys = DateTimePicker.DateTimeToSysTime(Value); 1149UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1152int gdt = NativeMethods.GDT_NONE; 1153NativeMethods.SYSTEMTIME sys = null; 1154UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1158SendMessage(NativeMethods.DTM_SETFORMAT, 0, customFormat); 1378int gdt = NativeMethods.GDT_VALID; 1379NativeMethods.SYSTEMTIME sys = DateTimePicker.DateTimeToSysTime(value); 1380UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETSYSTEMTIME, gdt, sys); 1397SendMessage(NativeMethods.DTM_SETMCCOLOR, colorIndex, ColorTranslator.ToWin32(value)); 1407SendMessage(NativeMethods.DTM_SETMCFONT, CalendarFontHandle, NativeMethods.InvalidIntPtr); 1416SetControlColor(NativeMethods.MCSC_MONTHBK, calendarMonthBackground); 1417SetControlColor(NativeMethods.MCSC_TEXT, calendarForeColor); 1418SetControlColor(NativeMethods.MCSC_TITLEBK, calendarTitleBackColor); 1419SetControlColor(NativeMethods.MCSC_TITLETEXT, calendarTitleForeColor); 1420SetControlColor(NativeMethods.MCSC_TRAILINGTEXT, calendarTrailingText); 1436NativeMethods.SYSTEMTIMEARRAY sa = new NativeMethods.SYSTEMTIMEARRAY(); 1438flags |= NativeMethods.GDTR_MIN | NativeMethods.GDTR_MAX; 1439NativeMethods.SYSTEMTIME sys = DateTimePicker.DateTimeToSysTime(min); 1457UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.DTM_SETRANGE, flags, sa); 1573NativeMethods.EnumChildrenCallback cb = new NativeMethods.EnumChildrenCallback(c.enumChildren); 1574UnsafeNativeMethods.EnumChildWindows(new HandleRef(this, Handle), cb, NativeMethods.NullHandleRef); 1612NativeMethods.NMDATETIMECHANGE nmdtc = (NativeMethods.NMDATETIMECHANGE)m.GetLParam(typeof(NativeMethods.NMDATETIMECHANGE)); 1615if (nmdtc.dwFlags != NativeMethods.GDT_NONE) { 1636IntPtr handle = SendMessage(NativeMethods.DTM_GETMONTHCAL, 0,0); 1638int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_EXSTYLE))); 1639style |= NativeMethods.WS_EX_LAYOUTRTL | NativeMethods.WS_EX_NOINHERITLAYOUT; 1640style &= ~(NativeMethods.WS_EX_RIGHT | NativeMethods.WS_EX_RTLREADING); 1641UnsafeNativeMethods.SetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_EXSTYLE, new HandleRef(this, (IntPtr)style)); 1664NativeMethods.NMHDR nmhdr = (NativeMethods.NMHDR)m.GetLParam(typeof(NativeMethods.NMHDR)); 1666case NativeMethods.DTN_CLOSEUP: 1669case NativeMethods.DTN_DATETIMECHANGE: 1672case NativeMethods.DTN_DROPDOWN: 1687case NativeMethods.WM_LBUTTONDOWN: 1693case NativeMethods.WM_REFLECT + NativeMethods.WM_NOTIFY: 1697case NativeMethods.WM_WINDOWPOSCHANGED: 1711internal static NativeMethods.SYSTEMTIME DateTimeToSysTime(DateTime time) { 1712NativeMethods.SYSTEMTIME sys = new NativeMethods.SYSTEMTIME(); 1728internal static DateTime SysTimeToDateTime(NativeMethods.SYSTEMTIME s) { 1830case NativeMethods.UIA_IsTogglePatternAvailablePropertyId: 1831return IsPatternSupported(NativeMethods.UIA_TogglePatternId); 1832case NativeMethods.UIA_LocalizedControlTypePropertyId: 1840if (patternId == NativeMethods.UIA_TogglePatternId && ((DateTimePicker)Owner).ShowCheckBox) {
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (34)
674cp.ExStyle |= NativeMethods.WS_EX_STATICEDGE; 701private void DrawTreeItem(string itemText, int imageIndex, IntPtr dc, NativeMethods.RECT rcIn, 717SafeNativeMethods.SetBkMode(new HandleRef(null, dc), NativeMethods.TRANSPARENT); 721IntUnsafeNativeMethods.ExtTextOut(new HandleRef(null, dc), 0, 0, NativeMethods.ETO_CLIPPED | NativeMethods.ETO_OPAQUE, ref rc, null, 0, null); 738NativeMethods.ILD_TRANSPARENT); 750IntUnsafeNativeMethods.ExtTextOut(new HandleRef(null, dc), 0, 0, NativeMethods.ETO_OPAQUE, ref rc2, null, 0, null); 753IntUnsafeNativeMethods.ExtTextOut(new HandleRef(null, dc), 0, 0, NativeMethods.ETO_OPAQUE, ref rc2, null, 0, null); 761IntUnsafeNativeMethods.ExtTextOut(new HandleRef(null, dc), 0, 0, NativeMethods.ETO_OPAQUE, ref rc2, null, 0, null); 764IntUnsafeNativeMethods.ExtTextOut(new HandleRef(null, dc), 0, 0, NativeMethods.ETO_OPAQUE, ref rc2, null, 0, null); 778itemHeight = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_GETITEMHEIGHT, 0, 0); 780UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_SETITEMHEIGHT, itemHeight, 0); 788NativeMethods.NMTVCUSTOMDRAW nmtvcd = (NativeMethods.NMTVCUSTOMDRAW)m.GetLParam(typeof(NativeMethods.NMTVCUSTOMDRAW)); 791case NativeMethods.CDDS_PREPAINT: 792m.Result = (IntPtr)(NativeMethods.CDRF_NOTIFYITEMDRAW | NativeMethods.CDRF_NOTIFYPOSTPAINT); 794case NativeMethods.CDDS_ITEMPREPAINT: 801if (((itemState & NativeMethods.CDIS_HOT) != 0) || 802((itemState & NativeMethods.CDIS_FOCUS) != 0)) 804if ((itemState & NativeMethods.CDIS_SELECTED) != 0) 811m.Result = (IntPtr)NativeMethods.CDRF_SKIPDEFAULT; 815case NativeMethods.CDDS_POSTPAINT: 816m.Result = (IntPtr)NativeMethods.CDRF_SKIPDEFAULT; 819m.Result = (IntPtr)NativeMethods.CDRF_DODEFAULT; 833private void FillRectDither(IntPtr dc, NativeMethods.RECT rc) { 842SafeNativeMethods.PatBlt(new HandleRef(null, dc), rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, NativeMethods.PATCOPY); 850if (m.Msg == NativeMethods.WM_REFLECT + NativeMethods.WM_NOTIFY) { 851NativeMethods.NMHDR nmh = (NativeMethods.NMHDR)m.GetLParam(typeof(NativeMethods.NMHDR)); 852if (nmh.code == NativeMethods.NM_CUSTOMDRAW) {
winforms\Managed\System\WinForms\Design\ComponentEditorPage.cs (3)
157cp.Style &= ~(NativeMethods.WS_BORDER | NativeMethods.WS_OVERLAPPED | NativeMethods.WS_DLGFRAME);
winforms\Managed\System\WinForms\DrawItemState.cs (11)
34Checked = NativeMethods.ODS_CHECKED, 41ComboBoxEdit = NativeMethods.ODS_COMBOBOXEDIT, 48Default = NativeMethods.ODS_DEFAULT, 55Disabled = NativeMethods.ODS_DISABLED, 62Focus = NativeMethods.ODS_FOCUS, 71Grayed = NativeMethods.ODS_GRAYED, 78HotLight = NativeMethods.ODS_HOTLIGHT, 85Inactive = NativeMethods.ODS_INACTIVE, 92NoAccelerator = NativeMethods.ODS_NOACCEL, 99NoFocusRect = NativeMethods.ODS_NOFOCUSRECT, 106Selected = NativeMethods.ODS_SELECTED,
winforms\Managed\System\WinForms\DropSource.cs (3)
34else if ((grfKeyState & NativeMethods.MK_LBUTTON) == 0 35&& (grfKeyState & NativeMethods.MK_RBUTTON) == 0 36&& (grfKeyState & NativeMethods.MK_MBUTTON) == 0) {
winforms\Managed\System\WinForms\DropTarget.cs (11)
36private DragEventArgs CreateDragEventArgs(object pDataObj, int grfKeyState, NativeMethods.POINTL pt, int pdwEffect) { 64NativeMethods.POINTL ptl = new NativeMethods.POINTL(); 79return NativeMethods.S_OK; 83NativeMethods.POINTL ptl = new NativeMethods.POINTL(); 91return NativeMethods.S_OK; 96return NativeMethods.S_OK; 100NativeMethods.POINTL ptl = new NativeMethods.POINTL(); 116return NativeMethods.S_OK;
winforms\Managed\System\WinForms\ErrorProvider.cs (48)
917NativeMethods.TOOLINFO_T toolInfo = new NativeMethods.TOOLINFO_T(); 922toolInfo.uFlags = NativeMethods.TTF_SUBCLASS; 923UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_ADDTOOL, 0, toolInfo); 948cparams.Style = NativeMethods.WS_VISIBLE | NativeMethods.WS_CHILD; 949cparams.ClassStyle = NativeMethods.CS_DBLCLKS; 958NativeMethods.INITCOMMONCONTROLSEX icc = new NativeMethods.INITCOMMONCONTROLSEX(); 959icc.dwICC = NativeMethods.ICC_TAB_CLASSES; 964cparams.ClassName = NativeMethods.TOOLTIPS_CLASS; 965cparams.Style = NativeMethods.TTS_ALWAYSTIP; 969UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 970SafeNativeMethods.SetWindowPos(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOACTIVATE); 971UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETDELAYTIME, NativeMethods.TTDT_INITIAL, 0); 995NativeMethods.HWND_TOP, 1000NativeMethods.SWP_HIDEWINDOW 1001| NativeMethods.SWP_NOSIZE 1002| NativeMethods.SWP_NOMOVE); 1065NativeMethods.PAINTSTRUCT ps = new NativeMethods.PAINTSTRUCT(); 1074SafeNativeMethods.DrawIconEx(new HandleRef(this, mirrordc.Hdc), bounds.X - windowBounds.X, bounds.Y - windowBounds.Y, new HandleRef(provider.Region, provider.Region.IconHandle), bounds.Width, bounds.Height, 0, NativeMethods.NullHandleRef, NativeMethods.DI_NORMAL); 1131NativeMethods.TOOLINFO_T toolInfo = new NativeMethods.TOOLINFO_T(); 1135UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_DELTOOL, 0, toolInfo); 1221NativeMethods.TOOLINFO_T toolInfo = new NativeMethods.TOOLINFO_T(); 1226toolInfo.rect = NativeMethods.RECT.FromXYWH(iconBounds.X, iconBounds.Y, iconBounds.Width, iconBounds.Height); 1227toolInfo.uFlags = NativeMethods.TTF_SUBCLASS; 1229toolInfo.uFlags |= NativeMethods.TTF_RTLREADING; 1231UnsafeNativeMethods.SendMessage(new HandleRef(tipWindow, tipWindow.Handle), NativeMethods.TTM_SETTOOLINFO, 0, toolInfo); 1251System.Internal.HandleCollector.Add(windowRegionHandle, NativeMethods.CommonHandles.GDI); 1278SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOP, windowBounds.X, windowBounds.Y, 1279windowBounds.Width, windowBounds.Height, NativeMethods.SWP_NOACTIVATE); 1289case NativeMethods.WM_NOTIFY: 1290NativeMethods.NMHDR nmhdr = (NativeMethods.NMHDR)m.GetLParam(typeof(NativeMethods.NMHDR)); 1291if (nmhdr.code == NativeMethods.TTN_SHOW || nmhdr.code == NativeMethods.TTN_POP) 1293OnToolTipVisibilityChanging(nmhdr.idFrom, nmhdr.code == NativeMethods.TTN_SHOW); 1296case NativeMethods.WM_ERASEBKGND: 1298case NativeMethods.WM_PAINT:
winforms\Managed\System\WinForms\FileDialog.cs (49)
122return GetOption(NativeMethods.OFN_FILEMUSTEXIST); 128SetOption(NativeMethods.OFN_FILEMUSTEXIST, value); 146return GetOption(NativeMethods.OFN_PATHMUSTEXIST); 152SetOption(NativeMethods.OFN_PATHMUSTEXIST, value); 199return !GetOption(NativeMethods.OFN_NODEREFERENCELINKS); 204SetOption(NativeMethods.OFN_NODEREFERENCELINKS, !value); 466return options & (NativeMethods.OFN_READONLY | NativeMethods.OFN_HIDEREADONLY | 467NativeMethods.OFN_NOCHANGEDIR | NativeMethods.OFN_SHOWHELP | NativeMethods.OFN_NOVALIDATE | 468NativeMethods.OFN_ALLOWMULTISELECT | NativeMethods.OFN_PATHMUSTEXIST | 469NativeMethods.OFN_NODEREFERENCELINKS); 487return GetOption(NativeMethods.OFN_NOCHANGEDIR); 493SetOption(NativeMethods.OFN_NOCHANGEDIR, value); 513return GetOption(NativeMethods.OFN_SHOWHELP); 516SetOption(NativeMethods.OFN_SHOWHELP, value); 581return !GetOption(NativeMethods.OFN_NOVALIDATE); 587SetOption(NativeMethods.OFN_NOVALIDATE, !value); 618NativeMethods.OPENFILENAME_I ofn = (NativeMethods.OPENFILENAME_I)UnsafeNativeMethods.PtrToStructure(lpOFN, typeof(NativeMethods.OPENFILENAME_I)); 625options = options & ~NativeMethods.OFN_READONLY | 626ofn.Flags & NativeMethods.OFN_READONLY; 638if ((options & NativeMethods.OFN_ALLOWMULTISELECT) == 0) { 748if (msg == NativeMethods.WM_NOTIFY) { 758NativeMethods.OPENFILENAME_I ofn = (NativeMethods.OPENFILENAME_I)UnsafeNativeMethods.PtrToStructure(notify.lpOFN, typeof(NativeMethods.OPENFILENAME_I)); 801UnsafeNativeMethods.SetWindowLong(new HandleRef(null, hWnd), 0, new HandleRef(null, NativeMethods.InvalidIntPtr)); 802return NativeMethods.InvalidIntPtr; 806UnsafeNativeMethods.SetWindowLong(new HandleRef(null, hWnd), 0, new HandleRef(null, NativeMethods.InvalidIntPtr)); 807return NativeMethods.InvalidIntPtr; 869if ((options & NativeMethods.OFN_NOVALIDATE) == 0) { 874bool fileMustExist = (options & NativeMethods.OFN_FILEMUSTEXIST) != 0; 947if ((options & NativeMethods.OFN_FILEMUSTEXIST) != 0) { 963options = NativeMethods.OFN_HIDEREADONLY | NativeMethods.OFN_PATHMUSTEXIST | 1000NativeMethods.WndProc hookProcPtr = new NativeMethods.WndProc(this.HookProc); 1001NativeMethods.OPENFILENAME_I ofn = new NativeMethods.OPENFILENAME_I(); 1007ofn.lStructSize = Marshal.SizeOf(typeof(NativeMethods.OPENFILENAME_I)); 1023ofn.Flags = Options | (NativeMethods.OFN_EXPLORER | NativeMethods.OFN_ENABLEHOOK | NativeMethods.OFN_ENABLESIZING); 1025ofn.FlagsEx = NativeMethods.OFN_USESHELLITEM; 1045internal abstract bool RunFileDialog(NativeMethods.OPENFILENAME_I ofn);
winforms\Managed\System\WinForms\FileDialog_Vista.cs (10)
126NativeMethods.OFN_USESHELLITEM //This is totally bogus (only used in FileDialog by accident to ensure that places are shown 127| NativeMethods.OFN_SHOWHELP //If ShowHelp is true, we don't use the Vista Dialog 128| NativeMethods.OFN_ENABLEHOOK //These shouldn't be set in options (only set in the flags for the legacy dialog) 129| NativeMethods.OFN_ENABLESIZING //These shouldn't be set in options (only set in the flags for the legacy dialog) 130| NativeMethods.OFN_EXPLORER //These shouldn't be set in options (only set in the flags for the legacy dialog) 206if (0 != (options & NativeMethods.OFN_HIDEREADONLY)) 212options &= ~ NativeMethods.OFN_READONLY; 230return this._dialog.HandleVistaFileOk(pfd) ? NativeMethods.S_OK : NativeMethods.S_FALSE; 235return NativeMethods.S_OK;
winforms\Managed\System\WinForms\FileDialogCustomPlace.cs (1)
110if (NativeMethods.S_OK == result)
winforms\Managed\System\WinForms\FolderBrowserDialog.cs (8)
240UnsafeNativeMethods.Shell32.SHGetSpecialFolderLocation(hWndOwner, NativeMethods.CSIDL_DESKTOP, ref pidlRoot); 271pszDisplayName = Marshal.AllocHGlobal(NativeMethods.MAX_PATH * Marshal.SystemDefaultCharSize); 272pszSelectedPath = Marshal.AllocHGlobal((NativeMethods.MAX_PATH + 1) * Marshal.SystemDefaultCharSize); 336case NativeMethods.BFFM_INITIALIZED: 341UnsafeNativeMethods.SendMessage(new HandleRef(null, hwnd), (int) NativeMethods.BFFM_SETSELECTION, 1, selectedPath); 344case NativeMethods.BFFM_SELCHANGED: 349IntPtr pszSelectedPath = Marshal.AllocHGlobal((NativeMethods.MAX_PATH + 1) * Marshal.SystemDefaultCharSize); 353UnsafeNativeMethods.SendMessage(new HandleRef(null, hwnd), (int) NativeMethods.BFFM_ENABLEOK, 0, isFileSystemFolder ? 1 : 0);
winforms\Managed\System\WinForms\FontDialog.cs (54)
83return !GetOption(NativeMethods.CF_NOSIMULATIONS); 87SetOption(NativeMethods.CF_NOSIMULATIONS, !value); 104return !GetOption(NativeMethods.CF_NOVECTORFONTS); 108SetOption(NativeMethods.CF_NOVECTORFONTS, !value); 127return !GetOption(NativeMethods.CF_NOVERTFONTS); 131SetOption(NativeMethods.CF_NOVERTFONTS, !value); 151return !GetOption(NativeMethods.CF_SELECTSCRIPT); 155SetOption(NativeMethods.CF_SELECTSCRIPT, !value); 205return GetOption(NativeMethods.CF_FIXEDPITCHONLY); 209SetOption(NativeMethods.CF_FIXEDPITCHONLY, value); 258return GetOption(NativeMethods.CF_FORCEFONTEXIST); 262SetOption(NativeMethods.CF_FORCEFONTEXIST, value); 349return GetOption(NativeMethods.CF_SCRIPTSONLY); 352SetOption(NativeMethods.CF_SCRIPTSONLY, value); 369return GetOption(NativeMethods.CF_APPLY); 372SetOption(NativeMethods.CF_APPLY, value); 410return GetOption(NativeMethods.CF_EFFECTS); 413SetOption(NativeMethods.CF_EFFECTS, value); 430return GetOption(NativeMethods.CF_SHOWHELP); 433SetOption(NativeMethods.CF_SHOWHELP, value); 474case NativeMethods.WM_COMMAND: 476NativeMethods.LOGFONT lf = new NativeMethods.LOGFONT(); 477UnsafeNativeMethods.SendMessage(new HandleRef(null, hWnd), NativeMethods.WM_CHOOSEFONT_GETLOGFONT, 0, lf); 479int index = (int)UnsafeNativeMethods.SendDlgItemMessage(new HandleRef(null, hWnd), 0x473, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 480if (index != NativeMethods.CB_ERR) { 482NativeMethods.CB_GETITEMDATA, (IntPtr) index, IntPtr.Zero)); 499case NativeMethods.WM_INITDIALOG: 501IntPtr hWndCtl = UnsafeNativeMethods.GetDlgItem(new HandleRef(null, hWnd), NativeMethods.cmb4); 502SafeNativeMethods.ShowWindow(new HandleRef(null, hWndCtl), NativeMethods.SW_HIDE); 503hWndCtl = UnsafeNativeMethods.GetDlgItem(new HandleRef(null, hWnd), NativeMethods.stc4); 504SafeNativeMethods.ShowWindow(new HandleRef(null, hWndCtl), NativeMethods.SW_HIDE); 530options = NativeMethods.CF_SCREENFONTS | NativeMethods.CF_EFFECTS; 537SetOption(NativeMethods.CF_TTONLY, true); 555NativeMethods.WndProc hookProcPtr = new NativeMethods.WndProc(this.HookProc); 556NativeMethods.CHOOSEFONT cf = new NativeMethods.CHOOSEFONT(); 557IntPtr screenDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 558NativeMethods.LOGFONT lf = new NativeMethods.LOGFONT(); 573UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC)); 577logFontPtr = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(NativeMethods.LOGFONT))); 580cf.lStructSize = Marshal.SizeOf(typeof(NativeMethods.CHOOSEFONT)); 584cf.Flags = Options | NativeMethods.CF_INITTOLOGFONTSTRUCT | NativeMethods.CF_ENABLEHOOK; 586cf.Flags |= NativeMethods.CF_LIMITSIZE; 613NativeMethods.LOGFONT lfReturned = null; 614lfReturned = (NativeMethods.LOGFONT)UnsafeNativeMethods.PtrToStructure(logFontPtr, typeof(NativeMethods.LOGFONT)); 684private void UpdateFont(NativeMethods.LOGFONT lf) { 685IntPtr screenDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 708UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screenDC));
winforms\Managed\System\WinForms\Form.cs (275)
470IntPtr hwnd = this.ctlClient.SendMessage(NativeMethods.WM_MDIGETACTIVE, 0, 0); 829DispId(NativeMethods.ActiveX.DISPID_BORDERSTYLE), 996if (this.IsHandleCreated && (this.WindowStyle & NativeMethods.WS_DISABLED) != 0) 999cp.Style |= NativeMethods.WS_DISABLED; 1005cp.Style &= (~NativeMethods.WS_DISABLED); 1009cp.ExStyle |= NativeMethods.WS_EX_LAYERED; 1022cp.ExStyle |= NativeMethods.WS_EX_APPWINDOW; 1031cp.ExStyle |= NativeMethods.WS_EX_DLGMODALFRAME; 1043cp.Style |= NativeMethods.WS_MAXIMIZE; 1050cp.Style |= NativeMethods.WS_MAXIMIZE; 1052cp.ExStyle |= NativeMethods.WS_EX_MDICHILD; 1061if ((cp.Style & NativeMethods.WS_VISIBLE) != 0) { 1063cp.Style &= (~NativeMethods.WS_VISIBLE); 1076cp.ExStyle |= NativeMethods.WS_EX_LAYOUTRTL | NativeMethods.WS_EX_NOINHERITLAYOUT; 1078cp.ExStyle &= ~(NativeMethods.WS_EX_RTLREADING | NativeMethods.WS_EX_RIGHT | NativeMethods.WS_EX_LEFTSCROLLBAR); 1778SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.NullHandleRef, 1783NativeMethods.SWP_NOZORDER); 2104int exStyle = unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE)); 2107UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE, new HandleRef(null, (IntPtr)cp.ExStyle)); 2340return NativeMethods.SW_SHOWMAXIMIZED; 2342return NativeMethods.SW_SHOWMINIMIZED; 2346return NativeMethods.SW_SHOWNOACTIVATE; 2348return NativeMethods.SW_SHOW; 2482DispId(NativeMethods.ActiveX.DISPID_TABSTOP), 2517cp.ExStyle = NativeMethods.WS_EX_TOOLWINDOW; 2576HandleRef key = value ? NativeMethods.HWND_TOPMOST : NativeMethods.HWND_NOTOPMOST; 2578NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOSIZE); 2684UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.WM_SHOWWINDOW, value ? 1 : 0, 0); 2713SafeNativeMethods.ShowWindow(new HandleRef(this, Handle), NativeMethods.SW_SHOW); 2789SafeNativeMethods.ShowWindow(new HandleRef(this, hWnd), NativeMethods.SW_NORMAL); 2792SafeNativeMethods.ShowWindow(new HandleRef(this, hWnd), NativeMethods.SW_MAXIMIZE); 2795SafeNativeMethods.ShowWindow(new HandleRef(this, hWnd), NativeMethods.SW_MINIMIZE); 3088MdiParentInternal.MdiClient.SendMessage(NativeMethods.WM_MDIACTIVATE, Handle, 0); 3247UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_MINIMIZE, 3248NativeMethods.MF_BYCOMMAND | NativeMethods.MF_GRAYED); 3251UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_MINIMIZE, 3252NativeMethods.MF_BYCOMMAND | NativeMethods.MF_ENABLED); 3255UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_MAXIMIZE, 3256NativeMethods.MF_BYCOMMAND | NativeMethods.MF_GRAYED); 3259UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_MAXIMIZE, 3260NativeMethods.MF_BYCOMMAND | NativeMethods.MF_ENABLED); 3263UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_CLOSE, 3264NativeMethods.MF_BYCOMMAND | NativeMethods.MF_GRAYED); 3267UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_CLOSE, 3268NativeMethods.MF_BYCOMMAND | NativeMethods.MF_ENABLED); 3271UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_RESTORE, 3272NativeMethods.MF_BYCOMMAND | NativeMethods.MF_GRAYED); 3275UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_RESTORE, 3276NativeMethods.MF_BYCOMMAND | NativeMethods.MF_ENABLED); 3279UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_SIZE, 3280NativeMethods.MF_BYCOMMAND | NativeMethods.MF_GRAYED); 3283UnsafeNativeMethods.EnableMenuItem(new HandleRef(this, hmenu), NativeMethods.SC_SIZE, 3284NativeMethods.MF_BYCOMMAND | NativeMethods.MF_ENABLED); 3432NativeMethods.RECT rc = new NativeMethods.RECT(); 3570SendMessage(NativeMethods.WM_CLOSE, 0, 0); 3593NativeMethods.RECT result = new NativeMethods.RECT(0, 0, clientSize.Width, clientSize.Height); 3696UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, TaskbarOwner); 3702UnsafeNativeMethods.SendMessage(TaskbarOwner, NativeMethods.WM_SETICON, NativeMethods.ICON_BIG, icon.Handle); 3887cp.Style |= NativeMethods.WS_CAPTION; 3893cp.Style |= NativeMethods.WS_SYSMENU | NativeMethods.WS_CAPTION; 3896cp.Style &= (~NativeMethods.WS_SYSMENU); 3900cp.Style |= NativeMethods.WS_MAXIMIZEBOX; 3903cp.Style &= ~NativeMethods.WS_MAXIMIZEBOX; 3907cp.Style |= NativeMethods.WS_MINIMIZEBOX; 3910cp.Style &= ~NativeMethods.WS_MINIMIZEBOX; 3918cp.ExStyle |= NativeMethods.WS_EX_CONTEXTHELP; 3921cp.ExStyle &= ~NativeMethods.WS_EX_CONTEXTHELP; 3942cp.Style |= NativeMethods.WS_BORDER; 3945cp.Style |= NativeMethods.WS_BORDER | NativeMethods.WS_THICKFRAME; 3948cp.Style |= NativeMethods.WS_BORDER; 3949cp.ExStyle |= NativeMethods.WS_EX_CLIENTEDGE; 3952cp.Style |= NativeMethods.WS_BORDER; 3953cp.ExStyle |= NativeMethods.WS_EX_DLGMODALFRAME; 3956cp.Style |= NativeMethods.WS_BORDER; 3957cp.ExStyle |= NativeMethods.WS_EX_TOOLWINDOW; 3960cp.Style |= NativeMethods.WS_BORDER | NativeMethods.WS_THICKFRAME; 3961cp.ExStyle |= NativeMethods.WS_EX_TOOLWINDOW; 3988int maskedStyle = cp.Style & ~(NativeMethods.WS_MAXIMIZE | NativeMethods.WS_MINIMIZE); 4001cp.Width = NativeMethods.CW_USEDEFAULT; 4002cp.Height = NativeMethods.CW_USEDEFAULT; 4015cp.X = NativeMethods.CW_USEDEFAULT; 4016cp.Y = NativeMethods.CW_USEDEFAULT; 4064cp.Style |= NativeMethods.WS_MAXIMIZE; 4067cp.Style |= NativeMethods.WS_MINIMIZE; 4082MdiParentInternal.MdiClient.SendMessage(NativeMethods.WM_MDIACTIVATE, Handle, 0); 4452ownerHandle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT); 4456NativeMethods.RECT ownerRect = new NativeMethods.RECT(); 4497hWndOwner = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT); 4992&& UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETSNAPTODEFBUTTON, 0, ref data, 0) 4996NativeMethods.POINT ptToSnap = new NativeMethods.POINT( 5117SafeNativeMethods.SetWindowPos(new HandleRef(this, HandleInternal), NativeMethods.NullHandleRef, e.SuggestedRectangle.X, e.SuggestedRectangle.Y, e.SuggestedRectangle.Width, e.SuggestedRectangle.Height, NativeMethods.SWP_NOZORDER | NativeMethods.SWP_NOACTIVATE); 5190if (OnGetDpiScaledSize(deviceDpi, NativeMethods.Util.SignedLOWORD(m.WParam), ref desiredSize)) { 5287NativeMethods.MSG win32Message = new NativeMethods.MSG(); 5509NativeMethods.WINDOWPLACEMENT wp = new NativeMethods.WINDOWPLACEMENT(); 5513wp.length = Marshal.SizeOf(typeof(NativeMethods.WINDOWPLACEMENT)); 5532new NativeMethods.EnumThreadWindowsCallback(callback), 5771MdiParentInternal.MdiClient.SendMessage(NativeMethods.WM_MDIACTIVATE, Handle, 0); 6091else if ( (owner != null) && ((int)UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, Control.GetSafeHandle(owner)), NativeMethods.GWL_EXSTYLE) 6092& NativeMethods.WS_EX_TOPMOST) == 0 ) { // It's not the top-most window 6107if (UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, hWndOwner), NativeMethods.GWL_HWNDPARENT) == Handle) { 6113hWndOldOwner = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT); 6114UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, new HandleRef(owner, hWndOwner)); 6156else if ( (owner != null) && ((int)UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, Control.GetSafeHandle(owner)), NativeMethods.GWL_EXSTYLE) 6157& NativeMethods.WS_EX_TOPMOST) == 0 ) { // It's not the top-most window 6171UnsafeNativeMethods.SendMessage(new HandleRef(null, hWndCapture), NativeMethods.WM_CANCELMODE, IntPtr.Zero, IntPtr.Zero); 6208if (UnsafeNativeMethods.GetWindowLong(new HandleRef(owner, hWndOwner), NativeMethods.GWL_HWNDPARENT) == Handle) { 6214hWndOldOwner = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT); 6215UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, new HandleRef(owner, hWndOwner)); 6429HandleRef ownerHwnd = NativeMethods.NullHandleRef; 6442UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, ownerHwnd); 6458result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), 0, OpacityAsByte, NativeMethods.LWA_ALPHA); 6462result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), ColorTranslator.ToWin32(transparencyKey), 0, NativeMethods.LWA_COLORKEY); 6466OpacityAsByte, NativeMethods.LWA_ALPHA | NativeMethods.LWA_COLORKEY); 6523UnsafeNativeMethods.SetMenu(new HandleRef(this, Handle), NativeMethods.NullHandleRef); 6547UnsafeNativeMethods.SendMessage(new HandleRef(ctlClient, ctlClient.Handle), NativeMethods.WM_MDISETMENU, dummyMenu.Handle, IntPtr.Zero); 6553UnsafeNativeMethods.SendMessage(new HandleRef(ctlClient, ctlClient.Handle), NativeMethods.WM_MDISETMENU, menu.Handle, IntPtr.Zero); 6565UnsafeNativeMethods.SetMenu(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef); 6819SendMessage(NativeMethods.WM_SETICON,NativeMethods.ICON_SMALL,smallIcon.Handle); 6821SendMessage(NativeMethods.WM_SETICON,NativeMethods.ICON_BIG,icon.Handle); 6825SendMessage(NativeMethods.WM_SETICON,NativeMethods.ICON_SMALL,0); 6826SendMessage(NativeMethods.WM_SETICON,NativeMethods.ICON_BIG,0); 6830SafeNativeMethods.RedrawWindow(new HandleRef(this, Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME); 6846NativeMethods.WINDOWPLACEMENT wp = new NativeMethods.WINDOWPLACEMENT(); 6847wp.length = Marshal.SizeOf(typeof(NativeMethods.WINDOWPLACEMENT)); 6851case NativeMethods.SW_NORMAL: 6852case NativeMethods.SW_RESTORE: 6853case NativeMethods.SW_SHOW: 6854case NativeMethods.SW_SHOWNA: 6855case NativeMethods.SW_SHOWNOACTIVATE: 6860case NativeMethods.SW_SHOWMAXIMIZED: 6865case NativeMethods.SW_SHOWMINIMIZED: 6866case NativeMethods.SW_MINIMIZE: 6867case NativeMethods.SW_SHOWMINNOACTIVE: 6872case NativeMethods.SW_HIDE: 6946Active = NativeMethods.Util.LOWORD(m.WParam) != NativeMethods.WA_INACTIVE; 6974NativeMethods.STARTUPINFO_I si = new NativeMethods.STARTUPINFO_I(); 6980if (TopLevel && (si.dwFlags & NativeMethods.STARTF_USESHOWWINDOW) != 0) { 6982case NativeMethods.SW_MAXIMIZE: 6985case NativeMethods.SW_MINIMIZE: 7001if (m.Msg != NativeMethods.WM_ENDSESSION) { 7064if (m.Msg == NativeMethods.WM_QUERYENDSESSION) { 7083if (m.Msg != NativeMethods.WM_QUERYENDSESSION) { 7180NativeMethods.MINMAXINFO mmi = (NativeMethods.MINMAXINFO)m.GetLParam(typeof(NativeMethods.MINMAXINFO)); 7260UnsafeNativeMethods.PostMessage(new HandleRef(formMdiParent, formMdiParent.Handle), NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_KEYMENU), m.WParam); 7261m.Result = (IntPtr)NativeMethods.Util.MAKELONG(0, 1); 7357int x = NativeMethods.Util.LOWORD(m.LParam); 7358int y = NativeMethods.Util.HIWORD(m.LParam); 7362NativeMethods.POINT pt = new NativeMethods.POINT(x, y); 7374m.Result = IsMirrored ? (IntPtr)NativeMethods.HTBOTTOMLEFT : (IntPtr)NativeMethods.HTBOTTOMRIGHT; 7387if (result >= NativeMethods.HTLEFT && 7388result <= NativeMethods.HTBOTTOMRIGHT) { 7389m.Result = (IntPtr)NativeMethods.HTBORDER; 7412int sc = (NativeMethods.Util.LOWORD(m.WParam) & 0xFFF0); 7415case NativeMethods.SC_CLOSE: 7421case NativeMethods.SC_KEYMENU: 7426case NativeMethods.SC_SIZE: 7427case NativeMethods.SC_MOVE: 7431case NativeMethods.SC_CONTEXTHELP: 7440if (Command.DispatchID(NativeMethods.Util.LOWORD(m.WParam))) { 7464MdiParentInternal.UpdateMdiControlStrip(wParam == NativeMethods.SIZE_MAXIMIZED); 7527case NativeMethods.WM_NCACTIVATE: 7533case NativeMethods.WM_NCLBUTTONDOWN: 7534case NativeMethods.WM_NCRBUTTONDOWN: 7535case NativeMethods.WM_NCMBUTTONDOWN: 7536case NativeMethods.WM_NCXBUTTONDOWN: 7539case NativeMethods.WM_ACTIVATE: 7542case NativeMethods.WM_MDIACTIVATE: 7545case NativeMethods.WM_CLOSE: 7552case NativeMethods.WM_QUERYENDSESSION: 7553case NativeMethods.WM_ENDSESSION: 7557case NativeMethods.WM_ENTERSIZEMOVE: 7561case NativeMethods.WM_EXITSIZEMOVE: 7565case NativeMethods.WM_CREATE: 7568case NativeMethods.WM_ERASEBKGND: 7572case NativeMethods.WM_INITMENUPOPUP: 7575case NativeMethods.WM_UNINITMENUPOPUP: 7578case NativeMethods.WM_MENUCHAR: 7581case NativeMethods.WM_NCDESTROY: 7584case NativeMethods.WM_NCHITTEST: 7587case NativeMethods.WM_SHOWWINDOW: 7590case NativeMethods.WM_SIZE: 7593case NativeMethods.WM_SYSCOMMAND: 7596case NativeMethods.WM_GETMINMAXINFO: 7599case NativeMethods.WM_WINDOWPOSCHANGED: 7605case NativeMethods.WM_ENTERMENULOOP: 7608case NativeMethods.WM_EXITMENULOOP: 7611case NativeMethods.WM_CAPTURECHANGED: 7621case NativeMethods.WM_GETDPISCALEDSIZE: 7623Debug.Assert(NativeMethods.Util.SignedLOWORD(m.WParam) == NativeMethods.Util.SignedHIWORD(m.WParam), "Non-square pixels!"); 7631case NativeMethods.WM_DPICHANGED: 7755IntPtr parent = UnsafeNativeMethods.GetWindowLong(hRef, NativeMethods.GWL_HWNDPARENT); 7776UnsafeNativeMethods.SetWindowLong(hRef, NativeMethods.GWL_HWNDPARENT, NativeMethods.NullHandleRef); 7788UnsafeNativeMethods.SetWindowLong(hRef, NativeMethods.GWL_HWNDPARENT, hRefOwner); 7811NativeMethods.INITCOMMONCONTROLSEX icc = new NativeMethods.INITCOMMONCONTROLSEX(); 7812icc.dwICC = NativeMethods.ICC_TAB_CLASSES; 7817cp.ClassName = NativeMethods.TOOLTIPS_CLASS; 7818cp.Style |= NativeMethods.TTS_ALWAYSTIP | NativeMethods.TTS_BALLOON; 7841private NativeMethods.TOOLINFO_T GetTOOLINFO() { 7842NativeMethods.TOOLINFO_T toolInfo; 7843toolInfo = new NativeMethods.TOOLINFO_T(); 7844toolInfo.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO_T)); 7845toolInfo.uFlags |= NativeMethods.TTF_SUBCLASS; 7848toolInfo.uFlags |= NativeMethods.TTF_RTLREADING; 7851toolInfo.uFlags |= NativeMethods.TTF_TRANSPARENT; 7858toolInfo.rect = NativeMethods.RECT.FromXYWH(r.X, r.Y, r.Width, r.Height); 7862toolInfo.uFlags |= NativeMethods.TTF_IDISHWND | NativeMethods.TTF_TRACK; 7879SafeNativeMethods.SetWindowPos(new HandleRef(window, window.Handle), NativeMethods.HWND_TOPMOST, 7881NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOSIZE | 7882NativeMethods.SWP_NOACTIVATE); 7884UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, owner.Width); 7886UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_SETTITLE, NativeMethods.TTI_WARNING, SR.GetString(SR.SecurityToolTipCaption)); 7888if (0 == (int)UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO())) { 7892UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_ACTIVATE, 1, 0); 7918UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKPOSITION, 0, NativeMethods.Util.MAKELONG(owner.Left + s.Width / 2, owner.Top + SystemInformation.CaptionHeight)); 7930UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKACTIVATE, 0, GetTOOLINFO()); 7931UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_DELTOOL, 0, GetTOOLINFO()); 7932UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO()); 7938UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKPOSITION, 0, NativeMethods.Util.MAKELONG(owner.Left + s.Width / 2, owner.Top + SystemInformation.CaptionHeight)); 7939UnsafeNativeMethods.SendMessage(new HandleRef(window, window.Handle), NativeMethods.TTM_TRACKACTIVATE, 1, GetTOOLINFO()); 7945if (msg.Msg == NativeMethods.WM_LBUTTONDOWN 7946|| msg.Msg == NativeMethods.WM_RBUTTONDOWN 7947|| msg.Msg == NativeMethods.WM_MBUTTONDOWN 7948|| msg.Msg == NativeMethods.WM_XBUTTONDOWN) {
winforms\Managed\System\WinForms\GroupBox.cs (14)
157cp.Style |= NativeMethods.BS_GROUPBOX; 163cp.Style &= ~NativeMethods.BS_GROUPBOX; 165cp.ExStyle |= NativeMethods.WS_EX_CONTROLPARENT; 325SendMessage(NativeMethods.WM_SETREDRAW, 0, 0); 331SendMessage(NativeMethods.WM_SETREDRAW, 1, 0); 770NativeMethods.RECT rect = new NativeMethods.RECT(); 792case NativeMethods.WM_ERASEBKGND: 793case NativeMethods.WM_PRINTCLIENT: 796case NativeMethods.WM_GETOBJECT: 803if (unchecked((int)(long)m.LParam) == NativeMethods.OBJID_QUERYCLASSNAMEIDX) { 844case NativeMethods.UIA_ControlTypePropertyId: 845return NativeMethods.UIA_GroupControlTypeId; 846case NativeMethods.UIA_IsKeyboardFocusablePropertyId:
winforms\Managed\System\WinForms\Help.cs (16)
160NativeMethods.HH_POPUP pop = new NativeMethods.HH_POPUP(); 169pop.pt = new NativeMethods.POINT(location.X, location.Y); 242else if (htmlParam is NativeMethods.HH_FTS_QUERY) { 243SafeNativeMethods.HtmlHelp(handle, pathAndFileName, htmlCommand, (NativeMethods.HH_FTS_QUERY)htmlParam); 245else if (htmlParam is NativeMethods.HH_AKLINK) { 249SafeNativeMethods.HtmlHelp(NativeMethods.NullHandleRef, pathAndFileName, HH_DISPLAY_TOPIC, (string)null); 250SafeNativeMethods.HtmlHelp(handle, pathAndFileName, htmlCommand, (NativeMethods.HH_AKLINK)htmlParam); 260else if (param is NativeMethods.HH_POPUP) { 261SafeNativeMethods.HtmlHelp(handle, pathAndFileName, HH_DISPLAY_TEXT_POPUP, (NativeMethods.HH_POPUP)param); 323UnsafeNativeMethods.ShellExecute_NoBFM(handle, null, file.ToString(), null, null, NativeMethods.SW_NORMAL); 347string localPath = NativeMethods.GetLocalPath(partialUri); 456NativeMethods.HH_FTS_QUERY ftsQuery = new NativeMethods.HH_FTS_QUERY(); 473NativeMethods.HH_AKLINK alink = new NativeMethods.HH_AKLINK();
winforms\Managed\System\WinForms\HelpInfo.cs (4)
25this.option = NativeMethods.HLP_FILE; 33this.option = NativeMethods.HLP_KEYWORD; 41this.option = NativeMethods.HLP_NAVIGATOR; 50this.option = NativeMethods.HLP_OBJECT;
winforms\Managed\System\WinForms\HScrollBar.cs (1)
45cp.Style |= NativeMethods.SBS_HORZ;
winforms\Managed\System\WinForms\HScrollProperties.cs (1)
41return NativeMethods.SB_HORZ;
winforms\Managed\System\WinForms\HtmlDocument.cs (8)
550NativeMethods.tagDISPPARAMS dp = new NativeMethods.tagDISPPARAMS(); 559int[] dispids = new int[] { NativeMethods.ActiveX.DISPID_UNKNOWN }; 562if (NativeMethods.Succeeded(hr) && (dispids[0] != NativeMethods.ActiveX.DISPID_UNKNOWN)) 577NativeMethods.DISPATCH_METHOD, dp, 578retVals, new NativeMethods.tagEXCEPINFO(), null); 579if (hr == NativeMethods.S_OK)
winforms\Managed\System\WinForms\HtmlElement.cs (8)
599NativeMethods.tagDISPPARAMS dp = new NativeMethods.tagDISPPARAMS(); 608int[] dispids = new int[] { NativeMethods.ActiveX.DISPID_UNKNOWN }; 611if (NativeMethods.Succeeded(hr) && (dispids[0] != NativeMethods.ActiveX.DISPID_UNKNOWN)) 627NativeMethods.DISPATCH_METHOD, dp, 628retVals, new NativeMethods.tagEXCEPINFO(), null); 629if (hr == NativeMethods.S_OK)
winforms\Managed\System\WinForms\ImageList.cs (19)
318NativeMethods.IMAGEINFO imageInfo = new NativeMethods.IMAGEINFO(); // review? do I need to delete the mask and image? 320NativeMethods.BITMAP bmp = new NativeMethods.BITMAP(); 516int flags = NativeMethods.ILC_MASK; 519flags |= NativeMethods.ILC_COLOR4; 522flags |= NativeMethods.ILC_COLOR8; 525flags |= NativeMethods.ILC_COLOR16; 528flags |= NativeMethods.ILC_COLOR24; 531flags |= NativeMethods.ILC_COLOR32; 551SafeNativeMethods.ImageList_SetBkColor(new HandleRef(this, Handle), NativeMethods.CLR_NONE); 631width, height, NativeMethods.CLR_NONE, NativeMethods.CLR_NONE, NativeMethods.ILD_TRANSPARENT); 707NativeMethods.IMAGEINFO imageInfo = new NativeMethods.IMAGEINFO(); // review? do I need to delete the mask and image inside of imageinfo? 752imageSize.Width, imageSize.Height, NativeMethods.CLR_NONE, NativeMethods.CLR_NONE, NativeMethods.ILD_TRANSPARENT);
winforms\Managed\System\WinForms\ImageListStreamer.cs (2)
241int hResult = SafeNativeMethods.ImageList_WriteEx(new HandleRef(this, imagelistHandle), NativeMethods.ILP_DOWNLEVEL, new UnsafeNativeMethods.ComStreamFromDataStream(stream)); 242return (hResult == NativeMethods.S_OK);
winforms\Managed\System\WinForms\InputLanguage.cs (2)
93UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETDEFAULTINPUTLANG, 0, data, 0); 319if (res == NativeMethods.S_OK) {
winforms\Managed\System\WinForms\ItemBoundsPortion.cs (4)
33Entire = NativeMethods.LVIR_BOUNDS, 41Icon = NativeMethods.LVIR_ICON, 49Label = NativeMethods.LVIR_LABEL, 60ItemOnly = NativeMethods.LVIR_SELECTBOUNDS,
winforms\Managed\System\WinForms\Label.cs (17)
278DispId(NativeMethods.ActiveX.DISPID_BORDERSTYLE), 329cp.Style |= NativeMethods.SS_OWNERDRAW; 334cp.ExStyle &= ~NativeMethods.WS_EX_RIGHT; // WS_EX_RIGHT overrides the SS_XXXX alignment styles 343cp.Style |= NativeMethods.SS_LEFT; 349cp.Style |= NativeMethods.SS_RIGHT; 355cp.Style |= NativeMethods.SS_CENTER; 360cp.Style |= NativeMethods.SS_LEFT; 364cp.Style |= NativeMethods.WS_BORDER; 367cp.Style |= NativeMethods.SS_SUNKEN; 372cp.Style |= NativeMethods.SS_NOPREFIX; 1009style |= NativeMethods.SS_NOPREFIX; 1012style &= ~NativeMethods.SS_NOPREFIX; 1735case NativeMethods.WM_NCHITTEST: 1741m.Result = (IntPtr)((rectInScreen.Contains(pt) ? NativeMethods.HTCLIENT : NativeMethods.HTNOWHERE)); 1789if (propertyID == NativeMethods.UIA_ControlTypePropertyId) { 1790return NativeMethods.UIA_TextControlTypeId;
winforms\Managed\System\WinForms\LinkLabel.cs (11)
403NativeMethods.POINT p = new NativeMethods.POINT(); 404NativeMethods.RECT r = new NativeMethods.RECT(); 410SendMessage(NativeMethods.WM_SETCURSOR, Handle, NativeMethods.HTCLIENT); 1924if (m.WParam == InternalHandle && NativeMethods.Util.LOWORD(m.LParam) == NativeMethods.HTCLIENT) { 1945case NativeMethods.WM_SETCURSOR: 2667if (propertyID == NativeMethods.UIA_IsEnabledPropertyId) { 2845if (propertyID == NativeMethods.UIA_IsEnabledPropertyId) {
winforms\Managed\System\WinForms\ListBox.cs (95)
69public const int NoMatches = NativeMethods.LB_ERR; 262DispId(NativeMethods.ActiveX.DISPID_BORDERSTYLE), 319SendMessage(NativeMethods.LB_SETCOLUMNWIDTH, columnWidth, 0); 339cp.Style |= NativeMethods.WS_VSCROLL | NativeMethods.LBS_NOTIFY | NativeMethods.LBS_HASSTRINGS; 340if (scrollAlwaysVisible) cp.Style |= NativeMethods.LBS_DISABLENOSCROLL; 341if (!integralHeight) cp.Style |= NativeMethods.LBS_NOINTEGRALHEIGHT; 342if (useTabStops) cp.Style |= NativeMethods.LBS_USETABSTOPS; 346cp.ExStyle |= NativeMethods.WS_EX_CLIENTEDGE; 349cp.Style |= NativeMethods.WS_BORDER; 354cp.Style |= NativeMethods.LBS_MULTICOLUMN | NativeMethods.WS_HSCROLL; 357cp.Style |= NativeMethods.WS_HSCROLL; 362cp.Style |= NativeMethods.LBS_NOSEL; 365cp.Style |= NativeMethods.LBS_MULTIPLESEL; 368cp.Style |= NativeMethods.LBS_EXTENDEDSEL; 378cp.Style |= NativeMethods.LBS_OWNERDRAWFIXED; 381cp.Style |= NativeMethods.LBS_OWNERDRAWVARIABLE; 462return unchecked( (int) (long)SendMessage(NativeMethods.LB_GETCARETINDEX, 0, 0)); 634SendMessage(NativeMethods.LB_SETITEMHEIGHT, 0, value); 873return unchecked( (int) (long)SendMessage(NativeMethods.LB_GETCURSEL, 0, 0)); 1143return unchecked( (int) (long)SendMessage(NativeMethods.LB_GETTOPINDEX, 0, 0)); 1151SendMessage(NativeMethods.LB_SETTOPINDEX, value, 0); 1488int h = unchecked( (int) (long)SendMessage(NativeMethods.LB_GETITEMHEIGHT, index, 0)); 1505NativeMethods.RECT rect = new NativeMethods.RECT(); 1506SendMessage(NativeMethods.LB_GETITEMRECT, index, ref rect); 1534int sel = unchecked( (int) (long)SendMessage(NativeMethods.LB_GETSEL, index, 0)); 1564NativeMethods.RECT r = new NativeMethods.RECT(); 1567int index = unchecked( (int) (long)SendMessage(NativeMethods.LB_ITEMFROMPOINT, 0, unchecked( (int) (long)NativeMethods.Util.MAKELPARAM(x, y)))); 1568if (NativeMethods.Util.HIWORD(index) == 0) { 1570return NativeMethods.Util.LOWORD(index); 1583int insertIndex = unchecked( (int) (long)SendMessage(NativeMethods.LB_ADDSTRING, 0, GetItemText(item))); 1585if (insertIndex == NativeMethods.LB_ERRSPACE) { 1589if (insertIndex == NativeMethods.LB_ERR) { 1607SendMessage(NativeMethods.LB_RESETCONTENT, 0, 0); 1614int len = unchecked( (int) (long)SendMessage(NativeMethods.LB_GETTEXTLEN, index, 0)); 1616UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LB_GETTEXT, index, sb); 1626int insertIndex = unchecked( (int) (long)SendMessage(NativeMethods.LB_INSERTSTRING, index, GetItemText(item))); 1628if (insertIndex == NativeMethods.LB_ERRSPACE) { 1632if (insertIndex == NativeMethods.LB_ERR) { 1652bool selected = (unchecked( (int) (long)SendMessage(NativeMethods.LB_GETSEL, (IntPtr)index, IntPtr.Zero)) > 0); 1653SendMessage(NativeMethods.LB_DELETESTRING, index, 0); 1672SendMessage(NativeMethods.LB_SETCURSEL, (value ? index : -1), 0); 1675SendMessage(NativeMethods.LB_SETSEL, value? -1: 0, index); 1699int index = unchecked( (int) (long)SendMessage(NativeMethods.LB_GETCURSEL, 0, 0)); 1705int count = unchecked( (int) (long)SendMessage(NativeMethods.LB_GETSELCOUNT, 0, 0)); 1708UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LB_GETSELITEMS, count, result); 1765SendMessage(NativeMethods.LB_SETLOCALE, CultureInfo.CurrentCulture.LCID, 0); 1768SendMessage(NativeMethods.LB_SETCOLUMNWIDTH, columnWidth, 0); 1771SendMessage(NativeMethods.LB_SETITEMHEIGHT, 0, ItemHeight); 1775SendMessage(NativeMethods.LB_SETTOPINDEX, topIndex, 0); 1782UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LB_SETTABSTOPS, wpar, offsets); 2105SendMessage(NativeMethods.LB_SETCURSEL, DataManager.Position, 0); 2216SendMessage(NativeMethods.LB_SETHORIZONTALEXTENT, width, 0); 2269UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LB_SETTABSTOPS, wpar, offsets); 2276if ((NativeMethods.PRF_NONCLIENT & (int)m.LParam) != 0 && Application.RenderWithVisualStyles && this.BorderStyle == BorderStyle.Fixed3D) { 2303switch (NativeMethods.Util.HIWORD(m.WParam)) { 2304case NativeMethods.LBN_SELCHANGE: 2310case NativeMethods.LBN_DBLCLK: 2322NativeMethods.DRAWITEMSTRUCT dis = (NativeMethods.DRAWITEMSTRUCT)m.GetLParam(typeof(NativeMethods.DRAWITEMSTRUCT)); 2362NativeMethods.MEASUREITEMSTRUCT mis = (NativeMethods.MEASUREITEMSTRUCT)m.GetLParam(typeof(NativeMethods.MEASUREITEMSTRUCT)); 2391case NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND: 2394case NativeMethods.WM_REFLECT + NativeMethods.WM_DRAWITEM: 2397case NativeMethods.WM_REFLECT + NativeMethods.WM_MEASUREITEM: 2400case NativeMethods.WM_PRINT: 2403case NativeMethods.WM_LBUTTONDOWN: 2409case NativeMethods.WM_LBUTTONUP: 2412int x = NativeMethods.Util.SignedLOWORD(m.LParam); 2413int y = NativeMethods.Util.SignedHIWORD(m.LParam); 2421OnClick(new MouseEventArgs(MouseButtons.Left, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 2422OnMouseClick(new MouseEventArgs(MouseButtons.Left, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 2430OnDoubleClick(new MouseEventArgs(MouseButtons.Left, 2, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 2431OnMouseDoubleClick(new MouseEventArgs(MouseButtons.Left, 2, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 2456case NativeMethods.WM_RBUTTONUP: 2459int rx = NativeMethods.Util.SignedLOWORD(m.LParam); 2460int ry = NativeMethods.Util.SignedHIWORD(m.LParam); 2472case NativeMethods.WM_LBUTTONDBLCLK: 2481case NativeMethods.WM_WINDOWPOSCHANGED: 4153return unchecked( (int) (long)owner.SendMessage(NativeMethods.LB_GETSELCOUNT, 0, 0)); 4449if (patternId == NativeMethods.UIA_ScrollItemPatternId) {
winforms\Managed\System\WinForms\ListView.cs (541)
386SendMessage(NativeMethods.LVM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 433NativeMethods.LVBKIMAGE lvbkImage = new NativeMethods.LVBKIMAGE(); 438lvbkImage.ulFlags = NativeMethods.LVBKIF_STYLE_TILE; 440lvbkImage.ulFlags = NativeMethods.LVBKIF_STYLE_NORMAL; 442lvbkImage.ulFlags |= NativeMethods.LVBKIF_SOURCE_URL; 446UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETBKIMAGE, 0, lvbkImage); 459DispId(NativeMethods.ActiveX.DISPID_BORDERSTYLE), 590SendMessage(NativeMethods.LVM_SETIMAGELIST, NativeMethods.LVSIL_STATE, imageListState.Handle); 592SendMessage(NativeMethods.LVM_SETIMAGELIST, NativeMethods.LVSIL_STATE, IntPtr.Zero); 683cp.ClassName = NativeMethods.WC_LISTVIEW; 688int currentStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 689cp.Style |= (currentStyle & (NativeMethods.WS_HSCROLL | NativeMethods.WS_VSCROLL)); 692cp.Style |= NativeMethods.LVS_SHAREIMAGELISTS; 696cp.Style |= NativeMethods.LVS_ALIGNTOP; 699cp.Style |= NativeMethods.LVS_ALIGNLEFT; 704cp.Style |= NativeMethods.LVS_AUTOARRANGE; 708cp.ExStyle |= NativeMethods.WS_EX_CLIENTEDGE; 711cp.Style |= NativeMethods.WS_BORDER; 717cp.Style |= NativeMethods.LVS_NOCOLUMNHEADER; 720cp.Style |= NativeMethods.LVS_NOSORTHEADER; 725cp.Style |= NativeMethods.LVS_EDITLABELS; 728cp.Style |= NativeMethods.LVS_NOLABELWRAP; 731cp.Style |= NativeMethods.LVS_SHOWSELALWAYS; 734cp.Style |= NativeMethods.LVS_SINGLESEL; 739cp.Style |= NativeMethods.LVS_SORTASCENDING; 742cp.Style |= NativeMethods.LVS_SORTDESCENDING; 748cp.Style |= NativeMethods.LVS_OWNERDATA; 759cp.ExStyle |= NativeMethods.WS_EX_LAYOUTRTL; 761cp.ExStyle &= ~(NativeMethods.WS_EX_RTLREADING | NativeMethods.WS_EX_RIGHT | NativeMethods.WS_EX_LEFTSCROLLBAR); 825int displayIndex = unchecked( (int) (long)SendMessage(NativeMethods.LVM_GETNEXTITEM, -1, NativeMethods.LVNI_FOCUSED)); 855SendMessage(NativeMethods.LVM_SETTEXTCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 1195SendMessage(NativeMethods.LVM_SETIMAGELIST, (IntPtr)NativeMethods.LVSIL_NORMAL, value == null ? IntPtr.Zero: value.Handle); 1439SendMessage(NativeMethods.LVM_SETIMAGELIST, (IntPtr)NativeMethods.LVSIL_SMALL, value == null ? IntPtr.Zero: value.Handle); 1551SendMessage(NativeMethods.LVM_SETIMAGELIST, NativeMethods.LVSIL_STATE, value == null ? IntPtr.Zero: value.Handle); 1571SendMessage(NativeMethods.LVM_SETIMAGELIST, NativeMethods.LVSIL_STATE, IntPtr.Zero); 1586SendMessage(NativeMethods.LVM_SETIMAGELIST, NativeMethods.LVSIL_STATE, (imageListState == null || imageListState.Images.Count == 0) ? IntPtr.Zero : imageListState.Handle); 1640NativeMethods.LVTILEVIEWINFO tileViewInfo = new NativeMethods.LVTILEVIEWINFO(); 1641tileViewInfo.dwMask = NativeMethods.LVTVIM_TILESIZE; 1642UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_GETTILEVIEWINFO, 0, tileViewInfo); 1659NativeMethods.LVTILEVIEWINFO tileViewInfo = new NativeMethods.LVTILEVIEWINFO(); 1660tileViewInfo.dwMask = NativeMethods.LVTVIM_TILESIZE; 1661tileViewInfo.dwFlags = NativeMethods.LVTVIF_FIXEDSIZE; 1662tileViewInfo.sizeTile = new NativeMethods.SIZE(tileSize.Width, tileSize.Height); 1663bool retval = UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETTILEVIEWINFO, 0, tileViewInfo); 1700topIndex = unchecked( (int) (long)SendMessage(NativeMethods.LVM_GETTOPINDEX, 0, 0)); 1792SendMessage(NativeMethods.LVM_SETVIEW,(int)viewStyle,0); 1831topIndex = unchecked( (int) (long)SendMessage(NativeMethods.LVM_GETTOPINDEX, 0, 0)); 1837SendMessage(NativeMethods.LVM_SETITEMCOUNT, virtualListSize, 0); 2237case NativeMethods.LVA_DEFAULT: 2238case NativeMethods.LVA_ALIGNLEFT: 2239case NativeMethods.LVA_ALIGNTOP: 2240case NativeMethods.LVA_SNAPTOGRID: 2242UnsafeNativeMethods.PostMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_ARRANGE, (int) value, 0); 2264ArrangeIcons((ListViewAlignment)NativeMethods.LVA_DEFAULT); 2393NativeMethods.NMHEADER header = (NativeMethods.NMHEADER) m.GetLParam(typeof(NativeMethods.NMHEADER)); 2456NativeMethods.INITCOMMONCONTROLSEX icc = new NativeMethods.INITCOMMONCONTROLSEX(); 2457icc.dwICC = NativeMethods.ICC_LISTVIEW_CLASSES; 2490NativeMethods.NMLVCUSTOMDRAW* nmcd = (NativeMethods.NMLVCUSTOMDRAW*)m.LParam; 2494case NativeMethods.CDDS_PREPAINT: 2497m.Result = (IntPtr)(NativeMethods.CDRF_NOTIFYITEMDRAW); 2501m.Result = (IntPtr)(NativeMethods.CDRF_NOTIFYSUBITEMDRAW | NativeMethods.CDRF_NEWFONT); 2509if (nmcd->dwItemType == NativeMethods.LVCDI_GROUP) 2519m.Result = (IntPtr)NativeMethods.CDRF_NEWFONT; 2528case NativeMethods.CDDS_ITEMPREPAINT: 2577m.Result = (IntPtr)(NativeMethods.CDRF_NOTIFYSUBITEMDRAW); 2583m.Result = (IntPtr)(NativeMethods.CDRF_SKIPDEFAULT); 2595m.Result = (IntPtr)(NativeMethods.CDRF_NOTIFYSUBITEMDRAW | NativeMethods.CDRF_NEWFONT); 2607goto case (NativeMethods.CDDS_SUBITEM | NativeMethods.CDDS_ITEMPREPAINT); 2609case (NativeMethods.CDDS_SUBITEM | NativeMethods.CDDS_ITEMPREPAINT): 2675m.Result = (IntPtr)(NativeMethods.CDRF_SKIPDEFAULT); 2685m.Result = (IntPtr)NativeMethods.CDRF_NEWFONT; 2697if ((realState & NativeMethods.LVIS_SELECTED) == 0) 2699state &= ~NativeMethods.CDIS_SELECTED; 2707int subitem = ((nmcd->nmcd.dwDrawStage & NativeMethods.CDDS_SUBITEM) != 0) ? nmcd->iSubItem : 0; 2719if (subitem == 0 && (state & NativeMethods.CDIS_HOT) != 0 && HotTracking) 2729if (subitem > 0 || (state & (NativeMethods.CDIS_SELECTED | NativeMethods.CDIS_GRAYED | NativeMethods.CDIS_HOT | NativeMethods.CDIS_DISABLED)) == 0) 2763if ((state & (NativeMethods.CDIS_SELECTED 2764| NativeMethods.CDIS_GRAYED 2765| NativeMethods.CDIS_HOT 2766| NativeMethods.CDIS_DISABLED)) != 0) 2857m.Result = (IntPtr)NativeMethods.CDRF_NEWFONT; 2866m.Result = (IntPtr)NativeMethods.CDRF_DODEFAULT; 2873m.Result = (IntPtr)NativeMethods.CDRF_DODEFAULT; 2904private void DestroyLVGROUP(NativeMethods.LVGROUP lvgroup) { 3046if (SendMessage(NativeMethods.LVM_HASGROUP, DefaultGroup.ID, 0) == IntPtr.Zero) { 3063UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_ENSUREVISIBLE, index, 0); 3171NativeMethods.LVFINDINFO lvFindInfo = new NativeMethods.LVFINDINFO(); 3173lvFindInfo.flags = NativeMethods.LVFI_STRING; 3174lvFindInfo.flags |= (isPrefixSearch ? NativeMethods.LVFI_PARTIAL : 0); 3177lvFindInfo.flags = NativeMethods.LVFI_NEARESTXY; 3185NativeMethods.LVM_FINDITEM, 3220SendMessage(NativeMethods.LVM_SETEXTENDEDLISTVIEWSTYLE, NativeMethods.LVS_EX_CHECKBOXES, 0); 3221SendMessage(NativeMethods.LVM_SETEXTENDEDLISTVIEWSTYLE, NativeMethods.LVS_EX_CHECKBOXES, NativeMethods.LVS_EX_CHECKBOXES); 3279NativeMethods.LVFINDINFO info = new NativeMethods.LVFINDINFO(); 3281info.flags = NativeMethods.LVFI_PARAM; 3286displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_FINDITEM, lastIndex - 1, ref info); 3290displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_FINDITEM, -1 /* beginning */, ref info); 3334NativeMethods.LVHITTESTINFO lvhi = new NativeMethods.LVHITTESTINFO(); 3339int displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi); 3342if (displayIndex >= 0 && ((lvhi.flags & NativeMethods.LVHT_ONITEM) != 0)) 3361NativeMethods.LVHITTESTINFO lvhi = new NativeMethods.LVHITTESTINFO(); 3366int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SUBITEMHITTEST, 0, lvhi); 3378NativeMethods.POINT pt = new NativeMethods.POINT(); 3379UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_GETITEMPOSITION, index, pt); 3385return GetItemState(index, NativeMethods.LVIS_FOCUSED | NativeMethods.LVIS_SELECTED | NativeMethods.LVIS_CUT | 3386NativeMethods.LVIS_DROPHILITED | NativeMethods.LVIS_OVERLAYMASK | 3387NativeMethods.LVIS_STATEIMAGEMASK); 3396return unchecked( (int) (long)SendMessage(NativeMethods.LVM_GETITEMSTATE, index, mask)); 3425NativeMethods.RECT itemrect = new NativeMethods.RECT(); 3427if (unchecked( (int) (long)SendMessage(NativeMethods.LVM_GETITEMRECT, index, ref itemrect)) == 0) 3448NativeMethods.RECT itemrect = new NativeMethods.RECT(); 3450if (unchecked( (int) (long)SendMessage(NativeMethods.LVM_GETITEMRECT, index, ref itemrect)) == 0) 3456private NativeMethods.LVGROUP GetLVGROUP(ListViewGroup group) 3458NativeMethods.LVGROUP lvgroup = new NativeMethods.LVGROUP(); 3459lvgroup.mask = NativeMethods.LVGF_HEADER | NativeMethods.LVGF_GROUPID | NativeMethods.LVGF_ALIGN; 3475lvgroup.uAlign = NativeMethods.LVGA_HEADER_LEFT; 3478lvgroup.uAlign = NativeMethods.LVGA_HEADER_RIGHT; 3481lvgroup.uAlign = NativeMethods.LVGA_HEADER_CENTER; 3518NativeMethods.RECT itemrect = new NativeMethods.RECT(); 3521if (unchecked( (int) (long)SendMessage(NativeMethods.LVM_GETSUBITEMRECT, itemIndex, ref itemrect)) == 0) 3546NativeMethods.LVHITTESTINFO lvhi = new NativeMethods.LVHITTESTINFO(); 3553iItem = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SUBITEMHITTEST, 0, lvhi)); 3555iItem = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_HITTEST, 0, lvhi)); 3561if (item == null && (NativeMethods.LVHT_ABOVE & lvhi.flags) == NativeMethods.LVHT_ABOVE) { 3564else if (item != null && (NativeMethods.LVHT_ONITEMSTATEICON & lvhi.flags) == NativeMethods.LVHT_ONITEMSTATEICON) { 3586IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_GETHEADER, 0, 0); 3646SetColumnInfo(NativeMethods.LVCF_IMAGE, ch); 3680NativeMethods.LVCOLUMN_T lvColumn = new NativeMethods.LVCOLUMN_T(); 3681lvColumn.mask = NativeMethods.LVCF_FMT | NativeMethods.LVCF_TEXT | NativeMethods.LVCF_WIDTH;// | NativeMethods.LVCF_ORDER | NativeMethods.LVCF_IMAGE; 3684lvColumn.mask |= NativeMethods.LVCF_IMAGE; 3692return (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_INSERTCOLUMN, index, lvColumn); 3739NativeMethods.LVGROUP lvgroup = new NativeMethods.LVGROUP(); 3743int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this,this.Handle),NativeMethods.LVM_INSERTGROUP,index,lvgroup); 3868NativeMethods.LVITEM lvItem = new NativeMethods.LVITEM(); 3877SendMessage(NativeMethods.LVM_SETITEMCOUNT, itemCount, 0); 3887lvItem.mask = NativeMethods.LVIF_TEXT | NativeMethods.LVIF_IMAGE | NativeMethods.LVIF_PARAM | NativeMethods.LVIF_INDENT; 3895lvItem.mask |= NativeMethods.LVIF_GROUPID; 3904lvItem.mask |= NativeMethods.LVIF_COLUMNS; 3940insertIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_INSERTITEM, 0, ref lvItem); 4028SendMessage(NativeMethods.LVM_SETIMAGELIST, (IntPtr) NativeMethods.LVSIL_NORMAL, handle); 4055private void LvnBeginDrag(MouseButtons buttons, NativeMethods.NMLISTVIEW nmlv) { 4232SendMessage(NativeMethods.LVM_UPDATE, -1, 0); 4260int version = unchecked((int)(long)SendMessage(NativeMethods.CCM_GETVERSION, 0, 0)); 4262SendMessage(NativeMethods.CCM_SETVERSION, 5, 0); 4267SendMessage(NativeMethods.LVM_SETBKCOLOR,0,color); 4268SendMessage(NativeMethods.LVM_SETTEXTCOLOR,0,ColorTranslator.ToWin32(base.ForeColor)); 4275SendMessage(NativeMethods.LVM_SETTEXTBKCOLOR, 0,NativeMethods.CLR_NONE); 4281int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 4282style |= NativeMethods.LVS_NOSCROLL; 4283UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 4288int callbackMask = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_GETCALLBACKMASK, 0, 0)); 4289callbackMask |= NativeMethods.LVIS_STATEIMAGEMASK; 4290UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETCALLBACKMASK, callbackMask, 0); 4294SendMessage(NativeMethods.LVM_SETVIEW,(int)viewStyle,0); 4340SendMessage(NativeMethods.LVM_SETITEMCOUNT, VirtualListSize, 0); 4552SendMessage(NativeMethods.LVM_SETBKCOLOR, 0,color); 4555SendMessage(NativeMethods.LVM_SETTEXTBKCOLOR, 0,NativeMethods.CLR_NONE); 4567IntPtr hdrHWND = UnsafeNativeMethods.GetWindow(new HandleRef(this, this.Handle), NativeMethods.GW_CHILD); 4573prc = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NativeMethods.RECT))); 4579pwpos = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NativeMethods.WINDOWPOS))); 4589NativeMethods.HDLAYOUT hd = new NativeMethods.HDLAYOUT(); 4594UnsafeNativeMethods.SendMessage(new HandleRef(this, hdrHWND), NativeMethods.HDM_LAYOUT, 0, ref hd); 4597NativeMethods.WINDOWPOS wpos = (NativeMethods.WINDOWPOS) Marshal.PtrToStructure(pwpos, typeof(NativeMethods.WINDOWPOS)); 4606wpos.flags | NativeMethods.SWP_SHOWWINDOW); 4625NativeMethods.LVITEM lvItem = new NativeMethods.LVITEM(); 4644SendMessage(NativeMethods.LVM_SETBKCOLOR, 0, ColorTranslator.ToWin32(c)); 4648SendMessage(NativeMethods.LVM_SETTEXTCOLOR, 0, ColorTranslator.ToWin32(c)); 4652SendMessage(NativeMethods.LVM_SETIMAGELIST, NativeMethods.LVSIL_NORMAL, imageListLarge.Handle); 4655SendMessage(NativeMethods.LVM_SETIMAGELIST, NativeMethods.LVSIL_SMALL, imageListSmall.Handle); 4658SendMessage(NativeMethods.LVM_SETIMAGELIST, NativeMethods.LVSIL_STATE, imageListState.Handle); 4698NativeMethods.LVM_REDRAWITEMS, 4761int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_REMOVEGROUP, group.ID, IntPtr.Zero); 4771UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SCROLL, 0, scrollY); 4778NativeMethods.LVBKIMAGE lvbkImage = new NativeMethods.LVBKIMAGE(); 4815lvbkImage.ulFlags = NativeMethods.LVBKIF_SOURCE_URL; 4817lvbkImage.ulFlags |= NativeMethods.LVBKIF_STYLE_TILE; 4819lvbkImage.ulFlags |= NativeMethods.LVBKIF_STYLE_NORMAL; 4822lvbkImage.ulFlags = NativeMethods.LVBKIF_SOURCE_NONE; 4826UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETBKIMAGE, 0, lvbkImage); 4871Debug.Assert((mask & ~(NativeMethods.LVCF_FMT | NativeMethods.LVCF_TEXT | NativeMethods.LVCF_IMAGE)) == 0, "Unsupported mask in setColumnInfo"); 4872NativeMethods.LVCOLUMN lvColumn = new NativeMethods.LVCOLUMN(); 4875if ((mask & NativeMethods.LVCF_IMAGE) != 0 || (mask & NativeMethods.LVCF_FMT) != 0) { 4879lvColumn.mask |= NativeMethods.LVCF_FMT; 4885lvColumn.fmt |= NativeMethods.LVCFMT_IMAGE; 4891if ((mask & NativeMethods.LVCF_TEXT) != 0) { 4895int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETCOLUMN, ch.Index, lvColumn); 4896if ((mask & NativeMethods.LVCF_TEXT) != 0) { 4936if (width == NativeMethods.LVSCW_AUTOSIZE_USEHEADER) { 4938} else if (width == NativeMethods.LVSCW_AUTOSIZE) { 4945width = NativeMethods.LVSCW_AUTOSIZE_USEHEADER; 4948width = NativeMethods.LVSCW_AUTOSIZE; 4952SendMessage(NativeMethods.LVM_SETCOLUMNWIDTH, columnIndex, NativeMethods.Util.MAKELPARAM(width, 0)); 4960SendMessage(NativeMethods.LVM_SETCOLUMNWIDTH, columnIndex, NativeMethods.Util.MAKELPARAM(newWidth, 0)); 4967SendMessage(NativeMethods.LVM_SETCOLUMNWIDTH, index, NativeMethods.Util.MAKELPARAM(width,0)); 4981UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETCOLUMNORDERARRAY, orderedColumns.Length, orderedColumns); 5045IntPtr oldHandle = UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 5054NativeMethods.LVITEM lvItem = new NativeMethods.LVITEM(); 5055lvItem.mask = NativeMethods.LVIF_IMAGE; 5058UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEM, 0, ref lvItem); 5067NativeMethods.LVITEM lvItem = new NativeMethods.LVITEM(); 5068lvItem.mask = NativeMethods.LVIF_INDENT; 5071UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEM, 0, ref lvItem); 5083NativeMethods.POINT pt = new NativeMethods.POINT(); 5086UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEMPOSITION32, index, pt); 5096NativeMethods.LVITEM lvItem = new NativeMethods.LVITEM(); 5097lvItem.mask = NativeMethods.LVIF_STATE; 5100UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEMSTATE, index, ref lvItem); 5106NativeMethods.LVITEM lvItem = new NativeMethods.LVITEM(); 5113private void SetItemText(int itemIndex, int subItemIndex, string text, ref NativeMethods.LVITEM lvItem) { 5120int colWidth = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_GETCOLUMNWIDTH, 0, 0)); 5137lvItem.mask = NativeMethods.LVIF_TEXT; 5142UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SETITEMTEXT, itemIndex, ref lvItem); 5156SendMessage(NativeMethods.LVM_SETSELECTIONMARK, 0, itemIndex); 5162SendMessage(NativeMethods.LVM_SETIMAGELIST, (IntPtr) NativeMethods.LVSIL_SMALL, handle); 5179NativeMethods.ListViewCompareCallback callback = new NativeMethods.ListViewCompareCallback(this.CompareFunc); 5180UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SORTITEMS, IntPtr.Zero, callback); 5190SendMessage(NativeMethods.LVM_SETIMAGELIST, (IntPtr) NativeMethods.LVSIL_STATE, handle); 5237SendMessage(NativeMethods.LVM_UPDATE, -1, 0); 5262int exMask = NativeMethods.LVS_EX_ONECLICKACTIVATE | NativeMethods.LVS_EX_TWOCLICKACTIVATE | 5263NativeMethods.LVS_EX_TRACKSELECT | NativeMethods.LVS_EX_UNDERLINEHOT | NativeMethods.LVS_EX_ONECLICKACTIVATE | 5264NativeMethods.LVS_EX_HEADERDRAGDROP | NativeMethods.LVS_EX_CHECKBOXES | 5265NativeMethods.LVS_EX_FULLROWSELECT | NativeMethods.LVS_EX_GRIDLINES | 5266NativeMethods.LVS_EX_INFOTIP | NativeMethods.LVS_EX_DOUBLEBUFFER; 5270exStyle |= NativeMethods.LVS_EX_ONECLICKACTIVATE; 5273exStyle |= NativeMethods.LVS_EX_TWOCLICKACTIVATE; 5278exStyle |= NativeMethods.LVS_EX_HEADERDRAGDROP; 5281exStyle |= NativeMethods.LVS_EX_CHECKBOXES; 5284exStyle |= NativeMethods.LVS_EX_DOUBLEBUFFER; 5287exStyle |= NativeMethods.LVS_EX_FULLROWSELECT; 5290exStyle |= NativeMethods.LVS_EX_GRIDLINES; 5293exStyle |= NativeMethods.LVS_EX_TRACKSELECT; 5296exStyle |= NativeMethods.LVS_EX_UNDERLINEHOT; 5299exStyle |= NativeMethods.LVS_EX_INFOTIP; 5301SendMessage(NativeMethods.LVM_SETEXTENDEDLISTVIEWSTYLE, exMask, exStyle); 5310NativeMethods.LVGROUP lvgroup = new NativeMethods.LVGROUP(); 5314NativeMethods.LVM_SETGROUPINFO, 5333int retval = unchecked( (int) (long)SendMessage(NativeMethods.LVM_ENABLEGROUPVIEW, GroupsEnabled ? 1 : 0, 0)); 5342NativeMethods.LVTILEVIEWINFO tileViewInfo = new NativeMethods.LVTILEVIEWINFO(); 5344tileViewInfo.dwMask = NativeMethods.LVTVIM_COLUMNS; 5348tileViewInfo.dwMask |= NativeMethods.LVTVIM_TILESIZE; 5349tileViewInfo.dwFlags = NativeMethods.LVTVIF_FIXEDSIZE; 5350tileViewInfo.sizeTile = new NativeMethods.SIZE(this.TileSize.Width, this.TileSize.Height); 5352bool retval = UnsafeNativeMethods.SendMessage(new HandleRef(this,Handle),NativeMethods.LVM_SETTILEVIEWINFO,0,tileViewInfo); 5364NativeMethods.LVHITTESTINFO lvhi = new NativeMethods.LVHITTESTINFO(); 5369int displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi); 5370if (displayIndex != -1 && (lvhi.flags & NativeMethods.LVHT_ONITEMSTATEICON) != 0) { 5394NativeMethods.LVHITTESTINFO lvhi = new NativeMethods.LVHITTESTINFO(); 5399int displayIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi); 5400if (displayIndex != -1 && (lvhi.flags & NativeMethods.LVHT_ONITEM) != 0) { 5419int x = NativeMethods.Util.SignedLOWORD(m.LParam); 5420int y = NativeMethods.Util.SignedHIWORD(m.LParam); 5453NativeMethods.NMHDR* nmhdr = (NativeMethods.NMHDR*)m.LParam; 5456if (nmhdr->code == NativeMethods.NM_CUSTOMDRAW && OwnerDraw) 5460NativeMethods.NMCUSTOMDRAW* nmcd = (NativeMethods.NMCUSTOMDRAW*)m.LParam; 5464case NativeMethods.CDDS_PREPAINT: 5466m.Result = (IntPtr)(NativeMethods.CDRF_NOTIFYITEMDRAW); 5470case NativeMethods.CDDS_ITEMPREPAINT: 5495m.Result = (IntPtr)(NativeMethods.CDRF_DODEFAULT); 5501m.Result = (IntPtr)(NativeMethods.CDRF_SKIPDEFAULT); 5513m.Result = (IntPtr)NativeMethods.CDRF_DODEFAULT; 5518if (nmhdr->code == NativeMethods.NM_RELEASEDCAPTURE && listViewState[LISTVIEWSTATE_columnClicked]) { 5523if (nmhdr->code == NativeMethods.HDN_BEGINTRACKA || 5524nmhdr->code == NativeMethods.HDN_BEGINTRACKW) { 5532NativeMethods.NMHEADER nmheader = (NativeMethods.NMHEADER) m.GetLParam(typeof(NativeMethods.NMHEADER)); 5542if (nmhdr->code == NativeMethods.HDN_ITEMCHANGINGA || 5543nmhdr->code == NativeMethods.HDN_ITEMCHANGINGW) { 5544NativeMethods.NMHEADER nmheader = (NativeMethods.NMHEADER) m.GetLParam(typeof(NativeMethods.NMHEADER)); 5552NativeMethods.HDITEM2 hdItem = (NativeMethods.HDITEM2) UnsafeNativeMethods.PtrToStructure((IntPtr) nmheader.pItem, typeof(NativeMethods.HDITEM2)); 5553int newColumnWidth = ((hdItem.mask & NativeMethods.HDI_WIDTH) != 0) ? hdItem.cxy : -1; 5577if ((nmhdr->code == NativeMethods.HDN_ITEMCHANGEDA || 5578nmhdr->code == NativeMethods.HDN_ITEMCHANGEDW) && 5580NativeMethods.NMHEADER nmheader = (NativeMethods.NMHEADER)m.GetLParam(typeof(NativeMethods.NMHEADER)); 5626if (nmhdr->code == NativeMethods.HDN_ENDTRACKA || 5627nmhdr->code == NativeMethods.HDN_ENDTRACKW) { 5633NativeMethods.NMHEADER nmheader = (NativeMethods.NMHEADER)m.GetLParam(typeof(NativeMethods.NMHEADER)); 5649if (nmhdr->code == NativeMethods.HDN_ENDDRAG) { 5650NativeMethods.NMHEADER header = (NativeMethods.NMHEADER) m.GetLParam(typeof(NativeMethods.NMHEADER)); 5656NativeMethods.HDITEM2 hdItem = (NativeMethods.HDITEM2) UnsafeNativeMethods.PtrToStructure((IntPtr) header.pItem, typeof(NativeMethods.HDITEM2)); 5657if ((hdItem.mask & NativeMethods.HDI_ORDER) == NativeMethods.HDI_ORDER) { 5708if (nmhdr->code == NativeMethods.HDN_DIVIDERDBLCLICKA || 5709nmhdr->code == NativeMethods.HDN_DIVIDERDBLCLICKW) { 5743NativeMethods.NMHEADER nmheader = (NativeMethods.NMHEADER) m.GetLParam(typeof(NativeMethods.NMHEADER)); 5774IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_GETHEADER, 0, 0); 5775IntPtr hFont = UnsafeNativeMethods.SendMessage(new HandleRef(this, hwndHdr), NativeMethods.WM_GETFONT, 0, 0); 5786private int GetIndexOfClickedItem(NativeMethods.LVHITTESTINFO lvhi) { 5791return (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_HITTEST, 0, lvhi); 5801SendMessage(NativeMethods.LVM_SETIMAGELIST, NativeMethods.LVSIL_STATE, IntPtr.Zero); 5814NativeMethods.NMHDR* nmhdr = (NativeMethods.NMHDR*)m.LParam; 5817case NativeMethods.NM_CUSTOMDRAW: 5821case NativeMethods.LVN_BEGINLABELEDITA: 5822case NativeMethods.LVN_BEGINLABELEDITW: { 5823NativeMethods.NMLVDISPINFO_NOTEXT nmlvdp = (NativeMethods.NMLVDISPINFO_NOTEXT)m.GetLParam(typeof(NativeMethods.NMLVDISPINFO_NOTEXT)); 5831case NativeMethods.LVN_COLUMNCLICK: { 5832NativeMethods.NMLISTVIEW nmlv = (NativeMethods.NMLISTVIEW)m.GetLParam(typeof(NativeMethods.NMLISTVIEW)); 5838case NativeMethods.LVN_ENDLABELEDITA: 5839case NativeMethods.LVN_ENDLABELEDITW: { 5841NativeMethods.NMLVDISPINFO nmlvdp = (NativeMethods.NMLVDISPINFO)m.GetLParam(typeof(NativeMethods.NMLVDISPINFO)); 5852case NativeMethods.LVN_ITEMACTIVATE: 5856case NativeMethods.LVN_BEGINDRAG: { 5862NativeMethods.NMLISTVIEW nmlv = (NativeMethods.NMLISTVIEW)m.GetLParam(typeof(NativeMethods.NMLISTVIEW)); 5869case NativeMethods.LVN_BEGINRDRAG: { 5875NativeMethods.NMLISTVIEW nmlv = (NativeMethods.NMLISTVIEW)m.GetLParam(typeof(NativeMethods.NMLISTVIEW)); 5882case NativeMethods.LVN_ITEMCHANGING: { 5883NativeMethods.NMLISTVIEW* nmlv = (NativeMethods.NMLISTVIEW*)m.LParam; 5884if ((nmlv->uChanged & NativeMethods.LVIF_STATE) != 0) { 5887CheckState oldState = (CheckState)(((nmlv->uOldState & NativeMethods.LVIS_STATEIMAGEMASK) >> 12) == 1 ? 0 : 1); 5888CheckState newState = (CheckState)(((nmlv->uNewState & NativeMethods.LVIS_STATEIMAGEMASK) >> 12) == 1 ? 0 : 1); 5899case NativeMethods.LVN_ITEMCHANGED: { 5900NativeMethods.NMLISTVIEW* nmlv = (NativeMethods.NMLISTVIEW*)m.LParam; 5902if ((nmlv->uChanged & NativeMethods.LVIF_STATE) != 0) { 5905CheckState oldValue = (CheckState)(((nmlv->uOldState & NativeMethods.LVIS_STATEIMAGEMASK) >> 12) == 1 ? 0 : 1); 5906CheckState newValue = (CheckState)(((nmlv->uNewState & NativeMethods.LVIS_STATEIMAGEMASK) >> 12) == 1 ? 0 : 1); 5917int oldState = nmlv->uOldState & NativeMethods.LVIS_SELECTED; 5918int newState = nmlv->uNewState & NativeMethods.LVIS_SELECTED; 5964case NativeMethods.NM_CLICK: 5967goto case NativeMethods.NM_RCLICK; 5969case NativeMethods.NM_RCLICK: 5970NativeMethods.LVHITTESTINFO lvhi = new NativeMethods.LVHITTESTINFO(); 5973MouseButtons button = nmhdr->code == NativeMethods.NM_CLICK ? MouseButtons.Left : MouseButtons.Right; 5988case NativeMethods.NM_DBLCLK: 5991goto case NativeMethods.NM_RDBLCLK; 5993case NativeMethods.NM_RDBLCLK: 5994NativeMethods.LVHITTESTINFO lvhip = new NativeMethods.LVHITTESTINFO(); 6008case NativeMethods.LVN_KEYDOWN: 6010NativeMethods.NMLVKEYDOWN lvkd = (NativeMethods.NMLVKEYDOWN)m.GetLParam(typeof(NativeMethods.NMLVKEYDOWN)); 6027case NativeMethods.LVN_ODCACHEHINT: 6029NativeMethods.NMLVCACHEHINT cacheHint = (NativeMethods.NMLVCACHEHINT) m.GetLParam(typeof(NativeMethods.NMLVCACHEHINT)); 6034if (nmhdr->code == NativeMethods.LVN_GETDISPINFO) { 6038NativeMethods.NMLVDISPINFO_NOTEXT dispInfo= (NativeMethods.NMLVDISPINFO_NOTEXT) m.GetLParam(typeof(NativeMethods.NMLVDISPINFO_NOTEXT)); 6049if ((dispInfo.item.mask & NativeMethods.LVIF_TEXT) != 0) { 6078if ((dispInfo.item.mask & NativeMethods.LVIF_IMAGE) != 0 && lvItem.ImageIndex != -1) { 6082if ((dispInfo.item.mask & NativeMethods.LVIF_INDENT) != 0) { 6115if ((dispInfo.item.stateMask & NativeMethods.LVIS_STATEIMAGEMASK) != 0) { 6122else if (nmhdr->code == NativeMethods.LVN_ODSTATECHANGED) { 6124NativeMethods.NMLVODSTATECHANGE odStateChange = (NativeMethods.NMLVODSTATECHANGE) m.GetLParam(typeof(NativeMethods.NMLVODSTATECHANGE)); 6125bool selectedChanged = (odStateChange.uNewState & NativeMethods.LVIS_SELECTED) != (odStateChange.uOldState & NativeMethods.LVIS_SELECTED); 6134ListViewVirtualItemsSelectionRangeChangedEventArgs lvvisrce = new ListViewVirtualItemsSelectionRangeChangedEventArgs(odStateChange.iFrom, iTo, (odStateChange.uNewState & NativeMethods.LVIS_SELECTED) != 0); 6139else if (nmhdr->code == NativeMethods.LVN_GETINFOTIP) { 6141NativeMethods.NMLVGETINFOTIP infoTip = (NativeMethods.NMLVGETINFOTIP) m.GetLParam(typeof(NativeMethods.NMLVGETINFOTIP)); 6150UnsafeNativeMethods.SendMessage(new HandleRef(this, nmhdr->hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 6167else if (nmhdr->code == NativeMethods.LVN_ODFINDITEM) { 6169NativeMethods.NMLVFINDITEM nmlvif = (NativeMethods.NMLVFINDITEM) m.GetLParam(typeof(NativeMethods.NMLVFINDITEM)); 6171if ((nmlvif.lvfi.flags & NativeMethods.LVFI_PARAM) != 0) { 6176bool isTextSearch = ((nmlvif.lvfi.flags & NativeMethods.LVFI_STRING) != 0) || 6177((nmlvif.lvfi.flags & NativeMethods.LVFI_PARTIAL) != 0); 6179bool isPrefixSearch = (nmlvif.lvfi.flags & NativeMethods.LVFI_PARTIAL) != 0; 6187if ((nmlvif.lvfi.flags & NativeMethods.LVFI_NEARESTXY) != 0) { 6192if ((nmlvif.lvfi.flags & NativeMethods.LVFI_NEARESTXY) != 0) { 6227if ((NativeMethods.PRF_NONCLIENT & (int)m.LParam) != 0 && Application.RenderWithVisualStyles && this.BorderStyle == BorderStyle.Fixed3D) { 6251case NativeMethods.WM_REFLECT + NativeMethods.WM_NOTIFY: 6254case NativeMethods.WM_LBUTTONDBLCLK: 6263case NativeMethods.WM_LBUTTONDOWN: 6272case NativeMethods.WM_LBUTTONUP: 6273case NativeMethods.WM_RBUTTONUP: 6274case NativeMethods.WM_MBUTTONUP: 6278NativeMethods.LVHITTESTINFO lvhip = new NativeMethods.LVHITTESTINFO(); 6284OnMouseDoubleClick(new MouseEventArgs(downButton, 2, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 6288OnMouseUp(new MouseEventArgs(downButton, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 6297case NativeMethods.WM_MBUTTONDBLCLK: 6300case NativeMethods.WM_MBUTTONDOWN: 6304case NativeMethods.WM_RBUTTONDBLCLK: 6307case NativeMethods.WM_RBUTTONDOWN: 6311case NativeMethods.WM_MOUSEMOVE: 6314OnMouseUp(new MouseEventArgs(downButton, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 6320case NativeMethods.WM_MOUSEHOVER: 6327case NativeMethods.WM_NOTIFY: 6336case NativeMethods.WM_SETFOCUS: 6353case NativeMethods.WM_MOUSELEAVE: 6360case NativeMethods.WM_PAINT: 6366case NativeMethods.WM_PRINT: 6369case NativeMethods.WM_TIMER: 6990return unchecked( (int) (long)owner.SendMessage(NativeMethods.LVM_GETSELECTEDCOUNT, 0, 0)); 7009int fidx = unchecked( (int) (long)owner.SendMessage(NativeMethods.LVM_GETNEXTITEM, displayIndex, NativeMethods.LVNI_SELECTED)); 7048fidx = unchecked( (int) (long)owner.SendMessage(NativeMethods.LVM_GETNEXTITEM, fidx, NativeMethods.LVNI_SELECTED)); 7207this.owner.SetItemState(itemIndex, NativeMethods.LVIS_SELECTED, NativeMethods.LVIS_SELECTED); 7235this.owner.SetItemState(-1, 0, NativeMethods.LVIS_SELECTED); 7271this.owner.SetItemState(itemIndex, 0, NativeMethods.LVIS_SELECTED); 7310int cnt = unchecked( (int) (long)owner.SendMessage(NativeMethods.LVM_GETSELECTEDCOUNT, 0, 0)); 7317int fidx = unchecked( (int) (long)owner.SendMessage(NativeMethods.LVM_GETNEXTITEM, displayIndex, NativeMethods.LVNI_SELECTED)); 7357return unchecked( (int) (long)owner.SendMessage(NativeMethods.LVM_GETSELECTEDCOUNT, 0, 0)); 7390fidx = unchecked( (int) (long)owner.SendMessage(NativeMethods.LVM_GETNEXTITEM, fidx, NativeMethods.LVNI_SELECTED)); 8004owner.SendMessage(NativeMethods.LVM_DELETECOLUMN, colIdx, 0); 8186int retval = unchecked( (int) (long)owner.SendMessage(NativeMethods.LVM_DELETECOLUMN, index, 0)); 8981NativeMethods.LVITEM lvItem = new NativeMethods.LVITEM(); 8982lvItem.mask = NativeMethods.LVIF_PARAM; 8984UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.Handle), NativeMethods.LVM_GETITEM, 0, ref lvItem); 9003int nextSelected = (int)UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.Handle), NativeMethods.LVM_GETNEXTITEM, -1, NativeMethods.LVNI_SELECTED); 9013nextSelected = (int)UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.Handle), NativeMethods.LVM_GETNEXTITEM, nextSelected, NativeMethods.LVNI_SELECTED); 9025UnsafeNativeMethods.SendMessage(new HandleRef(owner, owner.Handle), NativeMethods.LVM_DELETEALLITEMS, 0, 0); 9163int retval = unchecked( (int) (long)owner.SendMessage(NativeMethods.LVM_DELETEITEM, index, 0)); 9235if (propertyID == NativeMethods.UIA_ItemStatusPropertyId) {
winforms\Managed\System\WinForms\ListViewAlignment.cs (4)
32Default = NativeMethods.LVA_DEFAULT, 40Top = NativeMethods.LVA_ALIGNTOP, 48Left = NativeMethods.LVA_ALIGNLEFT, 59SnapToGrid = NativeMethods.LVA_SNAPTOGRID,
winforms\Managed\System\WinForms\ListViewHitTestLocation.cs (6)
15None = NativeMethods.LVHT_NOWHERE, 19BelowClientArea = NativeMethods.LVHT_BELOW, 21LeftOfClientArea = NativeMethods.LVHT_LEFT, 23RightOfClientArea = NativeMethods.LVHT_RIGHT, 25Image = NativeMethods.LVHT_ONITEMICON, 29Label = NativeMethods.LVHT_ONITEMLABEL
winforms\Managed\System\WinForms\ListViewInsertionMark.cs (15)
63NativeMethods.RECT rect = new NativeMethods.RECT(); 64listView.SendMessage(NativeMethods.LVM_GETINSERTMARKRECT, 0, ref rect); 78color = SafeNativeMethods.ColorFromCOLORREF((int)listView.SendMessage(NativeMethods.LVM_GETINSERTMARKCOLOR, 0, 0)); 87listView.SendMessage(NativeMethods.LVM_SETINSERTMARKCOLOR, 0, SafeNativeMethods.ColorToCOLORREF(color)); 122NativeMethods.POINT point = new NativeMethods.POINT(); 126NativeMethods.LVINSERTMARK lvInsertMark = new NativeMethods.LVINSERTMARK(); 127UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.Handle), NativeMethods.LVM_INSERTMARKHITTEST, point, lvInsertMark); 134NativeMethods.LVINSERTMARK lvInsertMark = new NativeMethods.LVINSERTMARK(); 135lvInsertMark.dwFlags = appearsAfterItem ? NativeMethods.LVIM_AFTER : 0; 137UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.Handle), NativeMethods.LVM_SETINSERTMARK, 0, lvInsertMark); 140listView.SendMessage(NativeMethods.LVM_SETINSERTMARKCOLOR, 0, SafeNativeMethods.ColorToCOLORREF(color));
winforms\Managed\System\WinForms\ListViewItem.cs (30)
420return(listView.GetItemState(Index, NativeMethods.LVIS_FOCUSED) != 0); 427listView.SetItemState(Index, value ? NativeMethods.LVIS_FOCUSED : 0, NativeMethods.LVIS_FOCUSED); 746return(listView.GetItemState(Index, NativeMethods.LVIS_SELECTED) != 0); 753listView.SetItemState(Index, value ? NativeMethods.LVIS_SELECTED: 0, NativeMethods.LVIS_SELECTED); 786int state = listView.GetItemState(Index, NativeMethods.LVIS_STATEIMAGEMASK); 798listView.SetItemState(Index, state, NativeMethods.LVIS_STATEIMAGEMASK); 962UnsafeNativeMethods.SendMessage(new HandleRef(lv, lv.Handle), NativeMethods.LVM_EDITLABEL, Index, 0); 1116NativeMethods.LVITEM lvItem = new NativeMethods.LVITEM(); 1125internal void UpdateStateToListView(int index, ref NativeMethods.LVITEM lvItem, bool updateOwner) { 1142itemState |= NativeMethods.LVIS_SELECTED; 1143stateMask |= NativeMethods.LVIS_SELECTED; 1148stateMask |= NativeMethods.LVIS_STATEIMAGEMASK; 1151lvItem.mask |= NativeMethods.LVIF_STATE; 1157lvItem.mask |= NativeMethods.LVIF_GROUPID; 1160Debug.Assert(!updateOwner || listView.SendMessage(NativeMethods.LVM_ISGROUPVIEWENABLED, 0, 0) != IntPtr.Zero, "Groups not enabled"); 1161Debug.Assert(!updateOwner || listView.SendMessage(NativeMethods.LVM_HASGROUP, lvItem.iGroupId, 0) != IntPtr.Zero, "Doesn't contain group id: " + lvItem.iGroupId.ToString(CultureInfo.InvariantCulture)); 1165UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.Handle), NativeMethods.LVM_SETITEM, 0, ref lvItem); 1174NativeMethods.LVITEM lvItem = new NativeMethods.LVITEM(); 1175lvItem.mask = NativeMethods.LVIF_PARAM | NativeMethods.LVIF_STATE | NativeMethods.LVIF_GROUPID; 1178lvItem.stateMask = NativeMethods.LVIS_SELECTED; 1183lvItem.stateMask |= NativeMethods.LVIS_STATEIMAGEMASK; 1193UnsafeNativeMethods.SendMessage(new HandleRef(listView, listView.Handle), NativeMethods.LVM_GETITEM, 0, ref lvItem); 1198StateSelected = (lvItem.state & NativeMethods.LVIS_SELECTED) != 0; 1200SavedStateImageIndex = ((lvItem.state & NativeMethods.LVIS_STATEIMAGEMASK) >> 12) - 1;
winforms\Managed\System\WinForms\ListViewItemState.cs (9)
26Checked = NativeMethods.CDIS_CHECKED, 34Default = NativeMethods.CDIS_DEFAULT, 42Focused = NativeMethods.CDIS_FOCUS, 50Grayed = NativeMethods.CDIS_GRAYED, 58Hot = NativeMethods.CDIS_HOT, 66Indeterminate = NativeMethods.CDIS_INDETERMINATE, 74Marked = NativeMethods.CDIS_MARKED, 82Selected = NativeMethods.CDIS_SELECTED, 90ShowKeyboardCues = NativeMethods.CDIS_SHOWKEYBOARDCUES
winforms\Managed\System\WinForms\MaskedTextBox.cs (30)
351cp.ExStyle &= ~NativeMethods.WS_EX_RIGHT; // WS_EX_RIGHT overrides the ES_XXXX alignment styles 355cp.Style |= NativeMethods.ES_LEFT; 358cp.Style |= NativeMethods.ES_CENTER; 361cp.Style |= NativeMethods.ES_RIGHT; 1193ImeNotify(NativeMethods.CPS_COMPLETE); 1208UnsafeNativeMethods.ImmNotifyIME(new HandleRef(null, inputContext), NativeMethods.NI_COMPOSITIONSTR, action, 0); 1230SendMessage(NativeMethods.EM_SETPASSWORDCHAR, pwdChar, 0); 2007SafeNativeMethods.RedrawWindow(new HandleRef(this, this.Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME); 2721if( m.Msg == NativeMethods.WM_CHAR && base.ImeWmCharsToIgnore > 0 ) { 3056if ((m.LParam.ToInt32() & NativeMethods.GCS_COMPSTR) != 0) 3061else if ((m.LParam.ToInt32() & NativeMethods.GCS_RESULTSTR) != 0) 3177if ((NativeMethods.PRF_NONCLIENT & unchecked( (int) (long)m.LParam)) != 0 && Application.RenderWithVisualStyles && this.BorderStyle == BorderStyle.Fixed3D) { 3205case NativeMethods.WM_PRINT: 3208case NativeMethods.WM_CONTEXTMENU: 3209case NativeMethods.EM_CANUNDO: 3214case NativeMethods.EM_SCROLLCARET: // No scroll for single-line control. 3215case NativeMethods.EM_LIMITTEXT: // Max/Min text is defined by the mask. 3216case NativeMethods.EM_UNDO: 3217case NativeMethods.WM_UNDO: 3232case NativeMethods.WM_IME_STARTCOMPOSITION: 3239case NativeMethods.WM_IME_ENDCOMPOSITION: 3243case NativeMethods.WM_IME_COMPOSITION: 3250case NativeMethods.WM_CUT: 3257case NativeMethods.WM_COPY: 3261case NativeMethods.WM_PASTE: 3265case NativeMethods.WM_CLEAR: 3269case NativeMethods.WM_KILLFOCUS: 3274case NativeMethods.WM_SETFOCUS:
winforms\Managed\System\WinForms\MDIClient.cs (26)
118cp.Style |= NativeMethods.WS_VSCROLL | NativeMethods.WS_HSCROLL; 119cp.ExStyle |= NativeMethods.WS_EX_CLIENTEDGE; 120cp.Param = new NativeMethods.CLIENTCREATESTRUCT(IntPtr.Zero, 1); 123cp.Style |= NativeMethods.WS_DISABLED; 129cp.ExStyle |= NativeMethods.WS_EX_LAYOUTRTL | NativeMethods.WS_EX_NOINHERITLAYOUT; 131cp.ExStyle &= ~(NativeMethods.WS_EX_RTLREADING | NativeMethods.WS_EX_RIGHT | NativeMethods.WS_EX_LEFTSCROLLBAR); 171SendMessage(NativeMethods.WM_MDICASCADE, 0, 0); 174SendMessage(NativeMethods.WM_MDITILE, NativeMethods.MDITILE_VERTICAL, 0); 177SendMessage(NativeMethods.WM_MDITILE, NativeMethods.MDITILE_HORIZONTAL, 0); 180SendMessage(NativeMethods.WM_MDIICONARRANGE, 0, 0); 250NativeMethods.WINDOWPLACEMENT wp = new NativeMethods.WINDOWPLACEMENT(); 251wp.length = Marshal.SizeOf(typeof(NativeMethods.WINDOWPLACEMENT)); 270wp.flags = NativeMethods.WPF_SETMINPOSITION; 292NativeMethods.RECT rect = new NativeMethods.RECT(); 306if (SafeNativeMethods.CombineRgn(new HandleRef(null, rgn1), new HandleRef(null, rgn1), new HandleRef(null, rgn2), NativeMethods.RGN_DIFF) == 0) 355case NativeMethods.WM_CREATE: 361case NativeMethods.WM_SETFOCUS: 380case NativeMethods.WM_KILLFOCUS:
winforms\Managed\System\WinForms\MDIControlStrip.cs (5)
40minimize = new ControlBoxMenuItem(hMenu, NativeMethods.SC_MINIMIZE, target); 41close = new ControlBoxMenuItem(hMenu, NativeMethods.SC_CLOSE, target); 42restore = new ControlBoxMenuItem(hMenu, NativeMethods.SC_RESTORE, target); 131IntPtr hIcon = UnsafeNativeMethods.SendMessage(new HandleRef(this, Control.GetSafeHandle(target)), NativeMethods.WM_GETICON, NativeMethods.ICON_SMALL, 0);
winforms\Managed\System\WinForms\Menu.cs (5)
283UnsafeNativeMethods.RemoveMenu(new HandleRef(this, handle), 0, NativeMethods.MF_BYPOSITION); 489int action = multipleMatches ? NativeMethods.MNC_SELECT : NativeMethods.MNC_EXECUTE; 490return (IntPtr) NativeMethods.Util.MAKELONG(firstMatch, action); 634char menuKey = Char.ToUpper((char) NativeMethods.Util.LOWORD(m.WParam), CultureInfo.CurrentCulture);
winforms\Managed\System\WinForms\MenuGlyph.cs (5)
28Arrow = NativeMethods.DFCS_MENUARROW, 34Checkmark = NativeMethods.DFCS_MENUCHECK, 40Bullet = NativeMethods.DFCS_MENUBULLET, 46Min = NativeMethods.DFCS_MENUARROW, 51Max = NativeMethods.DFCS_MENUBULLET,
winforms\Managed\System\WinForms\MenuItem.cs (41)
450NativeMethods.MENUITEMINFO_T info = new NativeMethods.MENUITEMINFO_T(); 451info.cbSize = Marshal.SizeOf(typeof(NativeMethods.MENUITEMINFO_T)); 452info.fMask = NativeMethods.MIIM_STATE; 475NativeMethods.MENUITEMINFO_T info = new NativeMethods.MENUITEMINFO_T(); 476info.cbSize = Marshal.SizeOf(typeof(NativeMethods.MENUITEMINFO_T)); 477info.fMask = NativeMethods.MIIM_ID | NativeMethods.MIIM_SUBMENU; 856NativeMethods.MENUITEMINFO_T info = CreateMenuItemInfo(); 877private NativeMethods.MENUITEMINFO_T CreateMenuItemInfo() { 878NativeMethods.MENUITEMINFO_T info = new NativeMethods.MENUITEMINFO_T(); 879info.fMask = NativeMethods.MIIM_ID | NativeMethods.MIIM_STATE | 880NativeMethods.MIIM_SUBMENU | NativeMethods.MIIM_TYPE | NativeMethods.MIIM_DATA; 894info.fType |= NativeMethods.MFT_MENUBREAK; 897info.fType |= NativeMethods.MFT_SEPARATOR; 1034public NativeMethods.MSAAMENUINFO msaaMenuInfo; 1038msaaMenuInfo = new NativeMethods.MSAAMENUINFO(text); 1428NativeMethods.MENUITEMINFO_T info = new NativeMethods.MENUITEMINFO_T(); 1429info.fMask = NativeMethods.MIIM_TYPE | NativeMethods.MIIM_STATE | NativeMethods.MIIM_SUBMENU; 1431info.cbSize = Marshal.SizeOf(typeof(NativeMethods.MENUITEMINFO_T)); 1435info.fType |= NativeMethods.MFT_RIGHTJUSTIFY | NativeMethods.MFT_RIGHTORDER; 1437info.fType &= ~(NativeMethods.MFT_RIGHTJUSTIFY | NativeMethods.MFT_RIGHTORDER); 1460NativeMethods.MENUITEMINFO_T info = CreateMenuItemInfo(); 1492NativeMethods.DRAWITEMSTRUCT dis = (NativeMethods.DRAWITEMSTRUCT)m.GetLParam(typeof(NativeMethods.DRAWITEMSTRUCT)); 1522NativeMethods.MEASUREITEMSTRUCT mis = (NativeMethods.MEASUREITEMSTRUCT)m.GetLParam(typeof(NativeMethods.MEASUREITEMSTRUCT)); 1525IntPtr screendc = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 1534UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, screendc));
winforms\Managed\System\WinForms\MenuStrip.cs (5)
252UnsafeNativeMethods.PostMessage(WindowsFormsUtils.GetRootHWnd(this), NativeMethods.WM_SYSCOMMAND, NativeMethods.SC_KEYMENU, (int)Keys.Space); 269if (m.Msg == NativeMethods.WM_MOUSEACTIVATE && (ActiveDropDowns.Count == 0)) { 301if (AccessibilityImprovements.Level3 && propertyID == NativeMethods.UIA_ControlTypePropertyId) { 302return NativeMethods.UIA_MenuBarControlTypeId;
winforms\Managed\System\WinForms\MessageBox.cs (1)
495UnsafeNativeMethods.SendMessage(new HandleRef(owner, handle), NativeMethods.WM_SETFOCUS, 0, 0);
winforms\Managed\System\WinForms\MessageDecoder.cs (196)
34case NativeMethods.WM_NULL: text = "WM_NULL"; break; 35case NativeMethods.WM_CREATE: text = "WM_CREATE"; break; 36case NativeMethods.WM_DESTROY: text = "WM_DESTROY"; break; 37case NativeMethods.WM_MOVE: text = "WM_MOVE"; break; 38case NativeMethods.WM_SIZE: text = "WM_SIZE"; break; 39case NativeMethods.WM_ACTIVATE: text = "WM_ACTIVATE"; break; 43case NativeMethods.WM_SETFOCUS: text = "WM_SETFOCUS"; break; 44case NativeMethods.WM_KILLFOCUS: text = "WM_KILLFOCUS"; break; 45case NativeMethods.WM_ENABLE: text = "WM_ENABLE"; break; 46case NativeMethods.WM_SETREDRAW: text = "WM_SETREDRAW"; break; 47case NativeMethods.WM_SETTEXT: text = "WM_SETTEXT"; break; 48case NativeMethods.WM_GETTEXT: text = "WM_GETTEXT"; break; 49case NativeMethods.WM_GETTEXTLENGTH: text = "WM_GETTEXTLENGTH"; break; 50case NativeMethods.WM_PAINT: text = "WM_PAINT"; break; 51case NativeMethods.WM_CLOSE: text = "WM_CLOSE"; break; 52case NativeMethods.WM_QUERYENDSESSION: text = "WM_QUERYENDSESSION"; break; 53case NativeMethods.WM_QUIT: text = "WM_QUIT"; break; 54case NativeMethods.WM_QUERYOPEN: text = "WM_QUERYOPEN"; break; 55case NativeMethods.WM_ERASEBKGND: text = "WM_ERASEBKGND"; break; 56case NativeMethods.WM_SYSCOLORCHANGE: text = "WM_SYSCOLORCHANGE"; break; 57case NativeMethods.WM_ENDSESSION: text = "WM_ENDSESSION"; break; 58case NativeMethods.WM_SHOWWINDOW: text = "WM_SHOWWINDOW"; break; 59case NativeMethods.WM_WININICHANGE: text = "WM_WININICHANGE"; break; 61case NativeMethods.WM_DEVMODECHANGE: text = "WM_DEVMODECHANGE"; break; 62case NativeMethods.WM_ACTIVATEAPP: text = "WM_ACTIVATEAPP"; break; 63case NativeMethods.WM_FONTCHANGE: text = "WM_FONTCHANGE"; break; 64case NativeMethods.WM_TIMECHANGE: text = "WM_TIMECHANGE"; break; 65case NativeMethods.WM_CANCELMODE: text = "WM_CANCELMODE"; break; 66case NativeMethods.WM_SETCURSOR: text = "WM_SETCURSOR"; break; 67case NativeMethods.WM_MOUSEACTIVATE: text = "WM_MOUSEACTIVATE"; break; 68case NativeMethods.WM_CHILDACTIVATE: text = "WM_CHILDACTIVATE"; break; 69case NativeMethods.WM_QUEUESYNC: text = "WM_QUEUESYNC"; break; 70case NativeMethods.WM_GETMINMAXINFO: text = "WM_GETMINMAXINFO"; break; 71case NativeMethods.WM_PAINTICON: text = "WM_PAINTICON"; break; 72case NativeMethods.WM_ICONERASEBKGND: text = "WM_ICONERASEBKGND"; break; 73case NativeMethods.WM_NEXTDLGCTL: text = "WM_NEXTDLGCTL"; break; 74case NativeMethods.WM_SPOOLERSTATUS: text = "WM_SPOOLERSTATUS"; break; 75case NativeMethods.WM_DRAWITEM: text = "WM_DRAWITEM"; break; 76case NativeMethods.WM_MEASUREITEM: text = "WM_MEASUREITEM"; break; 77case NativeMethods.WM_DELETEITEM: text = "WM_DELETEITEM"; break; 78case NativeMethods.WM_VKEYTOITEM: text = "WM_VKEYTOITEM"; break; 79case NativeMethods.WM_CHARTOITEM: text = "WM_CHARTOITEM"; break; 80case NativeMethods.WM_SETFONT: text = "WM_SETFONT"; break; 81case NativeMethods.WM_GETFONT: text = "WM_GETFONT"; break; 82case NativeMethods.WM_SETHOTKEY: text = "WM_SETHOTKEY"; break; 83case NativeMethods.WM_GETHOTKEY: text = "WM_GETHOTKEY"; break; 84case NativeMethods.WM_QUERYDRAGICON: text = "WM_QUERYDRAGICON"; break; 85case NativeMethods.WM_COMPAREITEM: text = "WM_COMPAREITEM"; break; 86case NativeMethods.WM_GETOBJECT: text = "WM_GETOBJECT"; break; 87case NativeMethods.WM_COMPACTING: text = "WM_COMPACTING"; break; 88case NativeMethods.WM_COMMNOTIFY: text = "WM_COMMNOTIFY"; break; 89case NativeMethods.WM_WINDOWPOSCHANGING: text = "WM_WINDOWPOSCHANGING"; break; 90case NativeMethods.WM_WINDOWPOSCHANGED: text = "WM_WINDOWPOSCHANGED"; break; 91case NativeMethods.WM_POWER: text = "WM_POWER"; break; 92case NativeMethods.WM_COPYDATA: text = "WM_COPYDATA"; break; 93case NativeMethods.WM_CANCELJOURNAL: text = "WM_CANCELJOURNAL"; break; 94case NativeMethods.WM_NOTIFY: text = "WM_NOTIFY"; break; 95case NativeMethods.WM_INPUTLANGCHANGEREQUEST: text = "WM_INPUTLANGCHANGEREQUEST"; break; 96case NativeMethods.WM_INPUTLANGCHANGE: text = "WM_INPUTLANGCHANGE"; break; 97case NativeMethods.WM_TCARD: text = "WM_TCARD"; break; 98case NativeMethods.WM_HELP: text = "WM_HELP"; break; 99case NativeMethods.WM_USERCHANGED: text = "WM_USERCHANGED"; break; 100case NativeMethods.WM_NOTIFYFORMAT: text = "WM_NOTIFYFORMAT"; break; 101case NativeMethods.WM_CONTEXTMENU: text = "WM_CONTEXTMENU"; break; 102case NativeMethods.WM_STYLECHANGING: text = "WM_STYLECHANGING"; break; 103case NativeMethods.WM_STYLECHANGED: text = "WM_STYLECHANGED"; break; 104case NativeMethods.WM_DISPLAYCHANGE: text = "WM_DISPLAYCHANGE"; break; 105case NativeMethods.WM_GETICON: text = "WM_GETICON"; break; 106case NativeMethods.WM_SETICON: text = "WM_SETICON"; break; 107case NativeMethods.WM_NCCREATE: text = "WM_NCCREATE"; break; 108case NativeMethods.WM_NCDESTROY: text = "WM_NCDESTROY"; break; 109case NativeMethods.WM_NCCALCSIZE: text = "WM_NCCALCSIZE"; break; 110case NativeMethods.WM_NCHITTEST: text = "WM_NCHITTEST"; break; 111case NativeMethods.WM_NCPAINT: text = "WM_NCPAINT"; break; 112case NativeMethods.WM_NCACTIVATE: text = "WM_NCACTIVATE"; break; 113case NativeMethods.WM_GETDLGCODE: text = "WM_GETDLGCODE"; break; 114case NativeMethods.WM_NCMOUSEMOVE: text = "WM_NCMOUSEMOVE"; break; 115case NativeMethods.WM_NCLBUTTONDOWN: text = "WM_NCLBUTTONDOWN"; break; 116case NativeMethods.WM_NCLBUTTONUP: text = "WM_NCLBUTTONUP"; break; 117case NativeMethods.WM_NCLBUTTONDBLCLK: text = "WM_NCLBUTTONDBLCLK"; break; 118case NativeMethods.WM_NCRBUTTONDOWN: text = "WM_NCRBUTTONDOWN"; break; 119case NativeMethods.WM_NCRBUTTONUP: text = "WM_NCRBUTTONUP"; break; 120case NativeMethods.WM_NCRBUTTONDBLCLK: text = "WM_NCRBUTTONDBLCLK"; break; 121case NativeMethods.WM_NCMBUTTONDOWN: text = "WM_NCMBUTTONDOWN"; break; 122case NativeMethods.WM_NCMBUTTONUP: text = "WM_NCMBUTTONUP"; break; 123case NativeMethods.WM_NCMBUTTONDBLCLK: text = "WM_NCMBUTTONDBLCLK"; break; 125case NativeMethods.WM_KEYDOWN: text = "WM_KEYDOWN"; break; 126case NativeMethods.WM_KEYUP: text = "WM_KEYUP"; break; 127case NativeMethods.WM_CHAR: text = "WM_CHAR"; break; 128case NativeMethods.WM_DEADCHAR: text = "WM_DEADCHAR"; break; 129case NativeMethods.WM_SYSKEYDOWN: text = "WM_SYSKEYDOWN"; break; 130case NativeMethods.WM_SYSKEYUP: text = "WM_SYSKEYUP"; break; 131case NativeMethods.WM_SYSCHAR: text = "WM_SYSCHAR"; break; 132case NativeMethods.WM_SYSDEADCHAR: text = "WM_SYSDEADCHAR"; break; 133case NativeMethods.WM_KEYLAST: text = "WM_KEYLAST"; break; 134case NativeMethods.WM_IME_STARTCOMPOSITION: text = "WM_IME_STARTCOMPOSITION"; break; 135case NativeMethods.WM_IME_ENDCOMPOSITION: text = "WM_IME_ENDCOMPOSITION"; break; 136case NativeMethods.WM_IME_COMPOSITION: text = "WM_IME_COMPOSITION"; break; 138case NativeMethods.WM_INITDIALOG: text = "WM_INITDIALOG"; break; 139case NativeMethods.WM_COMMAND: text = "WM_COMMAND"; break; 140case NativeMethods.WM_SYSCOMMAND: text = "WM_SYSCOMMAND"; break; 141case NativeMethods.WM_TIMER: text = "WM_TIMER"; break; 142case NativeMethods.WM_HSCROLL: text = "WM_HSCROLL"; break; 143case NativeMethods.WM_VSCROLL: text = "WM_VSCROLL"; break; 144case NativeMethods.WM_INITMENU: text = "WM_INITMENU"; break; 145case NativeMethods.WM_INITMENUPOPUP: text = "WM_INITMENUPOPUP"; break; 146case NativeMethods.WM_MENUSELECT: text = "WM_MENUSELECT"; break; 147case NativeMethods.WM_MENUCHAR: text = "WM_MENUCHAR"; break; 148case NativeMethods.WM_ENTERIDLE: text = "WM_ENTERIDLE"; break; 149case NativeMethods.WM_CTLCOLORMSGBOX: text = "WM_CTLCOLORMSGBOX"; break; 150case NativeMethods.WM_CTLCOLOREDIT: text = "WM_CTLCOLOREDIT"; break; 151case NativeMethods.WM_CTLCOLORLISTBOX: text = "WM_CTLCOLORLISTBOX"; break; 152case NativeMethods.WM_CTLCOLORBTN: text = "WM_CTLCOLORBTN"; break; 153case NativeMethods.WM_CTLCOLORDLG: text = "WM_CTLCOLORDLG"; break; 154case NativeMethods.WM_CTLCOLORSCROLLBAR: text = "WM_CTLCOLORSCROLLBAR"; break; 155case NativeMethods.WM_CTLCOLORSTATIC: text = "WM_CTLCOLORSTATIC"; break; 157case NativeMethods.WM_MOUSEMOVE: text = "WM_MOUSEMOVE"; break; 158case NativeMethods.WM_LBUTTONDOWN: text = "WM_LBUTTONDOWN"; break; 159case NativeMethods.WM_LBUTTONUP: text = "WM_LBUTTONUP"; break; 160case NativeMethods.WM_LBUTTONDBLCLK: text = "WM_LBUTTONDBLCLK"; break; 161case NativeMethods.WM_RBUTTONDOWN: text = "WM_RBUTTONDOWN"; break; 162case NativeMethods.WM_RBUTTONUP: text = "WM_RBUTTONUP"; break; 163case NativeMethods.WM_RBUTTONDBLCLK: text = "WM_RBUTTONDBLCLK"; break; 164case NativeMethods.WM_MBUTTONDOWN: text = "WM_MBUTTONDOWN"; break; 165case NativeMethods.WM_MBUTTONUP: text = "WM_MBUTTONUP"; break; 166case NativeMethods.WM_MBUTTONDBLCLK: text = "WM_MBUTTONDBLCLK"; break; 167case NativeMethods.WM_MOUSEWHEEL: text = "WM_MOUSEWHEEL"; break; 169case NativeMethods.WM_PARENTNOTIFY: text = "WM_PARENTNOTIFY"; break; 170case NativeMethods.WM_ENTERMENULOOP: text = "WM_ENTERMENULOOP"; break; 171case NativeMethods.WM_EXITMENULOOP: text = "WM_EXITMENULOOP"; break; 172case NativeMethods.WM_NEXTMENU: text = "WM_NEXTMENU"; break; 173case NativeMethods.WM_SIZING: text = "WM_SIZING"; break; 174case NativeMethods.WM_CAPTURECHANGED: text = "WM_CAPTURECHANGED"; break; 175case NativeMethods.WM_MOVING: text = "WM_MOVING"; break; 176case NativeMethods.WM_POWERBROADCAST: text = "WM_POWERBROADCAST"; break; 177case NativeMethods.WM_DEVICECHANGE: text = "WM_DEVICECHANGE"; break; 178case NativeMethods.WM_IME_SETCONTEXT: text = "WM_IME_SETCONTEXT"; break; 179case NativeMethods.WM_IME_NOTIFY: text = "WM_IME_NOTIFY"; break; 180case NativeMethods.WM_IME_CONTROL: text = "WM_IME_CONTROL"; break; 181case NativeMethods.WM_IME_COMPOSITIONFULL: text = "WM_IME_COMPOSITIONFULL"; break; 182case NativeMethods.WM_IME_SELECT: text = "WM_IME_SELECT"; break; 183case NativeMethods.WM_IME_CHAR: text = "WM_IME_CHAR"; break; 184case NativeMethods.WM_IME_KEYDOWN: text = "WM_IME_KEYDOWN"; break; 185case NativeMethods.WM_IME_KEYUP: text = "WM_IME_KEYUP"; break; 186case NativeMethods.WM_MDICREATE: text = "WM_MDICREATE"; break; 187case NativeMethods.WM_MDIDESTROY: text = "WM_MDIDESTROY"; break; 188case NativeMethods.WM_MDIACTIVATE: text = "WM_MDIACTIVATE"; break; 189case NativeMethods.WM_MDIRESTORE: text = "WM_MDIRESTORE"; break; 190case NativeMethods.WM_MDINEXT: text = "WM_MDINEXT"; break; 191case NativeMethods.WM_MDIMAXIMIZE: text = "WM_MDIMAXIMIZE"; break; 192case NativeMethods.WM_MDITILE: text = "WM_MDITILE"; break; 193case NativeMethods.WM_MDICASCADE: text = "WM_MDICASCADE"; break; 194case NativeMethods.WM_MDIICONARRANGE: text = "WM_MDIICONARRANGE"; break; 195case NativeMethods.WM_MDIGETACTIVE: text = "WM_MDIGETACTIVE"; break; 196case NativeMethods.WM_MDISETMENU: text = "WM_MDISETMENU"; break; 197case NativeMethods.WM_ENTERSIZEMOVE: text = "WM_ENTERSIZEMOVE"; break; 198case NativeMethods.WM_EXITSIZEMOVE: text = "WM_EXITSIZEMOVE"; break; 199case NativeMethods.WM_DROPFILES: text = "WM_DROPFILES"; break; 200case NativeMethods.WM_MDIREFRESHMENU: text = "WM_MDIREFRESHMENU"; break; 201case NativeMethods.WM_MOUSEHOVER: text = "WM_MOUSEHOVER"; break; 202case NativeMethods.WM_MOUSELEAVE: text = "WM_MOUSELEAVE"; break; 203case NativeMethods.WM_CUT: text = "WM_CUT"; break; 204case NativeMethods.WM_COPY: text = "WM_COPY"; break; 205case NativeMethods.WM_PASTE: text = "WM_PASTE"; break; 206case NativeMethods.WM_CLEAR: text = "WM_CLEAR"; break; 207case NativeMethods.WM_UNDO: text = "WM_UNDO"; break; 208case NativeMethods.WM_RENDERFORMAT: text = "WM_RENDERFORMAT"; break; 209case NativeMethods.WM_RENDERALLFORMATS: text = "WM_RENDERALLFORMATS"; break; 210case NativeMethods.WM_DESTROYCLIPBOARD: text = "WM_DESTROYCLIPBOARD"; break; 211case NativeMethods.WM_DRAWCLIPBOARD: text = "WM_DRAWCLIPBOARD"; break; 212case NativeMethods.WM_PAINTCLIPBOARD: text = "WM_PAINTCLIPBOARD"; break; 213case NativeMethods.WM_VSCROLLCLIPBOARD: text = "WM_VSCROLLCLIPBOARD"; break; 214case NativeMethods.WM_SIZECLIPBOARD: text = "WM_SIZECLIPBOARD"; break; 215case NativeMethods.WM_ASKCBFORMATNAME: text = "WM_ASKCBFORMATNAME"; break; 216case NativeMethods.WM_CHANGECBCHAIN: text = "WM_CHANGECBCHAIN"; break; 217case NativeMethods.WM_HSCROLLCLIPBOARD: text = "WM_HSCROLLCLIPBOARD"; break; 218case NativeMethods.WM_QUERYNEWPALETTE: text = "WM_QUERYNEWPALETTE"; break; 219case NativeMethods.WM_PALETTEISCHANGING: text = "WM_PALETTEISCHANGING"; break; 220case NativeMethods.WM_PALETTECHANGED: text = "WM_PALETTECHANGED"; break; 221case NativeMethods.WM_HOTKEY: text = "WM_HOTKEY"; break; 222case NativeMethods.WM_PRINT: text = "WM_PRINT"; break; 223case NativeMethods.WM_PRINTCLIENT: text = "WM_PRINTCLIENT"; break; 224case NativeMethods.WM_HANDHELDFIRST: text = "WM_HANDHELDFIRST"; break; 225case NativeMethods.WM_HANDHELDLAST: text = "WM_HANDHELDLAST"; break; 226case NativeMethods.WM_AFXFIRST: text = "WM_AFXFIRST"; break; 227case NativeMethods.WM_AFXLAST: text = "WM_AFXLAST"; break; 228case NativeMethods.WM_PENWINFIRST: text = "WM_PENWINFIRST"; break; 229case NativeMethods.WM_PENWINLAST: text = "WM_PENWINLAST"; break; 230case NativeMethods.WM_APP: text = "WM_APP"; break; 231case NativeMethods.WM_USER: text = "WM_USER"; break; 233case NativeMethods.WM_CTLCOLOR: text = "WM_CTLCOLOR"; break; 333if (text == null && ((msg & NativeMethods.WM_REFLECT) == NativeMethods.WM_REFLECT)) { 334string subtext = MsgToString(msg - NativeMethods.WM_REFLECT); 366if (msg == NativeMethods.WM_PARENTNOTIFY) 367lDescription = Parenthesize(MsgToString(NativeMethods.Util.LOWORD(wparam)));
winforms\Managed\System\WinForms\MonthCalendar.cs (115)
139private NativeMethods.MONTCALENDAR_VIEW_MODE mcCurView = NativeMethods.MONTCALENDAR_VIEW_MODE.MCMV_MONTH; 140private NativeMethods.MONTCALENDAR_VIEW_MODE mcOldView = NativeMethods.MONTCALENDAR_VIEW_MODE.MCMV_MONTH; 440cp.ClassName = NativeMethods.WC_MONTHCAL; 441cp.Style |= NativeMethods.MCS_MULTISELECT | NativeMethods.MCS_DAYSTATE; 442if (!showToday) cp.Style |= NativeMethods.MCS_NOTODAY; 443if (!showTodayCircle) cp.Style |= NativeMethods.MCS_NOTODAYCIRCLE; 444if (showWeekNumbers) cp.Style |= NativeMethods.MCS_WEEKNUMBERS; 448cp.ExStyle |= NativeMethods.WS_EX_LAYOUTRTL; 450cp.ExStyle &= ~(NativeMethods.WS_EX_RTLREADING | NativeMethods.WS_EX_RIGHT | NativeMethods.WS_EX_LEFTSCROLLBAR); 519SendMessage(NativeMethods.MCM_SETFIRSTDAYOFWEEK, 0, (int) value); 615if (unchecked( (int) (long)SendMessage(NativeMethods.MCM_SETMAXSELCOUNT, value, 0)) == 0) 788SendMessage(NativeMethods.MCM_SETMONTHDELTA, value, 0); 984NativeMethods.RECT rect = new NativeMethods.RECT(); 988if (unchecked( (int) (long)SendMessage(NativeMethods.MCM_GETMINREQRECT, 0, ref rect)) == 0) 1058NativeMethods.SYSTEMTIME st = new NativeMethods.SYSTEMTIME(); 1059int res = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_GETTODAY, 0, st); 1123SetControlColor(NativeMethods.MCSC_TITLEBK, value); 1146SetControlColor(NativeMethods.MCSC_TITLETEXT, value); 1169SetControlColor(NativeMethods.MCSC_TRAILINGTEXT, value); 1368NativeMethods.INITCOMMONCONTROLSEX icc = new NativeMethods.INITCOMMONCONTROLSEX(); 1369icc.dwICC = NativeMethods.ICC_DATE_CLASSES; 1408return GetMonthRange(NativeMethods.GMR_VISIBLE); 1410return GetMonthRange(NativeMethods.GMR_DAYSTATE); 1420case NativeMethods.MCHT_TITLEBK: 1422case NativeMethods.MCHT_TITLEMONTH: 1424case NativeMethods.MCHT_TITLEYEAR: 1426case NativeMethods.MCHT_TITLEBTNNEXT: 1428case NativeMethods.MCHT_TITLEBTNPREV: 1430case NativeMethods.MCHT_CALENDARBK: 1432case NativeMethods.MCHT_CALENDARDATE: 1434case NativeMethods.MCHT_CALENDARDATENEXT: 1436case NativeMethods.MCHT_CALENDARDATEPREV: 1438case NativeMethods.MCHT_CALENDARDAY: 1440case NativeMethods.MCHT_CALENDARWEEKNUM: 1442case NativeMethods.MCHT_TODAYLINK: 1505int maxTodayWidth = unchecked( (int) (long)SendMessage(NativeMethods.MCM_GETMAXTODAYWIDTH, 0, 0)); 1523NativeMethods.SYSTEMTIMEARRAY sa = new NativeMethods.SYSTEMTIMEARRAY(); 1525UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_GETMONTHRANGE, flag, sa); 1527NativeMethods.SYSTEMTIME st = new NativeMethods.SYSTEMTIME(); 1571NativeMethods.MCHITTESTINFO mchi = new NativeMethods.MCHITTESTINFO(); 1574mchi.cbSize = Marshal.SizeOf(typeof(NativeMethods.MCHITTESTINFO)); 1575UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_HITTEST, 0, mchi); 1581NativeMethods.SYSTEMTIME sys = new NativeMethods.SYSTEMTIME(); 1631SendMessage(NativeMethods.MCM_SETMAXSELCOUNT, maxSelectionCount, 0); 1636NativeMethods.SYSTEMTIME st = DateTimePicker.DateTimeToSysTime(todayDate); 1637UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_SETTODAY, 0, st); 1640SetControlColor(NativeMethods.MCSC_TEXT, ForeColor); 1641SetControlColor(NativeMethods.MCSC_MONTHBK, BackColor); 1642SetControlColor(NativeMethods.MCSC_TITLEBK, titleBackColor); 1643SetControlColor(NativeMethods.MCSC_TITLETEXT, titleForeColor); 1644SetControlColor(NativeMethods.MCSC_TRAILINGTEXT, trailingForeColor); 1648firstDay = NativeMethods.LOCALE_IFIRSTDAYOFWEEK; 1653SendMessage(NativeMethods.MCM_SETFIRSTDAYOFWEEK, 0, firstDay); 1657SendMessage(NativeMethods.MCM_SETMONTHDELTA, scrollChange, 0); 1711SetControlColor(NativeMethods.MCSC_TEXT, ForeColor); 1720SetControlColor(NativeMethods.MCSC_MONTHBK, BackColor); 1979SendMessage(NativeMethods.MCM_SETCOLOR, colorIndex, ColorTranslator.ToWin32(value)); 2014NativeMethods.SYSTEMTIMEARRAY sa = new NativeMethods.SYSTEMTIMEARRAY(); 2015flag |= NativeMethods.GDTR_MIN | NativeMethods.GDTR_MAX; 2016NativeMethods.SYSTEMTIME sys = DateTimePicker.DateTimeToSysTime(minDate); 2027if ((int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_SETRANGE, flag, sa) == 0) 2151NativeMethods.SYSTEMTIMEARRAY sa = new NativeMethods.SYSTEMTIMEARRAY(); 2153NativeMethods.SYSTEMTIME sys = DateTimePicker.DateTimeToSysTime(lower); 2163UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_SETSELRANGE , 0, sa); 2259NativeMethods.SYSTEMTIME st = null; 2263UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.MCM_SETTODAY, 0, st); 2290NativeMethods.NMSELCHANGE nmmcsc = (NativeMethods.NMSELCHANGE)m.GetLParam(typeof(NativeMethods.NMSELCHANGE)); 2314NativeMethods.NMDAYSTATE nmmcds = (NativeMethods.NMDAYSTATE)m.GetLParam(typeof(NativeMethods.NMDAYSTATE)); 2333NativeMethods.NMVIEWCHANGE nmmcvm = (NativeMethods.NMVIEWCHANGE)m.GetLParam(typeof(NativeMethods.NMVIEWCHANGE)); 2334Debug.Assert(mcCurView == (NativeMethods.MONTCALENDAR_VIEW_MODE)nmmcvm.uOldView, "Calendar view mode is out of sync with native control"); 2335if (mcCurView != (NativeMethods.MONTCALENDAR_VIEW_MODE)nmmcvm.uNewView) { 2337mcCurView = (NativeMethods.MONTCALENDAR_VIEW_MODE)nmmcvm.uNewView; 2350NativeMethods.NMSELCHANGE nmmcsc = (NativeMethods.NMSELCHANGE)m.GetLParam(typeof(NativeMethods.NMSELCHANGE)); 2377m.Result = (IntPtr)NativeMethods.DLGC_WANTARROWS; 2387NativeMethods.NMHDR nmhdr = (NativeMethods.NMHDR)m.GetLParam(typeof(NativeMethods.NMHDR)); 2389case NativeMethods.MCN_SELECT: 2392case NativeMethods.MCN_SELCHANGE: 2395case NativeMethods.MCN_GETDAYSTATE: 2398case NativeMethods.MCN_VIEWCHANGE: 2415case NativeMethods.WM_LBUTTONDOWN: 2421case NativeMethods.WM_GETDLGCODE: 2424case NativeMethods.WM_REFLECT + NativeMethods.WM_NOTIFY: 2428case NativeMethods.WM_DESTROY: 2690if (calendar.mcCurView == NativeMethods.MONTCALENDAR_VIEW_MODE.MCMV_MONTH) { 2698else if (this.calendar.mcCurView == NativeMethods.MONTCALENDAR_VIEW_MODE.MCMV_YEAR) { 2706else if (calendar.mcCurView == NativeMethods.MONTCALENDAR_VIEW_MODE.MCMV_DECADE) { 2714else if (calendar.mcCurView == NativeMethods.MONTCALENDAR_VIEW_MODE.MCMV_CENTURY) { 2727if (calendar.mcCurView == NativeMethods.MONTCALENDAR_VIEW_MODE.MCMV_MONTH) { 2735else if (this.calendar.mcCurView == NativeMethods.MONTCALENDAR_VIEW_MODE.MCMV_YEAR) {
winforms\Managed\System\WinForms\NativeMethods.cs (199)
2127WM_REFLECT = NativeMethods.WM_USER + 0x1C00, 2438BFFM_SETSELECTION = NativeMethods.BFFM_SETSELECTIONA; 2439CBEM_GETITEM = NativeMethods.CBEM_GETITEMA; 2440CBEM_SETITEM = NativeMethods.CBEM_SETITEMA; 2441CBEN_ENDEDIT = NativeMethods.CBEN_ENDEDITA; 2442CBEM_INSERTITEM = NativeMethods.CBEM_INSERTITEMA; 2443LVM_GETITEMTEXT = NativeMethods.LVM_GETITEMTEXTA; 2444LVM_SETITEMTEXT = NativeMethods.LVM_SETITEMTEXTA; 2445ACM_OPEN = NativeMethods.ACM_OPENA; 2446DTM_SETFORMAT = NativeMethods.DTM_SETFORMATA; 2447DTN_USERSTRING = NativeMethods.DTN_USERSTRINGA; 2448DTN_WMKEYDOWN = NativeMethods.DTN_WMKEYDOWNA; 2449DTN_FORMAT = NativeMethods.DTN_FORMATA; 2450DTN_FORMATQUERY = NativeMethods.DTN_FORMATQUERYA; 2451EMR_POLYTEXTOUT = NativeMethods.EMR_POLYTEXTOUTA; 2452HDM_INSERTITEM = NativeMethods.HDM_INSERTITEMA; 2453HDM_GETITEM = NativeMethods.HDM_GETITEMA; 2454HDM_SETITEM = NativeMethods.HDM_SETITEMA; 2455HDN_ITEMCHANGING = NativeMethods.HDN_ITEMCHANGINGA; 2456HDN_ITEMCHANGED = NativeMethods.HDN_ITEMCHANGEDA; 2457HDN_ITEMCLICK = NativeMethods.HDN_ITEMCLICKA; 2458HDN_ITEMDBLCLICK = NativeMethods.HDN_ITEMDBLCLICKA; 2459HDN_DIVIDERDBLCLICK = NativeMethods.HDN_DIVIDERDBLCLICKA; 2460HDN_BEGINTRACK = NativeMethods.HDN_BEGINTRACKA; 2461HDN_ENDTRACK = NativeMethods.HDN_ENDTRACKA; 2462HDN_TRACK = NativeMethods.HDN_TRACKA; 2463HDN_GETDISPINFO = NativeMethods.HDN_GETDISPINFOA; 2464LVM_SETBKIMAGE = NativeMethods.LVM_SETBKIMAGEA; 2465LVM_GETITEM = NativeMethods.LVM_GETITEMA; 2466LVM_SETITEM = NativeMethods.LVM_SETITEMA; 2467LVM_INSERTITEM = NativeMethods.LVM_INSERTITEMA; 2468LVM_FINDITEM = NativeMethods.LVM_FINDITEMA; 2469LVM_GETSTRINGWIDTH = NativeMethods.LVM_GETSTRINGWIDTHA; 2470LVM_EDITLABEL = NativeMethods.LVM_EDITLABELA; 2471LVM_GETCOLUMN = NativeMethods.LVM_GETCOLUMNA; 2472LVM_SETCOLUMN = NativeMethods.LVM_SETCOLUMNA; 2473LVM_GETISEARCHSTRING = NativeMethods.LVM_GETISEARCHSTRINGA; 2474LVM_INSERTCOLUMN = NativeMethods.LVM_INSERTCOLUMNA; 2475LVN_BEGINLABELEDIT = NativeMethods.LVN_BEGINLABELEDITA; 2476LVN_ENDLABELEDIT = NativeMethods.LVN_ENDLABELEDITA; 2477LVN_ODFINDITEM = NativeMethods.LVN_ODFINDITEMA; 2478LVN_GETDISPINFO = NativeMethods.LVN_GETDISPINFOA; 2479LVN_GETINFOTIP = NativeMethods.LVN_GETINFOTIPA; 2480LVN_SETDISPINFO = NativeMethods.LVN_SETDISPINFOA; 2481PSM_SETTITLE = NativeMethods.PSM_SETTITLEA; 2482PSM_SETFINISHTEXT = NativeMethods.PSM_SETFINISHTEXTA; 2483RB_INSERTBAND = NativeMethods.RB_INSERTBANDA; 2484SB_SETTEXT = NativeMethods.SB_SETTEXTA; 2485SB_GETTEXT = NativeMethods.SB_GETTEXTA; 2486SB_GETTEXTLENGTH = NativeMethods.SB_GETTEXTLENGTHA; 2487SB_SETTIPTEXT = NativeMethods.SB_SETTIPTEXTA; 2488SB_GETTIPTEXT = NativeMethods.SB_GETTIPTEXTA; 2489TB_SAVERESTORE = NativeMethods.TB_SAVERESTOREA; 2490TB_ADDSTRING = NativeMethods.TB_ADDSTRINGA; 2491TB_GETBUTTONTEXT = NativeMethods.TB_GETBUTTONTEXTA; 2492TB_MAPACCELERATOR = NativeMethods.TB_MAPACCELERATORA; 2493TB_GETBUTTONINFO = NativeMethods.TB_GETBUTTONINFOA; 2494TB_SETBUTTONINFO = NativeMethods.TB_SETBUTTONINFOA; 2495TB_INSERTBUTTON = NativeMethods.TB_INSERTBUTTONA; 2496TB_ADDBUTTONS = NativeMethods.TB_ADDBUTTONSA; 2497TBN_GETBUTTONINFO = NativeMethods.TBN_GETBUTTONINFOA; 2498TBN_GETINFOTIP = NativeMethods.TBN_GETINFOTIPA; 2499TBN_GETDISPINFO = NativeMethods.TBN_GETDISPINFOA; 2500TTM_ADDTOOL = NativeMethods.TTM_ADDTOOLA; 2501TTM_SETTITLE = NativeMethods.TTM_SETTITLEA; 2502TTM_DELTOOL = NativeMethods.TTM_DELTOOLA; 2503TTM_NEWTOOLRECT = NativeMethods.TTM_NEWTOOLRECTA; 2504TTM_GETTOOLINFO = NativeMethods.TTM_GETTOOLINFOA; 2505TTM_SETTOOLINFO = NativeMethods.TTM_SETTOOLINFOA; 2506TTM_HITTEST = NativeMethods.TTM_HITTESTA; 2507TTM_GETTEXT = NativeMethods.TTM_GETTEXTA; 2508TTM_UPDATETIPTEXT = NativeMethods.TTM_UPDATETIPTEXTA; 2509TTM_ENUMTOOLS = NativeMethods.TTM_ENUMTOOLSA; 2510TTM_GETCURRENTTOOL = NativeMethods.TTM_GETCURRENTTOOLA; 2511TTN_GETDISPINFO = NativeMethods.TTN_GETDISPINFOA; 2512TTN_NEEDTEXT = NativeMethods.TTN_NEEDTEXTA; 2513TVM_INSERTITEM = NativeMethods.TVM_INSERTITEMA; 2514TVM_GETITEM = NativeMethods.TVM_GETITEMA; 2515TVM_SETITEM = NativeMethods.TVM_SETITEMA; 2516TVM_EDITLABEL = NativeMethods.TVM_EDITLABELA; 2517TVM_GETISEARCHSTRING = NativeMethods.TVM_GETISEARCHSTRINGA; 2518TVN_SELCHANGING = NativeMethods.TVN_SELCHANGINGA; 2519TVN_SELCHANGED = NativeMethods.TVN_SELCHANGEDA; 2520TVN_GETDISPINFO = NativeMethods.TVN_GETDISPINFOA; 2521TVN_SETDISPINFO = NativeMethods.TVN_SETDISPINFOA; 2522TVN_ITEMEXPANDING = NativeMethods.TVN_ITEMEXPANDINGA; 2523TVN_ITEMEXPANDED = NativeMethods.TVN_ITEMEXPANDEDA; 2524TVN_BEGINDRAG = NativeMethods.TVN_BEGINDRAGA; 2525TVN_BEGINRDRAG = NativeMethods.TVN_BEGINRDRAGA; 2526TVN_BEGINLABELEDIT = NativeMethods.TVN_BEGINLABELEDITA; 2527TVN_ENDLABELEDIT = NativeMethods.TVN_ENDLABELEDITA; 2528TCM_GETITEM = NativeMethods.TCM_GETITEMA; 2529TCM_SETITEM = NativeMethods.TCM_SETITEMA; 2530TCM_INSERTITEM = NativeMethods.TCM_INSERTITEMA; 2533BFFM_SETSELECTION = NativeMethods.BFFM_SETSELECTIONW; 2534CBEM_GETITEM = NativeMethods.CBEM_GETITEMW; 2535CBEM_SETITEM = NativeMethods.CBEM_SETITEMW; 2536CBEN_ENDEDIT = NativeMethods.CBEN_ENDEDITW; 2537CBEM_INSERTITEM = NativeMethods.CBEM_INSERTITEMW; 2538LVM_GETITEMTEXT = NativeMethods.LVM_GETITEMTEXTW; 2539LVM_SETITEMTEXT = NativeMethods.LVM_SETITEMTEXTW; 2540ACM_OPEN = NativeMethods.ACM_OPENW; 2541DTM_SETFORMAT = NativeMethods.DTM_SETFORMATW; 2542DTN_USERSTRING = NativeMethods.DTN_USERSTRINGW; 2543DTN_WMKEYDOWN = NativeMethods.DTN_WMKEYDOWNW; 2544DTN_FORMAT = NativeMethods.DTN_FORMATW; 2545DTN_FORMATQUERY = NativeMethods.DTN_FORMATQUERYW; 2546EMR_POLYTEXTOUT = NativeMethods.EMR_POLYTEXTOUTW; 2547HDM_INSERTITEM = NativeMethods.HDM_INSERTITEMW; 2548HDM_GETITEM = NativeMethods.HDM_GETITEMW; 2549HDM_SETITEM = NativeMethods.HDM_SETITEMW; 2550HDN_ITEMCHANGING = NativeMethods.HDN_ITEMCHANGINGW; 2551HDN_ITEMCHANGED = NativeMethods.HDN_ITEMCHANGEDW; 2552HDN_ITEMCLICK = NativeMethods.HDN_ITEMCLICKW; 2553HDN_ITEMDBLCLICK = NativeMethods.HDN_ITEMDBLCLICKW; 2554HDN_DIVIDERDBLCLICK = NativeMethods.HDN_DIVIDERDBLCLICKW; 2555HDN_BEGINTRACK = NativeMethods.HDN_BEGINTRACKW; 2556HDN_ENDTRACK = NativeMethods.HDN_ENDTRACKW; 2557HDN_TRACK = NativeMethods.HDN_TRACKW; 2558HDN_GETDISPINFO = NativeMethods.HDN_GETDISPINFOW; 2559LVM_SETBKIMAGE = NativeMethods.LVM_SETBKIMAGEW; 2560LVM_GETITEM = NativeMethods.LVM_GETITEMW; 2561LVM_SETITEM = NativeMethods.LVM_SETITEMW; 2562LVM_INSERTITEM = NativeMethods.LVM_INSERTITEMW; 2563LVM_FINDITEM = NativeMethods.LVM_FINDITEMW; 2564LVM_GETSTRINGWIDTH = NativeMethods.LVM_GETSTRINGWIDTHW; 2565LVM_EDITLABEL = NativeMethods.LVM_EDITLABELW; 2566LVM_GETCOLUMN = NativeMethods.LVM_GETCOLUMNW; 2567LVM_SETCOLUMN = NativeMethods.LVM_SETCOLUMNW; 2568LVM_GETISEARCHSTRING = NativeMethods.LVM_GETISEARCHSTRINGW; 2569LVM_INSERTCOLUMN = NativeMethods.LVM_INSERTCOLUMNW; 2570LVN_BEGINLABELEDIT = NativeMethods.LVN_BEGINLABELEDITW; 2571LVN_ENDLABELEDIT = NativeMethods.LVN_ENDLABELEDITW; 2572LVN_ODFINDITEM = NativeMethods.LVN_ODFINDITEMW; 2573LVN_GETDISPINFO = NativeMethods.LVN_GETDISPINFOW; 2574LVN_GETINFOTIP = NativeMethods.LVN_GETINFOTIPW; 2575LVN_SETDISPINFO = NativeMethods.LVN_SETDISPINFOW; 2576PSM_SETTITLE = NativeMethods.PSM_SETTITLEW; 2577PSM_SETFINISHTEXT = NativeMethods.PSM_SETFINISHTEXTW; 2578RB_INSERTBAND = NativeMethods.RB_INSERTBANDW; 2579SB_SETTEXT = NativeMethods.SB_SETTEXTW; 2580SB_GETTEXT = NativeMethods.SB_GETTEXTW; 2581SB_GETTEXTLENGTH = NativeMethods.SB_GETTEXTLENGTHW; 2582SB_SETTIPTEXT = NativeMethods.SB_SETTIPTEXTW; 2583SB_GETTIPTEXT = NativeMethods.SB_GETTIPTEXTW; 2584TB_SAVERESTORE = NativeMethods.TB_SAVERESTOREW; 2585TB_ADDSTRING = NativeMethods.TB_ADDSTRINGW; 2586TB_GETBUTTONTEXT = NativeMethods.TB_GETBUTTONTEXTW; 2587TB_MAPACCELERATOR = NativeMethods.TB_MAPACCELERATORW; 2588TB_GETBUTTONINFO = NativeMethods.TB_GETBUTTONINFOW; 2589TB_SETBUTTONINFO = NativeMethods.TB_SETBUTTONINFOW; 2590TB_INSERTBUTTON = NativeMethods.TB_INSERTBUTTONW; 2591TB_ADDBUTTONS = NativeMethods.TB_ADDBUTTONSW; 2592TBN_GETBUTTONINFO = NativeMethods.TBN_GETBUTTONINFOW; 2593TBN_GETINFOTIP = NativeMethods.TBN_GETINFOTIPW; 2594TBN_GETDISPINFO = NativeMethods.TBN_GETDISPINFOW; 2595TTM_ADDTOOL = NativeMethods.TTM_ADDTOOLW; 2596TTM_SETTITLE = NativeMethods.TTM_SETTITLEW; 2597TTM_DELTOOL = NativeMethods.TTM_DELTOOLW; 2598TTM_NEWTOOLRECT = NativeMethods.TTM_NEWTOOLRECTW; 2599TTM_GETTOOLINFO = NativeMethods.TTM_GETTOOLINFOW; 2600TTM_SETTOOLINFO = NativeMethods.TTM_SETTOOLINFOW; 2601TTM_HITTEST = NativeMethods.TTM_HITTESTW; 2602TTM_GETTEXT = NativeMethods.TTM_GETTEXTW; 2603TTM_UPDATETIPTEXT = NativeMethods.TTM_UPDATETIPTEXTW; 2604TTM_ENUMTOOLS = NativeMethods.TTM_ENUMTOOLSW; 2605TTM_GETCURRENTTOOL = NativeMethods.TTM_GETCURRENTTOOLW; 2606TTN_GETDISPINFO = NativeMethods.TTN_GETDISPINFOW; 2607TTN_NEEDTEXT = NativeMethods.TTN_NEEDTEXTW; 2608TVM_INSERTITEM = NativeMethods.TVM_INSERTITEMW; 2609TVM_GETITEM = NativeMethods.TVM_GETITEMW; 2610TVM_SETITEM = NativeMethods.TVM_SETITEMW; 2611TVM_EDITLABEL = NativeMethods.TVM_EDITLABELW; 2612TVM_GETISEARCHSTRING = NativeMethods.TVM_GETISEARCHSTRINGW; 2613TVN_SELCHANGING = NativeMethods.TVN_SELCHANGINGW; 2614TVN_SELCHANGED = NativeMethods.TVN_SELCHANGEDW; 2615TVN_GETDISPINFO = NativeMethods.TVN_GETDISPINFOW; 2616TVN_SETDISPINFO = NativeMethods.TVN_SETDISPINFOW; 2617TVN_ITEMEXPANDING = NativeMethods.TVN_ITEMEXPANDINGW; 2618TVN_ITEMEXPANDED = NativeMethods.TVN_ITEMEXPANDEDW; 2619TVN_BEGINDRAG = NativeMethods.TVN_BEGINDRAGW; 2620TVN_BEGINRDRAG = NativeMethods.TVN_BEGINRDRAGW; 2621TVN_BEGINLABELEDIT = NativeMethods.TVN_BEGINLABELEDITW; 2622TVN_ENDLABELEDIT = NativeMethods.TVN_ENDLABELEDITW; 2623TCM_GETITEM = NativeMethods.TCM_GETITEMW; 2624TCM_SETITEM = NativeMethods.TCM_SETITEMW; 2625TCM_INSERTITEM = NativeMethods.TCM_INSERTITEMW; 2732hicon = SafeNativeMethods.CopyImage(new HandleRef(icon, icon.Handle), NativeMethods.IMAGE_ICON, icon.Size.Width, icon.Size.Height, 0); 2815internal int iProximity = NativeMethods.HH_FTS_DEFAULT_PROXIMITY; 3841public int nMaxFile = NativeMethods.MAX_PATH; 3843public int nMaxFileTitle = NativeMethods.MAX_PATH; 4819public NativeMethods.TreeViewCompareCallback lpfnCompare; 4984public NativeMethods.value_tagELEMDESC elemdescFunc; 4994public NativeMethods.value_tagELEMDESC elemdescVar; 5002public NativeMethods.tagTYPEDESC tdesc; 5003public NativeMethods.tagPARAMDESC paramdesc; 5078NativeMethods.tagCAUUID pPages); 6335public NativeMethods.tagTYPEDESC tdesc = null; 6336public NativeMethods.tagPARAMDESC paramdesc;
winforms\Managed\System\WinForms\NativeWindow.cs (45)
100NativeMethods.WndProc windowProc; 183if (!AppDomain.CurrentDomain.IsFinalizingForUnload() && exitCode == NativeMethods.STATUS_PENDING) { 186NativeMethods.WM_UIUNSUBCLASS, IntPtr.Zero, IntPtr.Zero, 204UnsafeNativeMethods.PostMessage(new HandleRef(this, h), NativeMethods.WM_CLOSE, 0, 0); 455UnsafeNativeMethods.SetWindowLong(new HandleRef(wrapper, handle), NativeMethods.GWL_ID, new HandleRef(wrapper, (IntPtr)globalID)); 613defWindowProc = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 619windowProc = new NativeMethods.WndProc(this.DebuggableCallback); 623windowProc = new NativeMethods.WndProc(this.Callback); 628UnsafeNativeMethods.SetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC, windowProc); 629windowProcPtr = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 632(unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_STYLE))) & NativeMethods.WS_CHILD) != 0 && 633unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_ID))) == 0) { 634UnsafeNativeMethods.SetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_ID, new HandleRef(this, handle)); 680if (msg == NativeMethods.WM_NCDESTROY) ReleaseHandle(false); 681if (msg == NativeMethods.WM_UIUNSUBCLASS) ReleaseHandle(true); 714if ((cp.Style & NativeMethods.WS_CHILD) != NativeMethods.WS_CHILD 764cp.Caption, cp.Style, cp.X, cp.Y, cp.Width, cp.Height, new HandleRef(cp, cp.Parent), NativeMethods.NullHandleRef, 781System.Internal.HandleCollector.Add(createResult, NativeMethods.CommonHandles.Window); 810if (msg == NativeMethods.WM_NCDESTROY) ReleaseHandle(false); 811if (msg == NativeMethods.WM_UIUNSUBCLASS) ReleaseHandle(true); 858UnsafeNativeMethods.PostMessage(new HandleRef(this, handle), NativeMethods.WM_CLOSE, 0, 0); 1086UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new HandleRef(null, userDefWindowProc)); 1087UnsafeNativeMethods.SetClassLong(href, NativeMethods.GCL_WNDPROC, userDefWindowProc); 1088UnsafeNativeMethods.PostMessage(href, NativeMethods.WM_CLOSE, 0, 0); 1156System.Internal.HandleCollector.Remove(handle, NativeMethods.CommonHandles.Window); 1365IntPtr currentWinPrc = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 1377UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new HandleRef(this, defWindowProc)); 1391UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new HandleRef(this, userDefWindowProc)); 1402UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, previousWindow.windowProc); 1417UnsafeNativeMethods.SetWindowLong(href, NativeMethods.GWL_WNDPROC, new HandleRef(this, userDefWindowProc)); 1477internal NativeMethods.WndProc windowProc; 1492UnsafeNativeMethods.SetWindowLong(new HandleRef(null, hWnd), NativeMethods.GWL_WNDPROC, new HandleRef(this, defWindowProc)); 1570NativeMethods.WNDCLASS_D wndclass = new NativeMethods.WNDCLASS_D(); 1589wndclass.hbrBackground = UnsafeNativeMethods.GetStockObject(NativeMethods.HOLLOW_BRUSH); //(IntPtr)(NativeMethods.COLOR_WINDOW + 1); 1597NativeMethods.WNDCLASS_I wcls = new NativeMethods.WNDCLASS_I(); 1598bool ok = UnsafeNativeMethods.GetClassInfo(NativeMethods.NullHandleRef, className, wcls); 1619windowProc = new NativeMethods.WndProc(this.Callback); 1628if (err == NativeMethods.ERROR_CLASS_ALREADY_EXISTS) { 1634NativeMethods.WNDCLASS_I wcls = new NativeMethods.WNDCLASS_I(); 1659} while (atom == 0 && Marshal.GetLastWin32Error() == NativeMethods.ERROR_CLASS_ALREADY_EXISTS);
winforms\Managed\System\WinForms\NotifyIcon.cs (49)
46private const int WM_TRAYMOUSEMESSAGE = NativeMethods.WM_USER + 1024; 485UnsafeNativeMethods.PostMessage(new HandleRef(window, window.Handle), NativeMethods.WM_CLOSE, 0, 0); 693NativeMethods.NOTIFYICONDATA data = new NativeMethods.NOTIFYICONDATA(); 699data.uFlags = NativeMethods.NIF_INFO; 704case ToolTipIcon.Info: data.dwInfoFlags = NativeMethods.NIIF_INFO; break; 705case ToolTipIcon.Warning: data.dwInfoFlags = NativeMethods.NIIF_WARNING; break; 706case ToolTipIcon.Error: data.dwInfoFlags = NativeMethods.NIIF_ERROR; break; 707case ToolTipIcon.None: data.dwInfoFlags = NativeMethods.NIIF_NONE; break; 709UnsafeNativeMethods.Shell_NotifyIcon(NativeMethods.NIM_MODIFY, data); 721NativeMethods.POINT pt = new NativeMethods.POINT(); 735NativeMethods.TPM_VERTICAL | NativeMethods.TPM_RIGHTALIGN, 742UnsafeNativeMethods.PostMessage(new HandleRef(window, window.Handle), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero); 770NativeMethods.NOTIFYICONDATA data = new NativeMethods.NOTIFYICONDATA(); 772data.uFlags = NativeMethods.NIF_MESSAGE; 783data.uFlags |= NativeMethods.NIF_ICON; 786data.uFlags |= NativeMethods.NIF_TIP; 791UnsafeNativeMethods.Shell_NotifyIcon(NativeMethods.NIM_ADD, data); 795UnsafeNativeMethods.Shell_NotifyIcon(NativeMethods.NIM_MODIFY, data); 799UnsafeNativeMethods.Shell_NotifyIcon(NativeMethods.NIM_DELETE, data); 853case NativeMethods.WM_LBUTTONDBLCLK: 856case NativeMethods.WM_LBUTTONDOWN: 859case NativeMethods.WM_LBUTTONUP: 862case NativeMethods.WM_MBUTTONDBLCLK: 865case NativeMethods.WM_MBUTTONDOWN: 868case NativeMethods.WM_MBUTTONUP: 871case NativeMethods.WM_MOUSEMOVE: 874case NativeMethods.WM_RBUTTONDBLCLK: 877case NativeMethods.WM_RBUTTONDOWN: 880case NativeMethods.WM_RBUTTONUP: 886case NativeMethods.NIN_BALLOONSHOW: 889case NativeMethods.NIN_BALLOONHIDE: 892case NativeMethods.NIN_BALLOONTIMEOUT: 895case NativeMethods.NIN_BALLOONUSERCLICK: 900case NativeMethods.WM_COMMAND: 908case NativeMethods.WM_DRAWITEM: 915case NativeMethods.WM_MEASUREITEM: 922case NativeMethods.WM_INITMENUPOPUP: 926case NativeMethods.WM_DESTROY: 952NativeMethods.MEASUREITEMSTRUCT mis = (NativeMethods.MEASUREITEMSTRUCT)m.GetLParam(typeof(NativeMethods.MEASUREITEMSTRUCT)); 970NativeMethods.DRAWITEMSTRUCT dis = (NativeMethods.DRAWITEMSTRUCT)m.GetLParam(typeof(NativeMethods.DRAWITEMSTRUCT)); 1006UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_CLOSE, 0, 0);
winforms\Managed\System\WinForms\OpenFileDialog.cs (11)
73return GetOption(NativeMethods.OFN_ALLOWMULTISELECT); 77SetOption(NativeMethods.OFN_ALLOWMULTISELECT, value); 97return GetOption(NativeMethods.OFN_READONLY); 101SetOption(NativeMethods.OFN_READONLY, value); 120return !GetOption(NativeMethods.OFN_HIDEREADONLY); 124SetOption(NativeMethods.OFN_HIDEREADONLY, !value); 179SetOption(NativeMethods.OFN_FILEMUSTEXIST, true); 193internal override bool RunFileDialog(NativeMethods.OPENFILENAME_I ofn) 207case NativeMethods.FNERR_INVALIDFILENAME: 210case NativeMethods.FNERR_SUBCLASSFAILURE: 213case NativeMethods.FNERR_BUFFERTOOSMALL:
winforms\Managed\System\WinForms\Panel.cs (6)
129DispId(NativeMethods.ActiveX.DISPID_BORDERSTYLE), 163cp.ExStyle |= NativeMethods.WS_EX_CONTROLPARENT; 165cp.ExStyle &= (~NativeMethods.WS_EX_CLIENTEDGE); 166cp.Style &= (~NativeMethods.WS_BORDER); 170cp.ExStyle |= NativeMethods.WS_EX_CLIENTEDGE; 173cp.Style |= NativeMethods.WS_BORDER;
winforms\Managed\System\WinForms\PictureBox.cs (3)
157DispId(NativeMethods.ActiveX.DISPID_BORDERSTYLE), 248cp.ExStyle |= NativeMethods.WS_EX_CLIENTEDGE; 251cp.Style |= NativeMethods.WS_BORDER;
winforms\Managed\System\WinForms\PowerStatus.cs (1)
111private NativeMethods.SYSTEM_POWER_STATUS systemPowerStatus;
winforms\Managed\System\WinForms\Printing\PageSetupDialog.cs (17)
263flags |= NativeMethods.PSD_ENABLEPAGESETUPHOOK; 265if (!allowMargins) flags |= NativeMethods.PSD_DISABLEMARGINS; 266if (!allowOrientation) flags |= NativeMethods.PSD_DISABLEORIENTATION; 267if (!allowPaper) flags |= NativeMethods.PSD_DISABLEPAPER; 268if (!allowPrinter || printerSettings == null) flags |= NativeMethods.PSD_DISABLEPRINTER; 270if (showHelp) flags |= NativeMethods.PSD_SHOWHELP; 271if (!showNetwork) flags |= NativeMethods.PSD_NONETWORKBUTTON; 272if (minMargins != null) flags |= NativeMethods.PSD_MINMARGINS; 273if (pageSettings.Margins != null) flags |= NativeMethods.PSD_MARGINS; 317private static void UpdateSettings(NativeMethods.PAGESETUPDLG data, PageSettings pageSettings, 340PrinterUnit fromUnit = ((data.Flags & NativeMethods.PSD_INHUNDREDTHSOFMILLIMETERS) != 0) 355NativeMethods.WndProc hookProcPtr = new NativeMethods.WndProc(this.HookProc); 359NativeMethods.PAGESETUPDLG data = new NativeMethods.PAGESETUPDLG(); 374int result = UnsafeNativeMethods.GetLocaleInfo(NativeMethods.LOCALE_USER_DEFAULT,NativeMethods.LOCALE_IMEASURE, sb,sb.Capacity);
winforms\Managed\System\WinForms\Printing\PrintDialog.cs (39)
250flags |= NativeMethods.PD_ENABLEPRINTHOOK; 253if (!allowCurrentPage) flags |= NativeMethods.PD_NOCURRENTPAGE; 254if (!allowPages) flags |= NativeMethods.PD_NOPAGENUMS; 255if (!allowPrintToFile) flags |= NativeMethods.PD_DISABLEPRINTTOFILE; 256if (!allowSelection) flags |= NativeMethods.PD_NOSELECTION; 260if (printToFile) flags |= NativeMethods.PD_PRINTTOFILE; 261if (showHelp) flags |= NativeMethods.PD_SHOWHELP; 262if (!showNetwork) flags |= NativeMethods.PD_NONETWORKBUTTON; 263if (PrinterSettings.Collate) flags |= NativeMethods.PD_COLLATE; 287internal static NativeMethods.PRINTDLG CreatePRINTDLG() { 288NativeMethods.PRINTDLG data = null; 290data = new NativeMethods.PRINTDLG_32(); 293data = new NativeMethods.PRINTDLG_64(); 320internal static NativeMethods.PRINTDLGEX CreatePRINTDLGEX() { 321NativeMethods.PRINTDLGEX data = new NativeMethods.PRINTDLGEX(); 332data.pageRanges = UnsafeNativeMethods.GlobalAlloc(NativeMethods.GPTR, 333data.nMaxPageRanges * Marshal.SizeOf(typeof(NativeMethods.PRINTPAGERANGE))); 341data.nStartPage = NativeMethods.START_PAGE_GENERAL; 356NativeMethods.WndProc hookProcPtr = new NativeMethods.WndProc(this.HookProc); 360NativeMethods.PRINTDLG data = CreatePRINTDLG(); 364NativeMethods.PRINTDLGEX data = CreatePRINTDLGEX(); 373private bool ShowPrintDialog(IntPtr hwndOwner, NativeMethods.WndProc hookProcPtr, NativeMethods.PRINTDLG data) { 427PrintToFile = ((data.Flags & NativeMethods.PD_PRINTTOFILE) != 0); 440if ((data.Flags & NativeMethods.PD_USEDEVMODECOPIESANDCOLLATE) == 0) { 443PrinterSettings.Collate = ((data.Flags & NativeMethods.PD_COLLATE) == NativeMethods.PD_COLLATE); 457private bool ShowPrintDialog(IntPtr hwndOwner, NativeMethods.PRINTDLGEX data) { 508data.Flags &= ~(NativeMethods.PD_SHOWHELP | NativeMethods.PD_NONETWORKBUTTON); 511if (NativeMethods.Failed(hr) || data.dwResultAction == NativeMethods.PD_RESULT_CANCEL) { 522PrintToFile = ((data.Flags & NativeMethods.PD_PRINTTOFILE) != 0); 538if ((data.Flags & NativeMethods.PD_USEDEVMODECOPIESANDCOLLATE) == 0) { 541PrinterSettings.Collate = ((data.Flags & NativeMethods.PD_COLLATE) == NativeMethods.PD_COLLATE); 547return (data.dwResultAction == NativeMethods.PD_RESULT_PRINT);
winforms\Managed\System\WinForms\Printing\PrintPreviewControl.cs (33)
172cp.Style |= NativeMethods.WS_HSCROLL; 173cp.Style |= NativeMethods.WS_VSCROLL; 362switch (NativeMethods.Util.LOWORD(m.WParam)) { 363case NativeMethods.SB_THUMBPOSITION: 364case NativeMethods.SB_THUMBTRACK: 365NativeMethods.SCROLLINFO si = new NativeMethods.SCROLLINFO(); 366si.cbSize = Marshal.SizeOf(typeof(NativeMethods.SCROLLINFO)); 367si.fMask = NativeMethods.SIF_TRACKPOS; 368int direction = horizontal ? NativeMethods.SB_HORZ : NativeMethods.SB_VERT; 375pos = NativeMethods.Util.HIWORD(m.WParam); 378case NativeMethods.SB_LINEUP: 386case NativeMethods.SB_LINEDOWN: 394case NativeMethods.SB_PAGEUP: 402case NativeMethods.SB_PAGEDOWN: 427screendpi = new Point(UnsafeNativeMethods.GetDeviceCaps(new HandleRef(tempGraphics, dc), NativeMethods.LOGPIXELSX), 428UnsafeNativeMethods.GetDeviceCaps(new HandleRef(tempGraphics, dc), NativeMethods.LOGPIXELSY)); 749NativeMethods.RECT scroll = NativeMethods.RECT.FromXYWH(rect.X, rect.Y, rect.Width, rect.Height); 756UnsafeNativeMethods.SetScrollPos(new HandleRef(this, Handle), NativeMethods.SB_HORZ, position.X, true); 757UnsafeNativeMethods.SetScrollPos(new HandleRef(this, Handle), NativeMethods.SB_VERT, position.Y, true); 764NativeMethods.SCROLLINFO info = new NativeMethods.SCROLLINFO(); 765info.fMask = NativeMethods.SIF_RANGE | NativeMethods.SIF_PAGE; 769UnsafeNativeMethods.SetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_VERT, info, true); 771info.fMask = NativeMethods.SIF_RANGE | NativeMethods.SIF_PAGE; 775UnsafeNativeMethods.SetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_HORZ, info, true); 921case NativeMethods.WM_VSCROLL: 924case NativeMethods.WM_HSCROLL: 929case NativeMethods.WM_KEYDOWN:
winforms\Managed\System\WinForms\ProgressBar.cs (36)
94cp.ClassName = NativeMethods.WC_PROGRESS; 96cp.Style |= NativeMethods.PBS_SMOOTH; 99cp.Style |= NativeMethods.PBS_MARQUEE; 104cp.ExStyle |= NativeMethods.WS_EX_LAYOUTRTL; 106cp.ExStyle &= ~(NativeMethods.WS_EX_RTLREADING | NativeMethods.WS_EX_RIGHT | NativeMethods.WS_EX_LEFTSCROLLBAR); 363SendMessage(NativeMethods.PBM_SETMARQUEE, 0, marqueeSpeed); 367SendMessage(NativeMethods.PBM_SETMARQUEE, 1, marqueeSpeed); 404SendMessage(NativeMethods.PBM_SETRANGE32, minimum, maximum); 441SendMessage(NativeMethods.PBM_SETRANGE32, minimum, maximum); 453UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 462UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 553if (IsHandleCreated) SendMessage(NativeMethods.PBM_SETSTEP, step, 0); 743NativeMethods.INITCOMMONCONTROLSEX icc = new NativeMethods.INITCOMMONCONTROLSEX(); 744icc.dwICC = NativeMethods.ICC_PROGRESS_CLASS; 785SendMessage(NativeMethods.PBM_SETRANGE32, minimum, maximum); 786SendMessage(NativeMethods.PBM_SETSTEP, step, 0); 787SendMessage(NativeMethods.PBM_SETPOS, value, 0); 788UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 789UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 884if (IsHandleCreated) SendMessage(NativeMethods.PBM_SETPOS, value, 0); 893UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 894UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 938if (patternId == NativeMethods.UIA_ValuePatternId || 939patternId == NativeMethods.UIA_RangeValuePatternId) { 948case NativeMethods.UIA_NamePropertyId: 950case NativeMethods.UIA_ControlTypePropertyId: 951return NativeMethods.UIA_ProgressBarControlTypeId; 952case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 956case NativeMethods.UIA_IsRangeValuePatternAvailablePropertyId: 957case NativeMethods.UIA_IsValuePatternAvailablePropertyId: 958case NativeMethods.UIA_RangeValueIsReadOnlyPropertyId: 960case NativeMethods.UIA_RangeValueLargeChangePropertyId: 961case NativeMethods.UIA_RangeValueSmallChangePropertyId:
winforms\Managed\System\WinForms\PropertyGrid.cs (18)
767SendMessage(NativeMethods.WM_SETREDRAW, 0, 0); 776SendMessage(NativeMethods.WM_SETREDRAW, 1, 0); 2777if (ComNativeDescriptor.Instance.IsNameDispId(obj, dispID) || dispID == NativeMethods.ActiveX.DISPID_Name) { 3231return NativeMethods.S_OK; 4662NativeMethods.POINT temp = new NativeMethods.POINT(); 4804NativeMethods.COPYDATASTRUCT cds = (NativeMethods.COPYDATASTRUCT)UnsafeNativeMethods.PtrToStructure(lparam, typeof(NativeMethods.COPYDATASTRUCT)); 4875case NativeMethods.WM_UNDO: 4883case NativeMethods.WM_CUT: 4892case NativeMethods.WM_COPY: 4901case NativeMethods.WM_PASTE: 4910case NativeMethods.WM_COPYDATA: 5305private const int WM_USER = NativeMethods.WM_USER; 5683if (propertyID == NativeMethods.UIA_ControlTypePropertyId) { 5684return NativeMethods.UIA_ToolBarControlTypeId; 5685} else if (propertyID == NativeMethods.UIA_NamePropertyId) {
winforms\Managed\System\WinForms\PropertyGridInternal\DocComment.cs (3)
284if (propertyID == NativeMethods.UIA_ControlTypePropertyId) { 285return NativeMethods.UIA_PaneControlTypeId; 286} else if (propertyID == NativeMethods.UIA_NamePropertyId) {
winforms\Managed\System\WinForms\PropertyGridInternal\DropDownButton.cs (7)
282case NativeMethods.UIA_ControlTypePropertyId: 283return NativeMethods.UIA_ButtonControlTypeId; 284case NativeMethods.UIA_NamePropertyId: 286case NativeMethods.UIA_IsLegacyIAccessiblePatternAvailablePropertyId: 288case NativeMethods.UIA_LegacyIAccessibleRolePropertyId: 301if (patternId == NativeMethods.UIA_LegacyIAccessiblePatternId) { 324RaiseAutomationEvent(NativeMethods.UIA_AutomationFocusChangedEventId);
winforms\Managed\System\WinForms\PropertyGridInternal\GridEntry.cs (20)
2853case NativeMethods.UIA_NamePropertyId: 2855case NativeMethods.UIA_ControlTypePropertyId: 2861return NativeMethods.UIA_DataItemControlTypeId; 2864return NativeMethods.UIA_ButtonControlTypeId; 2865case NativeMethods.UIA_IsExpandCollapsePatternAvailablePropertyId: 2866return (Object)IsPatternSupported(NativeMethods.UIA_ExpandCollapsePatternId); 2871case NativeMethods.UIA_AccessKeyPropertyId: 2873case NativeMethods.UIA_HasKeyboardFocusPropertyId: 2875case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 2877case NativeMethods.UIA_IsEnabledPropertyId: 2879case NativeMethods.UIA_AutomationIdPropertyId: 2881case NativeMethods.UIA_HelpTextPropertyId: 2883case NativeMethods.UIA_IsPasswordPropertyId: 2885case NativeMethods.UIA_IsOffscreenPropertyId: 2887case NativeMethods.UIA_LegacyIAccessibleRolePropertyId: 2889case NativeMethods.UIA_LegacyIAccessibleDefaultActionPropertyId: 2901patternId == NativeMethods.UIA_ExpandCollapsePatternId) { 2906patternId == NativeMethods.UIA_InvokePatternId || 2907patternId == NativeMethods.UIA_LegacyIAccessiblePatternId)) { 3113RaiseAutomationEvent(NativeMethods.UIA_AutomationFocusChangedEventId);
winforms\Managed\System\WinForms\PropertyGridInternal\GridErrorDlg.cs (3)
386if (propertyID == NativeMethods.UIA_ControlTypePropertyId) { 387return NativeMethods.UIA_ButtonControlTypeId; 395if (patternId == NativeMethods.UIA_ExpandCollapsePatternId) {
winforms\Managed\System\WinForms\PropertyGridInternal\GridToolTip.cs (30)
30NativeMethods.TOOLINFO_T[] toolInfos; 40this.toolInfos = new NativeMethods.TOOLINFO_T[controls.Length]; 89UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_UPDATETIPTEXT, 0, GetTOOLINFO(controls[i])); 108NativeMethods.INITCOMMONCONTROLSEX icc = new NativeMethods.INITCOMMONCONTROLSEX(); 109icc.dwICC = NativeMethods.ICC_TAB_CLASSES; 113cp.ClassName = NativeMethods.TOOLTIPS_CLASS; 114cp.Style |= (NativeMethods.TTS_ALWAYSTIP | NativeMethods.TTS_NOPREFIX); 121private NativeMethods.TOOLINFO_T GetTOOLINFO(Control c) { 128toolInfos[index] = new NativeMethods.TOOLINFO_T(); 129toolInfos[index].cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO_T)); 130toolInfos[index].uFlags |= NativeMethods.TTF_IDISHWND | NativeMethods.TTF_TRANSPARENT | NativeMethods.TTF_SUBCLASS; 160UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_DELTOOL, 0, GetTOOLINFO((Control)sender)); 180NativeMethods.RECT rect = NativeMethods.RECT.FromXYWH(itemRect.X, itemRect.Y, itemRect.Width, itemRect.Height); 182SendMessage(NativeMethods.TTM_ADJUSTRECT, 1, ref rect); 204SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOPMOST, 206NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOSIZE | 207NativeMethods.SWP_NOACTIVATE); 209if (0 == (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO(c))) { 216UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 230if (0 == (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_UPDATETIPTEXT, 0, GetTOOLINFO(controls[i]))) { 235this.SendMessage(NativeMethods.TTM_UPDATE, 0, 0); 241case NativeMethods.WM_SHOWWINDOW: 246case NativeMethods.WM_NCHITTEST: 253msg.Result = (IntPtr) NativeMethods.HTTRANSPARENT;
winforms\Managed\System\WinForms\PropertyGridInternal\HotCommands.cs (3)
271if (propertyID == NativeMethods.UIA_ControlTypePropertyId) { 272return NativeMethods.UIA_PaneControlTypeId; 273} else if (propertyID == NativeMethods.UIA_NamePropertyId) {
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyDescriptorGridEntry.cs (5)
1128patternId == NativeMethods.UIA_ValuePatternId || 1129(patternId == NativeMethods.UIA_ExpandCollapsePatternId && owner.Enumerable)) { 1177if (propertyID == NativeMethods.UIA_IsEnabledPropertyId) { 1182if (propertyID == NativeMethods.UIA_LegacyIAccessibleDefaultActionPropertyId) { 1185else if (propertyID == NativeMethods.UIA_IsValuePatternAvailablePropertyId) {
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (137)
267return (0 != (int)Edit.SendMessage(NativeMethods.EM_CANUNDO, 0, 0)); 420int exStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(edit, edit.Handle), NativeMethods.GWL_EXSTYLE))); 421return ((exStyle & NativeMethods.WS_EX_RTLREADING) != 0); 790NativeMethods.POINT pt = new NativeMethods.POINT(rect.X, rect.Y); 965gridEntry.AccessibilityObject.RaiseAutomationEvent(NativeMethods.UIA_AutomationFocusChangedEventId); 967NativeMethods.UIA_ExpandCollapseExpandCollapseStatePropertyId, 1225Edit.SendMessage(NativeMethods.WM_UNDO, 0, 0); 1653int flags = NativeMethods.SWP_NOZORDER | NativeMethods.SWP_NOACTIVATE; 1656flags |= NativeMethods.SWP_NOMOVE; 1660flags |= NativeMethods.SWP_NOSIZE; 1663SafeNativeMethods.SetWindowPos(new HandleRef(this.dropDownHolder, this.dropDownHolder.Handle), NativeMethods.NullHandleRef, loc.X, loc.Y, size.Width, size.Height, flags); 1691UnsafeNativeMethods.SetWindowLong(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.GWL_HWNDPARENT, new HandleRef(this, Handle)); 1706SafeNativeMethods.ShowWindow(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.SW_SHOWNA); 1735UnsafeNativeMethods.SetWindowLong(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.GWL_HWNDPARENT, new HandleRef(this, Handle)); 1737SafeNativeMethods.ShowWindow(new HandleRef(dropDownHolder, dropDownHolder.Handle), NativeMethods.SW_SHOWNA); 1748gridEntry.AccessibilityObject.RaiseAutomationEvent(NativeMethods.UIA_AutomationFocusChangedEventId); 1750NativeMethods.UIA_ExpandCollapseExpandCollapseStatePropertyId, 1790if (dropDownHolder != null && dropDownHolder.Visible && m.Msg == NativeMethods.WM_KEYDOWN && (int)m.WParam != (int)Keys.Tab) { 2816Edit.SendMessage(NativeMethods.WM_LBUTTONUP, 0, (int)(me.Y << 16 | (me.X & 0xFFFF))); 3326Debug.Assert(this.cumulativeVerticalWheelDelta > -NativeMethods.WHEEL_DELTA, "cumulativeVerticalWheelDelta is too small"); 3327Debug.Assert(this.cumulativeVerticalWheelDelta < NativeMethods.WHEEL_DELTA, "cumulativeVerticalWheelDelta is too big"); 3359float partialNotches = (float)cumulativeVerticalWheelDelta / (float)NativeMethods.WHEEL_DELTA; 3375this.cumulativeVerticalWheelDelta -= fullNotches * NativeMethods.WHEEL_DELTA; 3409this.cumulativeVerticalWheelDelta -= (int)((float)scrollBands * ((float)NativeMethods.WHEEL_DELTA / (float)wheelScrollLines)); 3418this.cumulativeVerticalWheelDelta -= (int)((float)scrollBands * ((float)NativeMethods.WHEEL_DELTA / (float)wheelScrollLines)); 3643Edit.SendMessage(NativeMethods.WM_LBUTTONDOWN, 0, (int)(editPoint.Y << 16 | (editPoint.X & 0xFFFF))); 3644Edit.SendMessage(NativeMethods.WM_LBUTTONUP, 0, (int)(editPoint.Y << 16 | (editPoint.X & 0xFFFF))); 3872System.Internal.HandleCollector.Add(hFont, NativeMethods.CommonHandles.GDI); 3873NativeMethods.TEXTMETRIC tm = new NativeMethods.TEXTMETRIC(); 4975NativeMethods.MSG mouseMsg = new NativeMethods.MSG(); 4977NativeMethods.NullHandleRef, 4978NativeMethods.WM_MOUSEFIRST, 4979NativeMethods.WM_MOUSELAST, 4980NativeMethods.PM_REMOVE)) 5058NativeMethods.MSG mouseMsg = new NativeMethods.MSG(); 5060NativeMethods.NullHandleRef, 5061NativeMethods.WM_MOUSEFIRST, 5062NativeMethods.WM_MOUSELAST, 5063NativeMethods.PM_REMOVE)) 5268NativeMethods.NMHDR* nmhdr = (NativeMethods.NMHDR*)m.LParam; 5272case NativeMethods.TTN_POP: 5274case NativeMethods.TTN_SHOW: 5326case NativeMethods.WM_SYSCOLORCHANGE: 5335case NativeMethods.WM_SETFOCUS: 5343case NativeMethods.WM_IME_STARTCOMPOSITION: 5346UnsafeNativeMethods.PostMessage(new HandleRef(Edit, Edit.Handle), NativeMethods.WM_IME_STARTCOMPOSITION, 0, 0); 5349case NativeMethods.WM_IME_COMPOSITION: 5351UnsafeNativeMethods.PostMessage(new HandleRef(Edit, Edit.Handle), NativeMethods.WM_IME_COMPOSITION, m.WParam, m.LParam); 5354case NativeMethods.WM_GETDLGCODE: 5356int flags = NativeMethods.DLGC_WANTCHARS | NativeMethods.DLGC_WANTARROWS; 5365flags |= NativeMethods.DLGC_WANTTAB; 5372case NativeMethods.WM_MOUSEMOVE: 5381case NativeMethods.WM_NOTIFY: 5497cp.ExStyle |= NativeMethods.WS_EX_TOOLWINDOW; 5498cp.Style |= NativeMethods.WS_POPUP | NativeMethods.WS_BORDER; 5500cp.ClassStyle |= NativeMethods.CS_DROPSHADOW; 5580UnsafeNativeMethods.MsgWaitForMultipleObjectsEx(0, IntPtr.Zero, 250, NativeMethods.QS_ALLINPUT, NativeMethods.MWMO_INPUTAVAILABLE); 5683hWnd = UnsafeNativeMethods.GetWindowLong(new HandleRef(null, hWnd), NativeMethods.GWL_HWNDPARENT); 6076if (m.Msg == NativeMethods.WM_ACTIVATE) { 6080if (Visible && NativeMethods.Util.LOWORD(m.WParam) == NativeMethods.WA_INACTIVE && !this.OwnsWindow(activatedWindow)) { 6089else if (m.Msg == NativeMethods.WM_CLOSE) { 6097else if (m.Msg == NativeMethods.WM_DPICHANGED) { 6151cp.Style &= ~NativeMethods.WS_BORDER; 6152cp.ExStyle &= ~NativeMethods.WS_EX_CLIENTEDGE; 6290case NativeMethods.UIA_RuntimeIdPropertyId: 6292case NativeMethods.UIA_BoundingRectanglePropertyId: 6294case NativeMethods.UIA_ControlTypePropertyId: 6295return NativeMethods.UIA_ListItemControlTypeId; 6296case NativeMethods.UIA_NamePropertyId: 6298case NativeMethods.UIA_AccessKeyPropertyId: 6300case NativeMethods.UIA_HasKeyboardFocusPropertyId: 6302case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 6304case NativeMethods.UIA_IsEnabledPropertyId: 6306case NativeMethods.UIA_HelpTextPropertyId: 6308case NativeMethods.UIA_IsPasswordPropertyId: 6310case NativeMethods.UIA_IsOffscreenPropertyId: 6343if (patternId == NativeMethods.UIA_LegacyIAccessiblePatternId || 6344patternId == NativeMethods.UIA_InvokePatternId) { 6403RaiseAutomationEvent(NativeMethods.UIA_AutomationFocusChangedEventId); 6507if (propertyID == NativeMethods.UIA_ControlTypePropertyId) { 6508return NativeMethods.UIA_ListControlTypeId; 6509} else if (propertyID == NativeMethods.UIA_NamePropertyId) { 6517RaiseAutomationEvent(NativeMethods.UIA_AutomationFocusChangedEventId); 6650UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_CHAR, (IntPtr)keyChar, IntPtr.Zero); 6848NativeMethods.NMHDR* nmhdr = (NativeMethods.NMHDR*)m.LParam; 6852case NativeMethods.TTN_SHOW: 6874case NativeMethods.WM_STYLECHANGED: 6875if ((unchecked( (int) (long)m.WParam) & NativeMethods.GWL_EXSTYLE) != 0) { 6879case NativeMethods.WM_MOUSEMOVE: 6885case NativeMethods.WM_DESTROY: 6888case NativeMethods.WM_SHOWWINDOW: 6893case NativeMethods.WM_PASTE: 6912case NativeMethods.WM_GETDLGCODE: 6914m.Result = (IntPtr)((long)m.Result | NativeMethods.DLGC_WANTARROWS | NativeMethods.DLGC_WANTCHARS); 6916m.Result = (IntPtr)((long)m.Result | NativeMethods.DLGC_WANTALLKEYS | NativeMethods.DLGC_WANTTAB); 6920case NativeMethods.WM_NOTIFY: 6994if (propertyID == NativeMethods.UIA_IsEnabledPropertyId) { 6997else if (propertyID == NativeMethods.UIA_IsValuePatternAvailablePropertyId) { 6998return IsPatternSupported(NativeMethods.UIA_ValuePatternId); 7002if (propertyID == NativeMethods.UIA_ControlTypePropertyId) { 7003return NativeMethods.UIA_EditControlTypeId; 7005else if (propertyID == NativeMethods.UIA_NamePropertyId) { 7014if (patternId == NativeMethods.UIA_ValuePatternId) { 7057RaiseAutomationEvent(NativeMethods.UIA_AutomationFocusChangedEventId); 7153NativeMethods.HookProc hook = new NativeMethods.HookProc(new MouseHookObject(this).Callback); 7156mouseHookHandle = UnsafeNativeMethods.SetWindowsHookEx(NativeMethods.WH_MOUSE, 7158NativeMethods.NullHandleRef, 7172if (nCode == NativeMethods.HC_ACTION) { 7173NativeMethods.MOUSEHOOKSTRUCT mhs = (NativeMethods.MOUSEHOOKSTRUCT)UnsafeNativeMethods.PtrToStructure(lparam, typeof(NativeMethods.MOUSEHOOKSTRUCT)); 7176case NativeMethods.WM_LBUTTONDOWN: 7177case NativeMethods.WM_MBUTTONDOWN: 7178case NativeMethods.WM_RBUTTONDOWN: 7179case NativeMethods.WM_NCLBUTTONDOWN: 7180case NativeMethods.WM_NCMBUTTONDOWN: 7181case NativeMethods.WM_NCRBUTTONDOWN: 7182case NativeMethods.WM_MOUSEACTIVATE: 7423if (propertyID == NativeMethods.UIA_ControlTypePropertyId) { 7424return NativeMethods.UIA_TableControlTypeId; 7425} else if (propertyID == NativeMethods.UIA_NamePropertyId) { 7739NativeMethods.POINT pt = new NativeMethods.POINT(x, y);
winforms\Managed\System\WinForms\RadioButton.cs (6)
225if (IsHandleCreated) SendMessage(NativeMethods.BM_SETCHECK, value? 1: 0, 0); 268cp.Style |= NativeMethods.BS_OWNERDRAW; 271cp.Style |= NativeMethods.BS_RADIOBUTTON; 273cp.Style |= NativeMethods.BS_PUSHLIKE; 280cp.Style |= NativeMethods.BS_RIGHTBUTTON; 430SendMessage(NativeMethods.BM_SETCHECK, isChecked? 1: 0, 0);
winforms\Managed\System\WinForms\RichTextBox.cs (207)
30using Util = NativeMethods.Util; 408cp.Style |= NativeMethods.WS_HSCROLL; 414cp.Style |= NativeMethods.WS_VSCROLL; 422if (BorderStyle.FixedSingle == BorderStyle && ((cp.Style & NativeMethods.WS_BORDER) != 0)) { 423cp.Style &= (~NativeMethods.WS_BORDER); 424cp.ExStyle |= NativeMethods.WS_EX_CLIENTEDGE; 828NativeMethods.PARAFORMAT pf = new NativeMethods.PARAFORMAT(); 861NativeMethods.PARAFORMAT pf = new NativeMethods.PARAFORMAT(); 899NativeMethods.PARAFORMAT pf = new NativeMethods.PARAFORMAT(); 921NativeMethods.PARAFORMAT pf = new NativeMethods.PARAFORMAT(); 954NativeMethods.CHARFORMATA cf = GetCharFormat(true); 972NativeMethods.CHARFORMATA cf = new NativeMethods.CHARFORMATA(); 1001NativeMethods.CHARFORMATA cf = GetCharFormat(true); 1010NativeMethods.CHARFORMATA cf = GetCharFormat(true); 1035NativeMethods.CHARFORMAT2A cf2 = GetCharFormat2(true); 1056NativeMethods.CHARFORMAT2A cf2 = new NativeMethods.CHARFORMAT2A(); 1110NativeMethods.PARAFORMAT pf = new NativeMethods.PARAFORMAT(); 1125NativeMethods.PARAFORMAT pf = new NativeMethods.PARAFORMAT(); 1151NativeMethods.PARAFORMAT pf = new NativeMethods.PARAFORMAT(); 1166NativeMethods.PARAFORMAT pf = new NativeMethods.PARAFORMAT(); 1280NativeMethods.PARAFORMAT pf = new NativeMethods.PARAFORMAT(); 1297NativeMethods.PARAFORMAT pf = new NativeMethods.PARAFORMAT(); 1320NativeMethods.PARAFORMAT pf = new NativeMethods.PARAFORMAT(); 1341NativeMethods.PARAFORMAT pf = new NativeMethods.PARAFORMAT(); 1483SendMessage(NativeMethods.EM_SETMODIFY, 0, 0); 1505NativeMethods.GETTEXTLENGTHEX gtl = new NativeMethods.GETTEXTLENGTHEX(); 1972NativeMethods.FINDTEXT ft = new NativeMethods.FINDTEXT(); 1973ft.chrg = new NativeMethods.CHARRANGE(); 2034NativeMethods.CHARRANGE chrg = new NativeMethods.CHARRANGE(); 2066SendMessage(NativeMethods.EM_SCROLLCARET, 0, 0); 2122NativeMethods.CHARRANGE chrg = new NativeMethods.CHARRANGE(); // The range of characters we have searched 2127NativeMethods.TEXTRANGE txrg = new NativeMethods.TEXTRANGE(); // Characters we have slurped into memory in order to search 2128txrg.chrg = new NativeMethods.CHARRANGE(); 2231NativeMethods.CHARFORMATA cf = GetCharFormat(false); 2245private NativeMethods.CHARFORMATA GetCharFormat(bool fSelection) { 2246NativeMethods.CHARFORMATA cf = new NativeMethods.CHARFORMATA(); 2251private NativeMethods.CHARFORMAT2A GetCharFormat2(bool fSelection) { 2252NativeMethods.CHARFORMAT2A cf2 = new NativeMethods.CHARFORMAT2A(); 2266NativeMethods.CHARFORMATA cf = GetCharFormat(true); 2280NativeMethods.CHARFORMATA cf = GetCharFormat(selectionOnly); 2323NativeMethods.POINT wpt = new NativeMethods.POINT(pt.X, pt.Y); 2324int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.EM_CHARFROMPOS, 0, wpt); 2377NativeMethods.POINT pt = new NativeMethods.POINT(); 2378UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.EM_POSFROMCHAR, pt, index); 2713NativeMethods.REPASTESPECIAL rps = null; 2716rps = new NativeMethods.REPASTESPECIAL(); 2857NativeMethods.CHARFORMATA cf = new NativeMethods.CHARFORMATA(); 2878private bool SetCharFormat(int charRange, NativeMethods.CHARFORMATA cf) { 2884NativeMethods.LOGFONT logfont = new NativeMethods.LOGFONT(); 2904NativeMethods.CHARFORMATA cfA = new NativeMethods.CHARFORMATA(); 2918NativeMethods.CHARFORMATW cfW = new NativeMethods.CHARFORMATW(); 2938static private void FontToLogFont(Font value, NativeMethods.LOGFONT logfont) { 2949hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 2953logPixelsX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSX); 2954logPixelsY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSY); 2956UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 2981SendMessage(NativeMethods.WM_CLEAR, 0, 0); 2987SendMessage(NativeMethods.WM_SETTEXT, 0, ""); 3016NativeMethods.CHARRANGE cr = new NativeMethods.CHARRANGE(); 3041NativeMethods.EDITSTREAM es = new NativeMethods.EDITSTREAM(); 3055es.pfnCallback = new NativeMethods.EditStreamCallback(this.EditStreamProc); 3067NativeMethods.EDITSTREAM64 es64 = ConvertToEDITSTREAM64(es); 3089SendMessage(NativeMethods.EM_SETMODIFY, -1, 0); 3092SendMessage(NativeMethods.EM_GETLINECOUNT, 0, 0); 3140NativeMethods.EDITSTREAM es = new NativeMethods.EDITSTREAM(); 3159es.pfnCallback = new NativeMethods.EditStreamCallback(this.EditStreamProc); 3164NativeMethods.EDITSTREAM64 es64 = ConvertToEDITSTREAM64(es); 3184private unsafe NativeMethods.EDITSTREAM64 ConvertToEDITSTREAM64(NativeMethods.EDITSTREAM es) { 3185NativeMethods.EDITSTREAM64 es64 = new NativeMethods.EDITSTREAM64(); 3217private unsafe int GetErrorValue64(NativeMethods.EDITSTREAM64 es64) { 3329NativeMethods.ENLINK enlink; 3333enlink = ConvertFromENLINK64((NativeMethods.ENLINK64)m.GetLParam(typeof(NativeMethods.ENLINK64))); 3336enlink = (NativeMethods.ENLINK)m.GetLParam(typeof(NativeMethods.ENLINK)); 3340case NativeMethods.WM_SETCURSOR: 3345case NativeMethods.WM_LBUTTONDOWN: 3365private string CharRangeToString(NativeMethods.CHARRANGE c) { 3366NativeMethods.TEXTRANGE txrg = new NativeMethods.TEXTRANGE(); 3412case NativeMethods.EN_HSCROLL: 3416case NativeMethods.EN_VSCROLL: 3436NativeMethods.NMHDR nmhdr = (NativeMethods.NMHDR)m.GetLParam(typeof(NativeMethods.NMHDR)); 3442NativeMethods.ENDROPFILES endropfiles = (NativeMethods.ENDROPFILES)m.GetLParam(typeof(NativeMethods.ENDROPFILES)); 3445StringBuilder path = new StringBuilder(NativeMethods.MAX_PATH); 3471NativeMethods.REQRESIZE reqResize = (NativeMethods.REQRESIZE)m.GetLParam(typeof(NativeMethods.REQRESIZE)); 3480NativeMethods.SELCHANGE selChange = (NativeMethods.SELCHANGE)m.GetLParam(typeof(NativeMethods.SELCHANGE)); 3485NativeMethods.ENPROTECTED enprotected; 3490enprotected = ConvertFromENPROTECTED64((NativeMethods.ENPROTECTED64)m.GetLParam(typeof(NativeMethods.ENPROTECTED64))); 3493enprotected = (NativeMethods.ENPROTECTED)m.GetLParam(typeof(NativeMethods.ENPROTECTED)); 3501NativeMethods.CHARFORMATA charFormat = (NativeMethods.CHARFORMATA)UnsafeNativeMethods.PtrToStructure(enprotected.lParam, typeof(NativeMethods.CHARFORMATA)); 3511case NativeMethods.EM_REPLACESEL: 3524case NativeMethods.WM_COPY: 3525case NativeMethods.WM_SETTEXT: 3552private unsafe NativeMethods.ENPROTECTED ConvertFromENPROTECTED64(NativeMethods.ENPROTECTED64 es64) { 3553NativeMethods.ENPROTECTED es = new NativeMethods.ENPROTECTED(); 3556es.nmhdr = new NativeMethods.NMHDR(); 3557es.chrg = new NativeMethods.CHARRANGE(); 3572private static unsafe NativeMethods.ENLINK ConvertFromENLINK64(NativeMethods.ENLINK64 es64) { 3573NativeMethods.ENLINK es = new NativeMethods.ENLINK(); 3576es.nmhdr = new NativeMethods.NMHDR(); 3577es.charrange = new NativeMethods.CHARRANGE(); 3596private void WmSelectionChange(NativeMethods.SELCHANGE selChange) { 3625SendMessage(NativeMethods.WM_KILLFOCUS, 0, 0); 3626SendMessage(NativeMethods.WM_SETFOCUS, 0, 0); 3627UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.EM_SETSEL, selEnd - 1, selEnd); 3671case NativeMethods.WM_REFLECT + NativeMethods.WM_NOTIFY: 3675case NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND: 3679case NativeMethods.WM_SETCURSOR: 3700case NativeMethods.WM_SETFONT: 3704case NativeMethods.WM_IME_NOTIFY: 3709case NativeMethods.WM_GETDLGCODE: 3711m.Result = (IntPtr)((AcceptsTab) ? unchecked( (int) (long)m.Result) | NativeMethods.DLGC_WANTTAB : unchecked( (int) (long)m.Result) & ~NativeMethods.DLGC_WANTTAB); 3714case NativeMethods.WM_GETOBJECT: 3721if (unchecked((int)(long)m.LParam) == NativeMethods.OBJID_QUERYCLASSNAMEIDX) { 3726case NativeMethods.WM_RBUTTONUP: 3738case NativeMethods.WM_VSCROLL: 3741if (loWord == NativeMethods.SB_THUMBTRACK) 3745if (loWord == NativeMethods.SB_THUMBPOSITION) 3751case NativeMethods.WM_HSCROLL: 3754if (loWord == NativeMethods.SB_THUMBTRACK) 3758if (loWord == NativeMethods.SB_THUMBPOSITION) 3786return NativeMethods.E_FAIL; 3789UnsafeNativeMethods.ILockBytes pLockBytes = UnsafeNativeMethods.CreateILockBytesOnHGlobal(NativeMethods.NullHandleRef, true); 3794NativeMethods.STGM_SHARE_EXCLUSIVE | NativeMethods.STGM_CREATE | NativeMethods.STGM_READWRITE, 3798return NativeMethods.S_OK; 3805return NativeMethods.E_NOTIMPL; 3811return NativeMethods.S_OK; 3821return NativeMethods.S_OK; 3834if (!NativeMethods.Succeeded(hr)) 3836return NativeMethods.S_FALSE; 3850return NativeMethods.S_OK; 3853return NativeMethods.S_FALSE; 3860return NativeMethods.S_OK; 3869if (reco == NativeMethods.RECO_DROP) { 3883keyState |= NativeMethods.MK_LBUTTON; 3887keyState |= NativeMethods.MK_RBUTTON; 3891keyState |= NativeMethods.MK_MBUTTON; 3895keyState |= NativeMethods.MK_CONTROL; 3899keyState |= NativeMethods.MK_SHIFT; 3923e.Effect = ((keyState & NativeMethods.MK_CONTROL) == NativeMethods.MK_CONTROL) ? DragDropEffects.Copy : DragDropEffects.Move; 3934return NativeMethods.E_FAIL; 3938return NativeMethods.S_OK; 3944return NativeMethods.E_FAIL; 3948return NativeMethods.E_NOTIMPL; 3954return NativeMethods.E_NOTIMPL; 3957public int GetClipboardData(NativeMethods.CHARRANGE lpchrg, int reco, 3960return NativeMethods.E_NOTIMPL; 4006e.Effect = ((grfKeyState & NativeMethods.MK_CONTROL) == NativeMethods.MK_CONTROL) ? DragDropEffects.Copy : DragDropEffects.Move; 4020return NativeMethods.S_OK; 4023public int GetContextMenu(short seltype, IntPtr lpoleobj, NativeMethods.CHARRANGE lpchrg, out IntPtr hmenu) { 4059return NativeMethods.S_OK;
winforms\Managed\System\WinForms\RichTextBoxConstants.cs (79)
71internal const int EM_GETLIMITTEXT = (NativeMethods.WM_USER + 37); 73internal const int EM_POSFROMCHAR = (NativeMethods.WM_USER + 38); 74internal const int EM_CHARFROMPOS = (NativeMethods.WM_USER + 39); 76internal const int EM_SCROLLCARET = (NativeMethods.WM_USER + 49); 77internal const int EM_CANPASTE = (NativeMethods.WM_USER + 50); 78internal const int EM_DISPLAYBAND = (NativeMethods.WM_USER + 51); 79internal const int EM_EXGETSEL = (NativeMethods.WM_USER + 52); 80internal const int EM_EXLIMITTEXT = (NativeMethods.WM_USER + 53); 81internal const int EM_EXLINEFROMCHAR = (NativeMethods.WM_USER + 54); 82internal const int EM_EXSETSEL = (NativeMethods.WM_USER + 55); 83internal const int EM_FINDTEXT = (NativeMethods.WM_USER + 56); 84internal const int EM_FORMATRANGE = (NativeMethods.WM_USER + 57); 85internal const int EM_GETCHARFORMAT = (NativeMethods.WM_USER + 58); 86internal const int EM_GETEVENTMASK = (NativeMethods.WM_USER + 59); 87internal const int EM_GETOLEINTERFACE = (NativeMethods.WM_USER + 60); 88internal const int EM_GETPARAFORMAT = (NativeMethods.WM_USER + 61); 89internal const int EM_GETSELTEXT = (NativeMethods.WM_USER + 62); 90internal const int EM_HIDESELECTION = (NativeMethods.WM_USER + 63); 91internal const int EM_PASTESPECIAL = (NativeMethods.WM_USER + 64); 92internal const int EM_REQUESTRESIZE = (NativeMethods.WM_USER + 65); 93internal const int EM_SELECTIONTYPE = (NativeMethods.WM_USER + 66); 94internal const int EM_SETBKGNDCOLOR = (NativeMethods.WM_USER + 67); 95internal const int EM_SETCHARFORMAT = (NativeMethods.WM_USER + 68); 96internal const int EM_SETEVENTMASK = (NativeMethods.WM_USER + 69); 97internal const int EM_SETOLECALLBACK = (NativeMethods.WM_USER + 70); 98internal const int EM_SETPARAFORMAT = (NativeMethods.WM_USER + 71); 99internal const int EM_SETTARGETDEVICE = (NativeMethods.WM_USER + 72); 100internal const int EM_STREAMIN = (NativeMethods.WM_USER + 73); 101internal const int EM_STREAMOUT = (NativeMethods.WM_USER + 74); 102internal const int EM_GETTEXTRANGE = (NativeMethods.WM_USER + 75); 103internal const int EM_FINDWORDBREAK = (NativeMethods.WM_USER + 76); 104internal const int EM_SETOPTIONS = (NativeMethods.WM_USER + 77); 105internal const int EM_GETOPTIONS = (NativeMethods.WM_USER + 78); 106internal const int EM_FINDTEXTEX = (NativeMethods.WM_USER + 79); 107internal const int EM_GETWORDBREAKPROCEX = (NativeMethods.WM_USER + 80); 108internal const int EM_SETWORDBREAKPROCEX = (NativeMethods.WM_USER + 81); 111internal const int EM_SETUNDOLIMIT = (NativeMethods.WM_USER + 82); 112internal const int EM_REDO = (NativeMethods.WM_USER + 84); 113internal const int EM_CANREDO = (NativeMethods.WM_USER + 85); 114internal const int EM_GETUNDONAME = (NativeMethods.WM_USER + 86); 115internal const int EM_GETREDONAME = (NativeMethods.WM_USER + 87); 116internal const int EM_STOPGROUPTYPING = (NativeMethods.WM_USER + 88); 118internal const int EM_SETTEXTMODE = (NativeMethods.WM_USER + 89); 119internal const int EM_GETTEXTMODE = (NativeMethods.WM_USER + 90); 121internal const int EM_AUTOURLDETECT = (NativeMethods.WM_USER + 91); 122internal const int EM_GETAUTOURLDETECT = (NativeMethods.WM_USER + 92); 123internal const int EM_SETPALETTE = (NativeMethods.WM_USER + 93); 124internal const int EM_GETTEXTEX = (NativeMethods.WM_USER + 94); 125internal const int EM_GETTEXTLENGTHEX = (NativeMethods.WM_USER + 95); 128internal const int EM_SETPUNCTUATION = (NativeMethods.WM_USER + 100); 129internal const int EM_GETPUNCTUATION = (NativeMethods.WM_USER + 101); 130internal const int EM_SETWORDWRAPMODE = (NativeMethods.WM_USER + 102); 131internal const int EM_GETWORDWRAPMODE = (NativeMethods.WM_USER + 103); 132internal const int EM_SETIMECOLOR = (NativeMethods.WM_USER + 104); 133internal const int EM_GETIMECOLOR = (NativeMethods.WM_USER + 105); 134internal const int EM_SETIMEOPTIONS = (NativeMethods.WM_USER + 106); 135internal const int EM_GETIMEOPTIONS = (NativeMethods.WM_USER + 107); 136internal const int EM_CONVPOSITION = (NativeMethods.WM_USER + 108); 138internal const int EM_SETLANGOPTIONS = (NativeMethods.WM_USER + 120); 139internal const int EM_GETLANGOPTIONS = (NativeMethods.WM_USER + 121); 140internal const int EM_GETIMECOMPMODE = (NativeMethods.WM_USER + 122); 142internal const int EM_FINDTEXTW = (NativeMethods.WM_USER + 123); 143internal const int EM_FINDTEXTEXW = (NativeMethods.WM_USER + 124); 146internal const int EM_RECONVERSION = (NativeMethods.WM_USER + 125); 147internal const int EM_SETIMEMODEBIAS = (NativeMethods.WM_USER + 126); 148internal const int EM_GETIMEMODEBIAS = (NativeMethods.WM_USER + 127); 151internal const int EM_SETBIDIOPTIONS = (NativeMethods.WM_USER + 200); 152internal const int EM_GETBIDIOPTIONS = (NativeMethods.WM_USER + 201); 154internal const int EM_SETTYPOGRAPHYOPTIONS = (NativeMethods.WM_USER + 202); 155internal const int EM_GETTYPOGRAPHYOPTIONS = (NativeMethods.WM_USER + 203); 158internal const int EM_SETEDITSTYLE = (NativeMethods.WM_USER + 204); 159internal const int EM_GETEDITSTYLE = (NativeMethods.WM_USER + 205); 162internal const int EM_SETQUERYRTFOBJ = (NativeMethods.WM_USER + 270); 200internal const int EM_OUTLINE = NativeMethods.WM_USER + 220; 203internal const int EM_GETSCROLLPOS = NativeMethods.WM_USER + 221; 204internal const int EM_SETSCROLLPOS = NativeMethods.WM_USER + 222; 207internal const int EM_SETFONTSIZE = NativeMethods.WM_USER + 223; 208internal const int EM_GETZOOM = NativeMethods.WM_USER + 224; 209internal const int EM_SETZOOM = NativeMethods.WM_USER + 225;
winforms\Managed\System\WinForms\SafeNativeMethods.cs (89)
53public static extern int GetDIBits(HandleRef hdc, HandleRef hbm, int uStartScan, int cScanLines, byte[] lpvBits, ref NativeMethods.BITMAPINFO_FLAT bmi, int uUsage); 56public static extern int StretchDIBits(HandleRef hdc, int XDest, int YDest, int nDestWidth, int nDestHeight, int XSrc, int YSrc, int nSrcWidth, int nSrcHeight, byte[] lpBits, ref NativeMethods.BITMAPINFO_FLAT lpBitsInfo, int iUsage, int dwRop); 64return System.Internal.HandleCollector.Add(IntCreateCompatibleBitmap(hDC, width, height), NativeMethods.CommonHandles.GDI); 69public static extern bool GetScrollInfo(HandleRef hWnd, int fnBar, [In, Out] NativeMethods.SCROLLINFO si); 73public static extern bool IsAccelerator(HandleRef hAccel, int cAccelEntries, [In] ref NativeMethods.MSG lpMsg, short[] lpwCmd); 76public static extern bool ChooseFont([In, Out] NativeMethods.CHOOSEFONT cf); 104public static extern int HtmlHelp(HandleRef hwndCaller, [MarshalAs(UnmanagedType.LPTStr)]string pszFile, int uCommand, [MarshalAs(UnmanagedType.LPStruct)]NativeMethods.HH_POPUP dwData); 107public static extern int HtmlHelp(HandleRef hwndCaller, [MarshalAs(UnmanagedType.LPTStr)]string pszFile, int uCommand, [MarshalAs(UnmanagedType.LPStruct)]NativeMethods.HH_FTS_QUERY dwData); 110public static extern int HtmlHelp(HandleRef hwndCaller, [MarshalAs(UnmanagedType.LPTStr)]string pszFile, int uCommand, [MarshalAs(UnmanagedType.LPStruct)]NativeMethods.HH_AKLINK dwData); 124public static extern bool MoveToEx(HandleRef hdc, int x, int y, NativeMethods.POINT pt); 154public static extern bool ChooseColor([In, Out] NativeMethods.CHOOSECOLOR cc); 165System.Internal.HandleCollector.Remove((IntPtr)hObject, NativeMethods.CommonHandles.GDI); 171public static extern SafeNativeMethods.IFontDisp OleCreateIFontDispIndirect(NativeMethods.FONTDESC fd, ref Guid iid); 179return System.Internal.HandleCollector.Add(IntCreateSolidBrush(crColor), NativeMethods.CommonHandles.GDI); 183public static extern bool SetWindowExtEx(HandleRef hDC, int x, int y, [In, Out] NativeMethods.SIZE size); 197public static extern bool InitCommonControlsEx(NativeMethods.INITCOMMONCONTROLSEX icc); 290public static extern bool ImageList_GetImageInfo(HandleRef himl, int i, NativeMethods.IMAGEINFO pImageInfo); 315public static extern bool TrackPopupMenuEx(HandleRef hmenu, int fuFlags, int x, int y, HandleRef hwnd, NativeMethods.TPMPARAMS tpm); 329public static extern bool EnumDisplaySettings(string lpszDeviceName, int iModeNum, ref NativeMethods.DEVMODE lpDevMode); 333public static extern bool GetMonitorInfo(HandleRef hmonitor, [In, Out]NativeMethods.MONITORINFOEX info); 336public static extern IntPtr MonitorFromPoint(NativeMethods.POINTSTRUCT pt, int flags); 339public static extern IntPtr MonitorFromRect(ref NativeMethods.RECT rect, int flags); 345public static extern bool EnumDisplayMonitors(HandleRef hdc, NativeMethods.COMRECT rcClip, NativeMethods.MonitorEnumProc lpfnEnum, IntPtr dwData); 350return System.Internal.HandleCollector.Add(IntCreateHalftonePalette(hdc), NativeMethods.CommonHandles.GDI); 358public static extern int GetTextMetricsW(HandleRef hDC, [In, Out] ref NativeMethods.TEXTMETRIC lptm); 361public static extern int GetTextMetricsA(HandleRef hDC, [In, Out] ref NativeMethods.TEXTMETRICA lptm); 363public static int GetTextMetrics(HandleRef hDC, ref NativeMethods.TEXTMETRIC lptm) { 367NativeMethods.TEXTMETRICA lptmA = new NativeMethods.TEXTMETRICA(); 406return System.Internal.HandleCollector.Add(IntCreateDIBSection(hdc, pbmi, iUsage, ppvBits, hSection, dwOffset), NativeMethods.CommonHandles.GDI); 415return System.Internal.HandleCollector.Add(IntCreateBitmap(nWidth, nHeight, nPlanes, nBitsPerPixel, lpvBits), NativeMethods.CommonHandles.GDI); 424return System.Internal.HandleCollector.Add(IntCreateBitmapShort(nWidth, nHeight, nPlanes, nBitsPerPixel, lpvBits), NativeMethods.CommonHandles.GDI); 433return System.Internal.HandleCollector.Add(IntCreateBitmapByte(nWidth, nHeight, nPlanes, nBitsPerPixel, lpvBits), NativeMethods.CommonHandles.GDI); 441return System.Internal.HandleCollector.Add(IntCreatePatternBrush(hbmp), NativeMethods.CommonHandles.GDI); 445private static extern IntPtr IntCreateBrushIndirect(NativeMethods.LOGBRUSH lb); 448public static IntPtr CreateBrushIndirect(NativeMethods.LOGBRUSH lb) { 449return System.Internal.HandleCollector.Add(IntCreateBrushIndirect(lb), NativeMethods.CommonHandles.GDI); 457return System.Internal.HandleCollector.Add(IntCreatePen(nStyle, nWidth, crColor), NativeMethods.CommonHandles.GDI); 463public static extern bool SetViewportExtEx(HandleRef hDC, int x, int y, NativeMethods.SIZE size); 469public extern static bool GetClipCursor([In, Out] ref NativeMethods.RECT lpRect); 475public static extern bool GetIconInfo(HandleRef hIcon, [In, Out] NativeMethods.ICONINFO info); 484return System.Internal.HandleCollector.Add(IntCopyImage(hImage, uType, cxDesired, cyDesired, fuFlags), NativeMethods.CommonHandles.GDI); 487return System.Internal.HandleCollector.Add(IntCopyImage(hImage, uType, cxDesired, cyDesired, fuFlags), NativeMethods.CommonHandles.Cursor); 493public static extern bool AdjustWindowRectEx(ref NativeMethods.RECT lpRect, int dwStyle, bool bMenu, int dwExStyle); 498public static extern bool AdjustWindowRectExForDpi(ref NativeMethods.RECT lpRect, int dwStyle, bool bMenu, int dwExStyle, uint dpi); 511public static extern bool GetClientRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect); 520public static extern bool ValidateRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect); 537public static extern int FillRect(HandleRef hdc, [In] ref NativeMethods.RECT rect, HandleRef hbrush); 559public static extern bool SetViewportOrgEx(HandleRef hDC, int x, int y, [In, Out] NativeMethods.POINT point); 567return System.Internal.HandleCollector.Add(IntCreateRectRgn(x1, y1, x2, y2), NativeMethods.CommonHandles.GDI); 578public static extern bool LPtoDP(HandleRef hDC, [In, Out] ref NativeMethods.RECT lpRect, int nCount); 581public static extern bool SetWindowOrgEx(HandleRef hDC, int x, int y, [In, Out] NativeMethods.POINT point); 584public static extern bool GetViewportOrgEx(HandleRef hDC, [In, Out] NativeMethods.POINT point); 628private static extern bool _TrackMouseEvent(NativeMethods.TRACKMOUSEEVENT tme); 629public static bool TrackMouseEvent(NativeMethods.TRACKMOUSEEVENT tme) { 635public static extern bool RedrawWindow(HandleRef hwnd, ref NativeMethods.RECT rcUpdate, HandleRef hrgnUpdate, int flags); 638public static extern bool RedrawWindow(HandleRef hwnd, NativeMethods.COMRECT rcUpdate, HandleRef hrgnUpdate, int flags); 641public static extern bool InvalidateRect(HandleRef hWnd, ref NativeMethods.RECT rect, bool erase); 644public static extern bool InvalidateRect(HandleRef hWnd, NativeMethods.COMRECT rect, bool erase); 656public static extern int ScrollWindowEx(HandleRef hWnd, int nXAmount, int nYAmount, NativeMethods.COMRECT rectScrollRegion, ref NativeMethods.RECT rectClip, HandleRef hrgnUpdate, ref NativeMethods.RECT prcUpdate, int flags); 687public static extern bool ScrollWindow(HandleRef hWnd, int nXAmount, int nYAmount, ref NativeMethods.RECT rectScrollRegion, ref NativeMethods.RECT rectClip); 705public static extern bool DrawEdge(HandleRef hDC, ref NativeMethods.RECT rect, int edge, int flags); 708public static extern bool DrawFrameControl(HandleRef hDC, ref NativeMethods.RECT rect, int type, int state); 714public static extern int GetRgnBox(HandleRef hRegion, ref NativeMethods.RECT clipRect); 772public static extern int DrawThemeBackground(HandleRef hTheme, HandleRef hdc, int partId, int stateId, [In] NativeMethods.COMRECT pRect, [In] NativeMethods.COMRECT pClipRect); 775public static extern int DrawThemeEdge(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [In] NativeMethods.COMRECT pDestRect, int uEdge, int uFlags, [Out] NativeMethods.COMRECT pContentRect); 778public static extern int DrawThemeParentBackground(HandleRef hwnd, HandleRef hdc, [In] NativeMethods.COMRECT prc); 781public static extern int DrawThemeText(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [MarshalAs(UnmanagedType.LPWStr)] string pszText, int iCharCount, int dwTextFlags, int dwTextFlags2, [In] NativeMethods.COMRECT pRect); 784public static extern int GetThemeBackgroundContentRect(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [In] NativeMethods.COMRECT pBoundingRect, [Out] NativeMethods.COMRECT pContentRect); 787public static extern int GetThemeBackgroundExtent(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [In] NativeMethods.COMRECT pContentRect, [Out] NativeMethods.COMRECT pExtentRect); 790public static extern int GetThemeBackgroundRegion(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [In] NativeMethods.COMRECT pRect, ref IntPtr pRegion); 805public static extern int GetThemeFont(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, int iPropId, NativeMethods.LOGFONT pFont); 811public static extern int GetThemePartSize(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [In] NativeMethods.COMRECT prc, System.Windows.Forms.VisualStyles.ThemeSizeType eSize, [Out] NativeMethods.SIZE psz); 814public static extern int GetThemePosition(HandleRef hTheme, int iPartId, int iStateId, int iPropId, [Out] NativeMethods.POINT pPoint); 817public static extern int GetThemeMargins(HandleRef hTheme, HandleRef hDC, int iPartId, int iStateId, int iPropId, ref NativeMethods.MARGINS margins); 826public static extern int GetThemeTextExtent(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [MarshalAs(UnmanagedType.LPWStr)] string pszText, int iCharCount, int dwTextFlags, [In] NativeMethods.COMRECT pBoundingRect, [Out] NativeMethods.COMRECT pExtentRect); 832 public static extern int HitTestThemeBackground(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, int dwOptions, [In] NativeMethods.COMRECT pRect, HandleRef hrgn, [In] NativeMethods.POINTSTRUCT ptTest, ref int pwHitTestCode); 859public static extern int SetProcessDpiAwareness(NativeMethods.PROCESS_DPI_AWARENESS awareness);
winforms\Managed\System\WinForms\SaveFileDialog.cs (9)
50return GetOption(NativeMethods.OFN_CREATEPROMPT); 55SetOption(NativeMethods.OFN_CREATEPROMPT, value); 73return GetOption(NativeMethods.OFN_OVERWRITEPROMPT); 78SetOption(NativeMethods.OFN_OVERWRITEPROMPT, value); 161if ((options & NativeMethods.OFN_OVERWRITEPROMPT) != 0 && FileExists(fileName) && !this.UseVistaDialogInternal) { 167if ((options & NativeMethods.OFN_CREATEPROMPT) != 0 && !FileExists(fileName)) { 185SetOption(NativeMethods.OFN_OVERWRITEPROMPT, true); 198internal override bool RunFileDialog(NativeMethods.OPENFILENAME_I ofn) { 210case NativeMethods.FNERR_INVALIDFILENAME:
winforms\Managed\System\WinForms\Screen.cs (14)
68private static bool multiMonitorSupport = (UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CMONITORS) != 0); 90NativeMethods.MONITORINFOEX info = new NativeMethods.MONITORINFOEX(); 104this.bitDepth = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, screenDC), NativeMethods.BITSPIXEL); 105this.bitDepth *= UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, screenDC), NativeMethods.PLANES); 123NativeMethods.MonitorEnumProc proc = new NativeMethods.MonitorEnumProc(closure.Callback); 124SafeNativeMethods.EnumDisplayMonitors(NativeMethods.NullHandleRef, null, proc, IntPtr.Zero); 247NativeMethods.MONITORINFOEX info = new NativeMethods.MONITORINFOEX(); 309NativeMethods.POINTSTRUCT pt = new NativeMethods.POINTSTRUCT(point.X, point.Y); 328NativeMethods.RECT rc = NativeMethods.RECT.FromXYWH(rect.X, rect.Y, rect.Width, rect.Height);
winforms\Managed\System\WinForms\ScrollableControl.cs (47)
236cp.Style |= NativeMethods.WS_HSCROLL; 239cp.Style &= (~NativeMethods.WS_HSCROLL); 242cp.Style |= NativeMethods.WS_VSCROLL; 245cp.Style &= (~NativeMethods.WS_VSCROLL); 876NativeMethods.RECT rcClip = NativeMethods.RECT.FromXYWH(cr.X, cr.Y, cr.Width, cr.Height); 877NativeMethods.RECT rcUpdate = NativeMethods.RECT.FromXYWH(cr.X, cr.Y, cr.Width, cr.Height); 881NativeMethods.NullHandleRef, 883NativeMethods.SW_INVALIDATE 884| NativeMethods.SW_ERASE 885| NativeMethods.SW_SCROLLCHILDREN); 989NativeMethods.SCROLLINFO si = new NativeMethods.SCROLLINFO(); 990si.fMask = NativeMethods.SIF_TRACKPOS; 1284SendMessage(NativeMethods.WM_HSCROLL, 1285NativeMethods.Util.MAKELPARAM((RightToLeft == RightToLeft.Yes) ? NativeMethods.SB_RIGHT : NativeMethods.SB_LEFT,0), 0); 1313bool thumbTrack = NativeMethods.Util.LOWORD(m.WParam) != NativeMethods.SB_THUMBTRACK; 1322switch (NativeMethods.Util.LOWORD(m.WParam)) { 1323case NativeMethods.SB_THUMBPOSITION: 1324case NativeMethods.SB_THUMBTRACK: 1325pos = ScrollThumbPosition(NativeMethods.SB_VERT); 1327case NativeMethods.SB_LINEUP: 1335case NativeMethods.SB_LINEDOWN: 1343case NativeMethods.SB_PAGEUP: 1351case NativeMethods.SB_PAGEDOWN: 1359case NativeMethods.SB_TOP: 1362case NativeMethods.SB_BOTTOM: 1399switch (NativeMethods.Util.LOWORD(m.WParam)) { 1400case NativeMethods.SB_THUMBPOSITION: 1401case NativeMethods.SB_THUMBTRACK: 1402pos = ScrollThumbPosition(NativeMethods.SB_HORZ); 1404case NativeMethods.SB_LINEUP: 1412case NativeMethods.SB_LINEDOWN: 1420case NativeMethods.SB_PAGEUP: 1428case NativeMethods.SB_PAGEDOWN: 1436case NativeMethods.SB_LEFT: 1439case NativeMethods.SB_RIGHT: 1443if (GetScrollState(ScrollStateFullDrag) || NativeMethods.Util.LOWORD(m.WParam) != NativeMethods.SB_THUMBTRACK) { 1457ScrollEventType type = (ScrollEventType)NativeMethods.Util.LOWORD(m.WParam); 1480case NativeMethods.WM_VSCROLL: 1483case NativeMethods.WM_HSCROLL: 1486case NativeMethods.WM_SETTINGCHANGE:
winforms\Managed\System\WinForms\ScrollBar.cs (23)
66if ((this.CreateParams.Style & NativeMethods.SBS_VERT) != 0) 195cp.Style &= (~NativeMethods.WS_BORDER); 730while (Math.Abs(wheelDelta) >= NativeMethods.WHEEL_DELTA) { 732wheelDelta -= NativeMethods.WHEEL_DELTA; 737wheelDelta += NativeMethods.WHEEL_DELTA; 793NativeMethods.SCROLLINFO si = new NativeMethods.SCROLLINFO(); 794si.cbSize = Marshal.SizeOf(typeof(NativeMethods.SCROLLINFO)); 795si.fMask = NativeMethods.SIF_ALL; 810UnsafeNativeMethods.SetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_CTL, si, true); 819ScrollEventType type = (ScrollEventType)NativeMethods.Util.LOWORD(m.WParam); 893NativeMethods.SCROLLINFO si = new NativeMethods.SCROLLINFO(); 894si.fMask = NativeMethods.SIF_TRACKPOS; 895SafeNativeMethods.GetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_CTL, si); 919case NativeMethods.WM_REFLECT + NativeMethods.WM_HSCROLL: 920case NativeMethods.WM_REFLECT + NativeMethods.WM_VSCROLL: 923case NativeMethods.WM_ERASEBKGND: 926case NativeMethods.WM_SIZE: 930SendMessage(NativeMethods.WM_KILLFOCUS, 0, 0); 931SendMessage(NativeMethods.WM_SETFOCUS, 0, 0);
winforms\Managed\System\WinForms\ScrollButton.cs (6)
34Down = NativeMethods.DFCS_SCROLLDOWN, 43Left = NativeMethods.DFCS_SCROLLLEFT, 52Right = NativeMethods.DFCS_SCROLLRIGHT, 61Up = NativeMethods.DFCS_SCROLLUP, 66Min = NativeMethods.DFCS_SCROLLUP, 69Max = NativeMethods.DFCS_SCROLLRIGHT,
winforms\Managed\System\WinForms\ScrollEventType.cs (9)
39SmallDecrement = NativeMethods.SB_LINELEFT, 51SmallIncrement = NativeMethods.SB_LINERIGHT, 62LargeDecrement = NativeMethods.SB_PAGELEFT, 72LargeIncrement = NativeMethods.SB_PAGERIGHT, 81ThumbPosition = NativeMethods.SB_THUMBPOSITION, 91ThumbTrack = NativeMethods.SB_THUMBTRACK, 102First = NativeMethods.SB_LEFT, 113Last = NativeMethods.SB_RIGHT, 122EndScroll = NativeMethods.SB_ENDSCROLL,
winforms\Managed\System\WinForms\ScrollProperties.cs (6)
313NativeMethods.SCROLLINFO si = new NativeMethods.SCROLLINFO(); 314si.cbSize = Marshal.SizeOf(typeof(NativeMethods.SCROLLINFO)); 315si.fMask = NativeMethods.SIF_ALL; 333UnsafeNativeMethods.EnableScrollBar(new HandleRef(parent, parent.Handle), Orientation, NativeMethods.ESB_ENABLE_BOTH); 336UnsafeNativeMethods.EnableScrollBar(new HandleRef(parent, parent.Handle), Orientation, NativeMethods.ESB_DISABLE_BOTH);
winforms\Managed\System\WinForms\SearchDirectionHint.cs (4)
17Up = NativeMethods.VK_UP, 22Down = NativeMethods.VK_DOWN, 27Left = NativeMethods.VK_LEFT, 32Right = NativeMethods.VK_RIGHT
winforms\Managed\System\WinForms\SendKeys.cs (74)
106private static NativeMethods.HookProc hook; 167AddEvent(new SKEvent(NativeMethods.WM_KEYDOWN, (int)Keys.ShiftKey, fStartNewChar, hwnd)); 173AddEvent(new SKEvent(NativeMethods.WM_KEYDOWN, (int)Keys.ControlKey, fStartNewChar, hwnd)); 179AddEvent(new SKEvent(NativeMethods.WM_KEYDOWN, (int)Keys.Menu, fStartNewChar, hwnd)); 190AddEvent(new SKEvent(NativeMethods.WM_CHAR, character, (int)(oemVal & 0xFFFF), hwnd)); 204AddEvent(new SKEvent(altnoctrldown ? NativeMethods.WM_SYSKEYDOWN : NativeMethods.WM_KEYDOWN, vk, fStartNewChar, hwnd)); 206AddEvent(new SKEvent(altnoctrldown ? NativeMethods.WM_SYSKEYUP : NativeMethods.WM_KEYUP, vk, fStartNewChar, hwnd)); 217AddEvent(new SKEvent(NativeMethods.WM_KEYUP, (int)Keys.ShiftKey, false, hwnd)); 221AddEvent(new SKEvent(NativeMethods.WM_KEYUP, (int)Keys.ControlKey, false, hwnd)); 225AddEvent(new SKEvent(NativeMethods.WM_SYSKEYUP, (int)Keys.Menu, false, hwnd)); 236hook = new NativeMethods.HookProc(new SendKeysHookProc().Callback); 238hhook = UnsafeNativeMethods.SetWindowsHookEx(NativeMethods.WH_JOURNALPLAYBACK, 254NativeMethods.HookProc hookProc = new NativeMethods.HookProc(EmptyHookCallback); 255IntPtr hookHandle = UnsafeNativeMethods.SetWindowsHookEx(NativeMethods.WH_JOURNALPLAYBACK, 471AddEvent(new SKEvent(NativeMethods.WM_KEYDOWN, (int)Keys.ShiftKey, fStartNewChar, hwnd)); 477AddEvent(new SKEvent(NativeMethods.WM_KEYDOWN, (int)Keys.ControlKey, fStartNewChar, hwnd)); 483AddEvent(new SKEvent(NativeMethods.WM_KEYDOWN, (int)Keys.Menu, fStartNewChar, hwnd)); 504AddEvent(new SKEvent(NativeMethods.WM_KEYDOWN, (int)Keys.ShiftKey, fStartNewChar, hwnd)); 512AddEvent(new SKEvent(NativeMethods.WM_KEYDOWN, (int)Keys.ControlKey, fStartNewChar, hwnd)); 520AddEvent(new SKEvent((haveKeys[HAVECTRL] != 0) ? NativeMethods.WM_KEYDOWN : NativeMethods.WM_SYSKEYDOWN, 577NativeMethods.INPUT[] currentInput = new NativeMethods.INPUT[2]; 580currentInput[0].type = NativeMethods.INPUT_KEYBOARD; 581currentInput[1].type = NativeMethods.INPUT_KEYBOARD; 585currentInput[1].inputUnion.ki.dwFlags = NativeMethods.KEYEVENTF_UNICODE | NativeMethods.KEYEVENTF_KEYUP; 594int INPUTSize = Marshal.SizeOf(typeof(NativeMethods.INPUT)); 622if (skEvent.wm == NativeMethods.WM_CHAR) 629currentInput[0].inputUnion.ki.dwFlags = NativeMethods.KEYEVENTF_UNICODE; 641if (skEvent.wm == NativeMethods.WM_KEYUP || skEvent.wm == NativeMethods.WM_SYSKEYUP) 643currentInput[0].inputUnion.ki.dwFlags |= NativeMethods.KEYEVENTF_KEYUP; 649currentInput[0].inputUnion.ki.dwFlags |= NativeMethods.KEYEVENTF_EXTENDEDKEY; 711if ((skEvent.wm == NativeMethods.WM_KEYUP) || 712(skEvent.wm == NativeMethods.WM_SYSKEYUP)) 716else if ((skEvent.wm == NativeMethods.WM_KEYDOWN) || 717(skEvent.wm == NativeMethods.WM_SYSKEYDOWN)) 742AddEvent(new SKEvent(NativeMethods.WM_KEYUP, (int)Keys.ShiftKey, false, IntPtr.Zero)); 746AddEvent(new SKEvent(NativeMethods.WM_KEYUP, (int)Keys.ControlKey, false, IntPtr.Zero)); 750AddEvent(new SKEvent(NativeMethods.WM_SYSKEYUP, (int)Keys.Menu, false, IntPtr.Zero)); 756return (skEvent.paramL == NativeMethods.VK_UP) || 757(skEvent.paramL == NativeMethods.VK_DOWN) || 758(skEvent.paramL == NativeMethods.VK_LEFT) || 759(skEvent.paramL == NativeMethods.VK_RIGHT) || 760(skEvent.paramL == NativeMethods.VK_PRIOR) || 761(skEvent.paramL == NativeMethods.VK_NEXT) || 762(skEvent.paramL == NativeMethods.VK_HOME) || 763(skEvent.paramL == NativeMethods.VK_END) || 764(skEvent.paramL == NativeMethods.VK_INSERT) || 765(skEvent.paramL == NativeMethods.VK_DELETE); 778if (skEvent.wm == NativeMethods.WM_KEYDOWN) 807NativeMethods.INPUT[] keyboardInput = new NativeMethods.INPUT[2]; 809keyboardInput[0].type = NativeMethods.INPUT_KEYBOARD; 812keyboardInput[1].type = NativeMethods.INPUT_KEYBOARD; 813keyboardInput[1].inputUnion.ki.dwFlags = NativeMethods.KEYEVENTF_KEYUP; 818keyboardInput[0].inputUnion.ki.wVk = NativeMethods.VK_CAPITAL; 819keyboardInput[1].inputUnion.ki.wVk = NativeMethods.VK_CAPITAL; 825keyboardInput[0].inputUnion.ki.wVk = NativeMethods.VK_NUMLOCK; 826keyboardInput[1].inputUnion.ki.wVk = NativeMethods.VK_NUMLOCK; 832keyboardInput[0].inputUnion.ki.wVk = NativeMethods.VK_SCROLL; 833keyboardInput[1].inputUnion.ki.wVk = NativeMethods.VK_SCROLL; 839keyboardInput[0].inputUnion.ki.wVk = NativeMethods.VK_KANA; 840keyboardInput[1].inputUnion.ki.wVk = NativeMethods.VK_KANA; 997if (m.Msg == NativeMethods.WM_CANCELJOURNAL) { 1061NativeMethods.EVENTMSG eventmsg = (NativeMethods.EVENTMSG)UnsafeNativeMethods.PtrToStructure(lparam, typeof(NativeMethods.EVENTMSG)); 1070case NativeMethods.HC_SKIP: 1082case NativeMethods.HC_GETNEXT:
winforms\Managed\System\WinForms\SplitContainer.cs (20)
354System.Runtime.InteropServices.DispId(NativeMethods.ActiveX.DISPID_BORDERSTYLE), 586NativeMethods.POINT p = new NativeMethods.POINT(); 587NativeMethods.RECT r = new NativeMethods.RECT(); 591SendMessage(NativeMethods.WM_SETCURSOR, Handle, NativeMethods.HTCLIENT); 957DispId(NativeMethods.ActiveX.DISPID_TABSTOP), 1636IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 1639SafeNativeMethods.PatBlt(new HandleRef(this, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT); 2350if (m.WParam == InternalHandle && ((int)m.LParam & 0x0000FFFF) == NativeMethods.HTCLIENT) { 2496case NativeMethods.WM_SETCURSOR: 2499case NativeMethods.WM_SETFOCUS: 2503case NativeMethods.WM_KILLFOCUS: 2549if (m.Msg >= NativeMethods.WM_KEYFIRST && m.Msg <= NativeMethods.WM_KEYLAST) { 2550if ((m.Msg == NativeMethods.WM_KEYDOWN && (int)m.WParam == (int)Keys.Escape) 2551|| (m.Msg == NativeMethods.WM_SYSKEYDOWN)) {
winforms\Managed\System\WinForms\Splitter.cs (12)
244System.Runtime.InteropServices.DispId(NativeMethods.ActiveX.DISPID_BORDERSTYLE), 276cp.ExStyle &= (~NativeMethods.WS_EX_CLIENTEDGE); 277cp.Style &= (~NativeMethods.WS_BORDER); 281cp.ExStyle |= NativeMethods.WS_EX_CLIENTEDGE; 284cp.Style |= NativeMethods.WS_BORDER; 773IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(ParentInternal, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 776SafeNativeMethods.PatBlt(new HandleRef(ParentInternal, dc), r.X, r.Y, r.Width, r.Height, NativeMethods.PATINVERT); 1085if (m.Msg >= NativeMethods.WM_KEYFIRST && m.Msg <= NativeMethods.WM_KEYLAST) { 1086if (m.Msg == NativeMethods.WM_KEYDOWN && unchecked((int)(long)m.WParam) == (int)Keys.Escape) {
winforms\Managed\System\WinForms\StatusBar.cs (67)
222cp.ClassName = NativeMethods.WC_STATUSBAR; 225cp.Style |= NativeMethods.SBARS_SIZEGRIP; 228cp.Style &= (~NativeMethods.SBARS_SIZEGRIP); 230cp.Style |= NativeMethods.CCS_NOPARENTALIGN | NativeMethods.CCS_NORESIZE; 444SendMessage(NativeMethods.SB_SIMPLE, bShowPanels, 0); 602UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.SB_SETPARTS, 1, offsets); 603SendMessage(NativeMethods.SB_SETICON, 0, IntPtr.Zero); 616UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.SB_SETPARTS, length, offsets2); 637NativeMethods.INITCOMMONCONTROLSEX icc = new NativeMethods.INITCOMMONCONTROLSEX(); 638icc.dwICC = NativeMethods.ICC_BAR_CLASSES; 696SendMessage(NativeMethods.SB_SIMPLE, 1, 0); 797SendMessage(NativeMethods.SB_SETTEXT, 0, ""); 811SendMessage(NativeMethods.SB_SETTEXT, 0, null); 864int wparam = SIMPLE_INDEX + NativeMethods.SBT_NOBORDERS; 866wparam |= NativeMethods.SBT_RTLREADING; 869SendMessage(NativeMethods.SB_SETTEXT, wparam, simpleText); 1029NativeMethods.DRAWITEMSTRUCT dis = (NativeMethods.DRAWITEMSTRUCT)m.GetLParam(typeof(NativeMethods.DRAWITEMSTRUCT)); 1050private void WmNotifyNMClick(NativeMethods.NMHDR note) { 1072case NativeMethods.NM_CLICK: 1076case NativeMethods.NM_RCLICK: 1080case NativeMethods.NM_DBLCLK: 1084case NativeMethods.NM_RDBLCLK: 1100int x = NativeMethods.Util.LOWORD(m.LParam); 1149m.Result = (IntPtr)NativeMethods.HTCLIENT; 1164case NativeMethods.WM_NCHITTEST: 1167case NativeMethods.WM_REFLECT + NativeMethods.WM_DRAWITEM: 1170case NativeMethods.WM_NOTIFY: 1171case NativeMethods.WM_NOTIFY + NativeMethods.WM_REFLECT: 1172NativeMethods.NMHDR note = (NativeMethods.NMHDR)m.GetLParam(typeof(NativeMethods.NMHDR)); 1174case NativeMethods.NM_CLICK: 1175case NativeMethods.NM_RCLICK: 1176case NativeMethods.NM_DBLCLK: 1177case NativeMethods.NM_RDBLCLK: 1679NativeMethods.INITCOMMONCONTROLSEX icc = new NativeMethods.INITCOMMONCONTROLSEX(); 1680icc.dwICC = NativeMethods.ICC_TAB_CLASSES; 1684cp.ClassName = NativeMethods.TOOLTIPS_CLASS; 1685cp.Style |= NativeMethods.TTS_ALWAYSTIP; 1783ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(p.MainToolTip, p.MainToolTip.Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO(tool)); 1786ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ADDTOOL, 0, GetTOOLINFO(tool)); 1795UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_DELTOOL, 0, GetMinTOOLINFO(tool)); 1800UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTOOLINFO, 0, GetTOOLINFO(tool)); 1815SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOPMOST, 1817NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOSIZE | 1818NativeMethods.SWP_NOACTIVATE); 1823UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 1853private NativeMethods.TOOLINFO_T GetMinTOOLINFO(Tool tool) { 1854NativeMethods.TOOLINFO_T ti = new NativeMethods.TOOLINFO_T(); 1855ti.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO_T)); 1875private NativeMethods.TOOLINFO_T GetTOOLINFO(Tool tool) { 1876NativeMethods.TOOLINFO_T ti = GetMinTOOLINFO(tool); 1877ti.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO_T)); 1878ti.uFlags |= NativeMethods.TTF_TRANSPARENT | NativeMethods.TTF_SUBCLASS; 1884ti.uFlags |= NativeMethods.TTF_RTLREADING; 1888ti.rect = NativeMethods.RECT.FromXYWH(tool.rect.X, tool.rect.Y, tool.rect.Width, tool.rect.Height); 1907case NativeMethods.WM_SETFOCUS:
winforms\Managed\System\WinForms\StatusBarPanel.cs (12)
148DispId(NativeMethods.ActiveX.DISPID_BORDERSTYLE), 213this.parent.SendMessage(NativeMethods.SB_SETICON, (IntPtr)GetIndex(), handle); 621border |= NativeMethods.SBT_NOBORDERS; 626border |= NativeMethods.SBT_POPOUT; 633border |= NativeMethods.SBT_OWNERDRAW; 640wparam |= NativeMethods.SBT_RTLREADING; 643int result = (int) UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.Handle), NativeMethods.SB_SETTEXT, (IntPtr)wparam, sendText); 649this.parent.SendMessage(NativeMethods.SB_SETICON, (IntPtr)GetIndex(), this.icon.Handle); 652this.parent.SendMessage(NativeMethods.SB_SETICON, (IntPtr)GetIndex(), IntPtr.Zero); 656NativeMethods.RECT rect = new NativeMethods.RECT(); 657result = (int) UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.Handle), NativeMethods.SB_GETRECT, (IntPtr)GetIndex(), ref rect);
winforms\Managed\System\WinForms\StatusStrip.cs (16)
554if ((m.Msg == NativeMethods.WM_NCHITTEST) && SizingGrip) { 558int x = NativeMethods.Util.LOWORD(m.LParam); 559int y = NativeMethods.Util.HIWORD(m.LParam); 570NativeMethods.RECT rootHwndClientArea = new NativeMethods.RECT(); 574NativeMethods.POINT gripLocation; 576gripLocation = new NativeMethods.POINT(SizeGripBounds.Left, SizeGripBounds.Bottom); 579gripLocation = new NativeMethods.POINT(SizeGripBounds.Right, SizeGripBounds.Bottom); 588m.Result = (IntPtr)NativeMethods.HTBOTTOMRIGHT; 611cp.ExStyle |= NativeMethods.WS_EX_LAYOUTRTL; 617if (m.Msg == NativeMethods.WM_NCHITTEST) { 618int x = NativeMethods.Util.LOWORD(m.LParam); 619int y = NativeMethods.Util.HIWORD(m.LParam); 622m.Result = (IntPtr)NativeMethods.HTBOTTOMLEFT; 648if (AccessibilityImprovements.Level3 && propertyID == NativeMethods.UIA_ControlTypePropertyId) { 649return NativeMethods.UIA_StatusBarControlTypeId;
winforms\Managed\System\WinForms\StringSource.cs (6)
54object obj = UnsafeNativeMethods.CoCreateInstance(ref autoCompleteClsid, null, NativeMethods.CLSCTX_INPROC_SERVER, ref iid_iunknown); 116return NativeMethods.E_INVALIDARG; 132return celt == 0 ? NativeMethods.S_OK : NativeMethods.S_FALSE; 145return (NativeMethods.S_FALSE); 147return NativeMethods.S_OK;
winforms\Managed\System\WinForms\SystemInformation.cs (160)
69UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETDRAGFULLWINDOWS, 0, ref data, 0); 85NativeMethods.HIGHCONTRAST_I data = new NativeMethods.HIGHCONTRAST_I(); 90bool b = UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETHIGHCONTRAST, data.cbSize, ref data, 0); 96highContrast = (data.dwFlags & NativeMethods.HCF_HIGHCONTRASTON) != 0; 118UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETWHEELSCROLLLINES, 0, ref data, 0); 128hWndMouseWheel = UnsafeNativeMethods.FindWindow(NativeMethods.MOUSEZ_CLASSNAME, NativeMethods.MOUSEZ_TITLE); 134int message = SafeNativeMethods.RegisterWindowMessage(NativeMethods.MSH_SCROLL_LINES); 163return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXSCREEN), 164UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYSCREEN)); 176return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXVSCROLL); 188return UnsafeNativeMethods.TryGetSystemMetricsForDpi(NativeMethods.SM_CXVSCROLL, (uint)dpi); 190return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXVSCROLL); 202return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYHSCROLL); 214return UnsafeNativeMethods.TryGetSystemMetricsForDpi(NativeMethods.SM_CYHSCROLL, (uint)dpi); 216return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYHSCROLL); 228return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYCAPTION); 241return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXBORDER), 242UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYBORDER)); 255return new Size(UnsafeNativeMethods.TryGetSystemMetricsForDpi(NativeMethods.SM_CXBORDER, (uint)dpi), 256UnsafeNativeMethods.TryGetSystemMetricsForDpi(NativeMethods.SM_CYBORDER, (uint)dpi)); 271return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXFIXEDFRAME), 272UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYFIXEDFRAME)); 282return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYVTHUMB); 292return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXHTHUMB); 335return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXICON), 336UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYICON)); 348return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXCURSOR), 349UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYCURSOR)); 382NativeMethods.NONCLIENTMETRICS data = new NativeMethods.NONCLIENTMETRICS(); 385result = UnsafeNativeMethods.TrySystemParametersInfoForDpi(NativeMethods.SPI_GETNONCLIENTMETRICS, data.cbSize, data, 0, dpi); 387result = UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETNONCLIENTMETRICS, data.cbSize, data, 0); 417return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYMENU); 448NativeMethods.RECT rc = new NativeMethods.RECT(); 449UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETWORKAREA, 0, ref rc, 0); 464return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYKANJIWINDOW); 477return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_MOUSEPRESENT) != 0; 489return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYVSCROLL); 499return UnsafeNativeMethods.TryGetSystemMetricsForDpi(NativeMethods.SM_CXHSCROLL, (uint)dpi); 509return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXHSCROLL); 521return UnsafeNativeMethods.TryGetSystemMetricsForDpi(NativeMethods.SM_CXHSCROLL, (uint)dpi); 524return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXHSCROLL); 539return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_DEBUG) != 0; 552return(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_SWAPBUTTON) != 0); 564return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXMIN), 565UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYMIN)); 578return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXSIZE), 579UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYSIZE)); 591return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXFRAME), 592UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYFRAME)); 605return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXMINTRACK), 606UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYMINTRACK)); 620return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXDOUBLECLK), 621UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYDOUBLECLK)); 648return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXICONSPACING), 649UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYICONSPACING)); 662return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_MENUDROPALIGNMENT) != 0; 675return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_PENWINDOWS) != 0; 688return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_DBCSENABLED) != 0; 700return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CMOUSEBUTTONS); 714return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_SECURE) != 0; 727return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXEDGE), 728UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYEDGE)); 740return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXMINSPACING), 741UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYMINSPACING)); 754return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXSMICON), 755UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYSMICON)); 768return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYSMCAPTION); 781return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXSMSIZE), 782UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYSMSIZE)); 795return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXMENUSIZE), 796UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYMENUSIZE)); 807int compoundValue = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_ARRANGE); 821int compoundValue = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_ARRANGE); 834return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXMINIMIZED), 835UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYMINIMIZED)); 848return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXMAXTRACK), 849UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYMAXTRACK)); 862return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXMAXIMIZED), 863UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYMAXIMIZED)); 875return(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_NETWORK) & 0x00000001) != 0; 887return(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_REMOTESESSION) & 0x00000001) != 0; 903return(BootMode) UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CLEANBOOT); 917return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXDRAG), 918UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYDRAG)); 932return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_SHOWSOUNDS) != 0; 945return new Size(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXMENUCHECK), 946UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYMENUCHECK)); 959return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_MIDEASTENABLED) != 0; 966multiMonitorSupport = (UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CMONITORS) != 0); 983nativeMouseWheelSupport = (UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_MOUSEWHEELPRESENT) != 0); 1010hWndMouseWheel = UnsafeNativeMethods.FindWindow(NativeMethods.MOUSEZ_CLASSNAME, NativeMethods.MOUSEZ_TITLE); 1017mouseWheelPresent = (UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_MOUSEWHEELPRESENT) != 0); 1034return new Rectangle(UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_XVIRTUALSCREEN), 1035UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_YVIRTUALSCREEN), 1036UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXVIRTUALSCREEN), 1037UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYVIRTUALSCREEN)); 1056return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CMONITORS); 1075return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_SAMEDISPLAYFORMAT) != 0; 1133NativeMethods.USEROBJECTFLAGS flags = new NativeMethods.USEROBJECTFLAGS(); 1135if (UnsafeNativeMethods.GetUserObjectInformation(new HandleRef(null, hwinsta), NativeMethods.UOI_FLAGS, flags, Marshal.SizeOf(flags), ref lengthNeeded)) { 1136if ((flags.dwFlags & NativeMethods.WSF_VISIBLE) == 0) { 1194UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETDROPSHADOW, 0, ref data, 0); 1212UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETFLATMENU, 0, ref data, 0); 1228UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETFONTSMOOTHING, 0, ref data, 0); 1243UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETFONTSMOOTHINGCONTRAST, 0, ref data, 0); 1262UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETFONTSMOOTHINGTYPE, 0, ref data, 0); 1280UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_ICONHORIZONTALSPACING, 0, ref data, 0); 1294UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_ICONVERTICALSPACING, 0, ref data, 0); 1308UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETICONTITLEWRAP, 0, ref data, 0); 1322UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETKEYBOARDCUES, 0, ref data, 0); 1338UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETKEYBOARDDELAY, 0, ref data, 0); 1353UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETKEYBOARDPREF, 0, ref data, 0); 1369UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETKEYBOARDSPEED, 0, ref data, 0); 1384UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETMOUSEHOVERHEIGHT, 0, ref height, 0); 1385UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETMOUSEHOVERWIDTH, 0, ref width, 0); 1399UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETMOUSEHOVERTIME, 0, ref data, 0); 1414UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETMOUSESPEED, 0, ref data, 0); 1430UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETSNAPTODEFBUTTON, 0, ref data, 0); 1445UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETMENUDROPALIGNMENT, 0, ref data, 0); 1467UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETMENUFADE, 0, ref data, 0); 1483UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETMENUSHOWDELAY, 0, ref data, 0); 1498UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETCOMBOBOXANIMATION, 0, ref data, 0); 1512UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETGRADIENTCAPTIONS, 0, ref data, 0); 1527UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETHOTTRACKING, 0, ref data, 0); 1541UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETLISTBOXSMOOTHSCROLLING, 0, ref data, 0); 1555UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETMENUANIMATION, 0, ref data, 0); 1571UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETSELECTIONFADE, 0, ref data, 0); 1589UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETTOOLTIPANIMATION, 0, ref data, 0); 1608UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETUIEFFECTS, 0, ref data, 0); 1625UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETACTIVEWINDOWTRACKING, 0, ref data, 0); 1639UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETACTIVEWNDTRKTIMEOUT, 0, ref data, 0); 1655UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETANIMATION, 0, ref data, 0); 1669UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETBORDER, 0, ref data, 0); 1698UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETCARETWIDTH, 0, ref data, 0); 1716return NativeMethods.WHEEL_DELTA; 1731return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYFOCUSBORDER); 1749return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXFOCUSBORDER); 1766return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYSIZEFRAME); 1779return UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CXSIZEFRAME); 1793NativeMethods.DEVMODE dm = new NativeMethods.DEVMODE(); 1794dm.dmSize = (short) Marshal.SizeOf(typeof(NativeMethods.DEVMODE)); 1798if ( (dm.dmFields & NativeMethods.DM_DISPLAYORIENTATION) > 0) { 1820NativeMethods.NONCLIENTMETRICS data = new NativeMethods.NONCLIENTMETRICS(); 1821bool result = UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETNONCLIENTMETRICS, data.cbSize, data, 0); 1915NativeMethods.NONCLIENTMETRICS data = new NativeMethods.NONCLIENTMETRICS(); 1916bool result = UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETNONCLIENTMETRICS, data.cbSize, data, 0); 1939NativeMethods.NONCLIENTMETRICS data = new NativeMethods.NONCLIENTMETRICS(); 1940bool result = UnsafeNativeMethods.SystemParametersInfo(NativeMethods.SPI_GETNONCLIENTMETRICS, data.cbSize, data, 0); 1970IntPtr hDsk = SafeNativeMethods.OpenInputDesktop(0, false, NativeMethods.DESKTOP_SWITCHDESKTOP); 1974retVal = error == NativeMethods.ERROR_ACCESS_DENIED;
winforms\Managed\System\WinForms\TabControl.cs (81)
344cp.ClassName = NativeMethods.WC_TABCONTROL; 348if (Multiline == true) cp.Style |= NativeMethods.TCS_MULTILINE; 349if (drawMode == TabDrawMode.OwnerDrawFixed) cp.Style |= NativeMethods.TCS_OWNERDRAWFIXED; 351cp.Style |= NativeMethods.TCS_TOOLTIPS; 356cp.Style |= NativeMethods.TCS_BOTTOM; 360cp.Style |= NativeMethods.TCS_VERTICAL | NativeMethods.TCS_MULTILINE; 363cp.Style |= NativeMethods.TCS_HOTTRACK; 367cp.Style |= NativeMethods.TCS_TABS; 369cp.Style |= NativeMethods.TCS_BUTTONS; 371cp.Style |= NativeMethods.TCS_FLATBUTTONS; 376cp.Style |= NativeMethods.TCS_RAGGEDRIGHT; 379cp.Style |= NativeMethods.TCS_RIGHTJUSTIFY; 382cp.Style |= NativeMethods.TCS_FIXEDWIDTH; 388cp.ExStyle |= NativeMethods.WS_EX_LAYOUTRTL | NativeMethods.WS_EX_NOINHERITLAYOUT; 390cp.ExStyle &= ~(NativeMethods.WS_EX_RTLREADING | NativeMethods.WS_EX_RIGHT | NativeMethods.WS_EX_LEFTSCROLLBAR); 414NativeMethods.RECT rect = NativeMethods.RECT.FromXYWH(bounds.X, bounds.Y, bounds.Width, bounds.Height); 433SendMessage(NativeMethods.TCM_ADJUSTRECT, 0, ref rect); 528SendMessage(NativeMethods.TCM_SETIMAGELIST, IntPtr.Zero, handle); 703n = unchecked( (int) (long)SendMessage(NativeMethods.TCM_GETROWCOUNT, 0, 0)); 725n = unchecked( (int) (long)SendMessage(NativeMethods.TCM_GETCURSEL, 0, 0)); 754SendMessage(NativeMethods.TCM_SETCURSEL, value, 0); 1056internal int AddTabPage(TabPage tabPage, NativeMethods.TCITEM_T tcitem) { 1065internal int AddNativeTabPage(NativeMethods.TCITEM_T tcitem) { 1066int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_INSERTITEM, tabPageCount + 1, tcitem); 1077SendMessage(NativeMethods.TCM_SETITEMSIZE, 0, (int)NativeMethods.Util.MAKELPARAM(itemSize.Width, itemSize.Height)); 1106NativeMethods.INITCOMMONCONTROLSEX icc = new NativeMethods.INITCOMMONCONTROLSEX(); 1107icc.dwICC = NativeMethods.ICC_TAB_CLASSES; 1244NativeMethods.RECT rect = new NativeMethods.RECT(); 1251SendMessage(NativeMethods.TCM_GETITEMRECT, index, ref rect); 1265SendMessage(NativeMethods.TCM_SETIMAGELIST, 0, ImageList.Handle); 1308NativeMethods.TCITEM_T tcitem = tabPage.GetTCITEM(); 1309retIndex = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_INSERTITEM, index, tcitem); 1348SendMessage(NativeMethods.TCM_SETPADDING, 0, NativeMethods.Util.MAKELPARAM(padding.X, padding.Y)); 1355SendMessage(NativeMethods.TCM_SETIMAGELIST, 0, imageList.Handle); 1360tooltipHwnd = SendMessage(NativeMethods.TCM_GETTOOLTIPS, 0, 0); 1363NativeMethods.HWND_TOPMOST, 1365NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOSIZE | 1366NativeMethods.SWP_NOACTIVATE); 1661SendMessage(NativeMethods.TCM_DELETEALLITEMS, 0, 0); 1692SendMessage(NativeMethods.TCM_DELETEALLITEMS, 0, 0); 1710SendMessage(NativeMethods.TCM_DELETEITEM, index, 0); 1738UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TCM_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 1747internal void SetTabPage(int index, TabPage tabPage, NativeMethods.TCITEM_T tcitem) { 1751UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_SETITEM, index, tcitem); 1754UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_SETCURSEL, (IntPtr)index, IntPtr.Zero); 2027NativeMethods.TOOLTIPTEXT ttt = (NativeMethods.TOOLTIPTEXT) m.GetLParam(typeof(NativeMethods.TOOLTIPTEXT)); 2042ttt.uFlags |= NativeMethods.TTF_RTLREADING; 2055NativeMethods.DRAWITEMSTRUCT dis = (NativeMethods.DRAWITEMSTRUCT)m.GetLParam(typeof(NativeMethods.DRAWITEMSTRUCT)); 2079SendMessage(NativeMethods.TCM_SETCURSEL, lastSelection, 0); 2134NativeMethods.MSG msg = new NativeMethods.MSG(); 2139NativeMethods.PM_REMOVE)) { 2155case NativeMethods.WM_REFLECT + NativeMethods.WM_DRAWITEM: 2159case NativeMethods.WM_REFLECT + NativeMethods.WM_MEASUREITEM: 2163case NativeMethods.WM_NOTIFY: 2164case NativeMethods.WM_REFLECT + NativeMethods.WM_NOTIFY: 2165NativeMethods.NMHDR nmhdr = (NativeMethods.NMHDR) m.GetLParam(typeof(NativeMethods.NMHDR)); 2173case NativeMethods.TCN_SELCHANGING: 2189case NativeMethods.TCN_SELCHANGE: 2199case NativeMethods.TTN_GETDISPINFOA: 2200case NativeMethods.TTN_GETDISPINFOW: 2205UnsafeNativeMethods.SendMessage(new HandleRef(nmhdr, nmhdr.hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width);
winforms\Managed\System\WinForms\TabPage.cs (5)
562internal NativeMethods.TCITEM_T GetTCITEM () { 563NativeMethods.TCITEM_T tcitem = new NativeMethods.TCITEM_T (); 574tcitem.mask |= NativeMethods.TCIF_TEXT; 581tcitem.mask |= NativeMethods.TCIF_IMAGE;
winforms\Managed\System\WinForms\TextBox.cs (27)
325cp.Style |= NativeMethods.ES_LOWERCASE; 328cp.Style |= NativeMethods.ES_UPPERCASE; 335cp.ExStyle &= ~NativeMethods.WS_EX_RIGHT; // WS_EX_RIGHT overrides the ES_XXXX alignment styles 338cp.Style |= NativeMethods.ES_LEFT; 341cp.Style |= NativeMethods.ES_CENTER; 344cp.Style |= NativeMethods.ES_RIGHT; 353cp.Style |= NativeMethods.WS_HSCROLL; 356cp.Style |= NativeMethods.WS_VSCROLL; 361cp.Style |= NativeMethods.ES_PASSWORD; 387return (char)SendMessage(NativeMethods.EM_GETPASSWORDCHAR, 0, 0); 395SendMessage(NativeMethods.EM_SETPASSWORDCHAR, value, 0); 608SafeNativeMethods.RedrawWindow(new HandleRef(this, this.Handle), null, NativeMethods.NullHandleRef, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_FRAME); 655SendMessage(NativeMethods.EM_SETPASSWORDCHAR, passwordChar, 0); 804mode |= NativeMethods.AUTOSUGGEST | NativeMethods.AUTOAPPEND_OFF; 807mode |= NativeMethods.AUTOAPPEND | NativeMethods.AUTOSUGGEST_OFF; 810mode |= NativeMethods.AUTOSUGGEST; 811mode |= NativeMethods.AUTOAPPEND; 834int mode = (int)AutoCompleteSource.AllSystemSources | NativeMethods.AUTOSUGGEST_OFF | NativeMethods.AUTOAPPEND_OFF; 845if ((NativeMethods.PRF_NONCLIENT & (int)m.LParam) != 0 && Application.RenderWithVisualStyles && this.BorderStyle == BorderStyle.Fixed3D) { 876case NativeMethods.WM_LBUTTONDOWN: 887case NativeMethods.WM_LBUTTONUP: 890case NativeMethods.WM_PRINT:
winforms\Managed\System\WinForms\TextBoxBase.cs (63)
290DispId(NativeMethods.ActiveX.DISPID_BACKCOLOR), 385DispId(NativeMethods.ActiveX.DISPID_BORDERSTYLE), 469b = unchecked( (int) (long)SendMessage(NativeMethods.EM_CANUNDO, 0, 0)) != 0; 492cp.Style |= NativeMethods.ES_AUTOHSCROLL | NativeMethods.ES_AUTOVSCROLL; 493if (!textBoxFlags[hideSelection]) cp.Style |= NativeMethods.ES_NOHIDESEL; 494if (textBoxFlags[readOnly]) cp.Style |= NativeMethods.ES_READONLY; 495cp.ExStyle &= (~NativeMethods.WS_EX_CLIENTEDGE); 496cp.Style &= (~NativeMethods.WS_BORDER); 500cp.ExStyle |= NativeMethods.WS_EX_CLIENTEDGE; 503cp.Style |= NativeMethods.WS_BORDER; 507cp.Style |= NativeMethods.ES_MULTILINE; 508if (textBoxFlags[wordWrap]) cp.Style &= ~NativeMethods.ES_AUTOHSCROLL; 584DispId(NativeMethods.ActiveX.DISPID_FORECOLOR), 783bool curState = (0 != unchecked( (int) (long)SendMessage(NativeMethods.EM_GETMODIFY, 0, 0))); 800SendMessage(NativeMethods.EM_SETMODIFY, value ? 1 : 0, 0); 1013UnsafeNativeMethods.SendMessage( new HandleRef( this, Handle ), NativeMethods.EM_GETSEL, ref start, ref end ); 1072SendMessage(NativeMethods.EM_SETREADONLY, value? -1: 0, 0); 1134SendMessage(NativeMethods.EM_LIMITTEXT, 0, 0); 1137SendMessage(NativeMethods.EM_REPLACESEL, 0, text); 1139SendMessage(NativeMethods.EM_SETMODIFY, 0, 0); 1143SendMessage(NativeMethods.EM_REPLACESEL, /*undoable*/ -1, text); 1147SendMessage(NativeMethods.EM_LIMITTEXT, maxLength, 0); 1244SendMessage(NativeMethods.EM_SETMODIFY, 0, 0); 1458SendMessage(NativeMethods.EM_EMPTYUNDOBUFFER, 0, 0); 1470SendMessage(NativeMethods.WM_COPY, 0, 0); 1502SendMessage(NativeMethods.WM_CUT, 0, 0); 1560SendMessage(NativeMethods.EM_SETMODIFY, 1, 0); 1591SendMessage(NativeMethods.WM_PASTE, 0, 0); 1755int longPoint = NativeMethods.Util.MAKELONG(pt.X, pt.Y); 1756int index = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.EM_CHARFROMPOS, 0, longPoint); 1757index = NativeMethods.Util.LOWORD(index); 1784return unchecked( (int) (long)SendMessage(NativeMethods.EM_LINEFROMCHAR, index, 0)); 1795int i = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.EM_POSFROMCHAR, index, 0); 1796return new Point(NativeMethods.Util.SignedLOWORD(i), NativeMethods.Util.SignedHIWORD(i)); 1807return unchecked( (int) (long)SendMessage(NativeMethods.EM_LINEINDEX, lineNumber, 0)); 1815return unchecked( (int) (long)SendMessage(NativeMethods.EM_LINEINDEX, -1, 0)); 1868int firstVisibleLine = unchecked( (int) (long)SendMessage(NativeMethods.EM_GETFIRSTVISIBLELINE, 0, 0)); 1895SendMessage(NativeMethods.EM_SCROLLCARET, 0, 0); 1956SendMessage(NativeMethods.EM_SETSEL, s, e); 2063SendMessage(NativeMethods.EM_SETSEL, start, end); 2174SendMessage(NativeMethods.EM_UNDO, 0, 0); 2179SendMessage(NativeMethods.EM_LIMITTEXT, maxLength, 0); 2186if ((msg == NativeMethods.WM_CTLCOLORSTATIC) && !ShouldSerializeBackColor()) { 2203if (NativeMethods.Util.HIWORD(m.WParam) == NativeMethods.EN_CHANGE && CanRaiseTextChangedEvent) { 2206else if (NativeMethods.Util.HIWORD(m.WParam) == NativeMethods.EN_UPDATE) { 2221SendMessage(NativeMethods.EM_SETMARGINS, NativeMethods.EC_LEFTMARGIN | NativeMethods.EC_RIGHTMARGIN, 0); 2229m.Result = (IntPtr)(unchecked( (int) (long)m.Result) | NativeMethods.DLGC_WANTTAB); 2233m.Result = (IntPtr)(unchecked( (int) (long)m.Result) & ~(NativeMethods.DLGC_WANTTAB | NativeMethods.DLGC_WANTALLKEYS)); 2248int x = NativeMethods.Util.SignedLOWORD(m.LParam); 2249int y = NativeMethods.Util.SignedHIWORD(m.LParam); 2291case NativeMethods.WM_LBUTTONDBLCLK: 2295case NativeMethods.WM_REFLECT + NativeMethods.WM_COMMAND: 2298case NativeMethods.WM_GETDLGCODE: 2301case NativeMethods.WM_SETFONT: 2304case NativeMethods.WM_CONTEXTMENU:
winforms\Managed\System\WinForms\ThreadExceptionDialog.cs (1)
206fileVer = FileVersionInfo.GetVersionInfo(NativeMethods.GetLocalPath(name.EscapedCodeBase)).FileVersion;
winforms\Managed\System\WinForms\Timer.cs (4)
333cp.Parent = (IntPtr)NativeMethods.HWND_MESSAGE; 392UnsafeNativeMethods.PostMessage(new HandleRef(this, hWnd), NativeMethods.WM_CLOSE, 0, 0); 454if (m.Msg == NativeMethods.WM_TIMER) { 461else if (m.Msg == NativeMethods.WM_CLOSE) {
winforms\Managed\System\WinForms\ToolBar.cs (115)
320DispId(NativeMethods.ActiveX.DISPID_BORDERSTYLE), 380int result = unchecked( (int) (long)SendMessage(NativeMethods.TB_GETBUTTONSIZE, 0, 0)); 382return new Size(NativeMethods.Util.LOWORD(result), NativeMethods.Util.HIWORD(result)); 423cp.ClassName = NativeMethods.WC_TOOLBAR; 427cp.Style |= NativeMethods.CCS_NOPARENTALIGN 428| NativeMethods.CCS_NORESIZE; 431if (!Divider) cp.Style |= NativeMethods.CCS_NODIVIDER ; 432if (Wrappable) cp.Style |= NativeMethods.TBSTYLE_WRAPPABLE; 433if (ShowToolTips && !DesignMode) cp.Style |= NativeMethods.TBSTYLE_TOOLTIPS; 435cp.ExStyle &= (~NativeMethods.WS_EX_CLIENTEDGE); 436cp.Style &= (~NativeMethods.WS_BORDER); 439cp.ExStyle |= NativeMethods.WS_EX_CLIENTEDGE; 442cp.Style |= NativeMethods.WS_BORDER; 450cp.Style |= NativeMethods.TBSTYLE_FLAT; 458cp.Style |= NativeMethods.TBSTYLE_LIST; 707NativeMethods.RECT rect = new NativeMethods.RECT(); 719SendMessage(NativeMethods.TB_GETRECT, firstVisible, ref rect); 730height = height * unchecked( (int) (long)SendMessage(NativeMethods.TB_GETROWS, 0, 0)); 775NativeMethods.RECT rect = new NativeMethods.RECT(); 778SendMessage(NativeMethods.TB_GETRECT, 0, ref rect); 1053NativeMethods.INITCOMMONCONTROLSEX icc = new NativeMethods.INITCOMMONCONTROLSEX(); 1054icc.dwICC = NativeMethods.ICC_BAR_CLASSES; 1140NativeMethods.TBBUTTONINFO tbbi = new NativeMethods.TBBUTTONINFO(); 1141tbbi.cbSize = Marshal.SizeOf(typeof(NativeMethods.TBBUTTONINFO)); 1148tbbi.dwMask = NativeMethods.TBIF_SIZE; 1149UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TB_SETBUTTONINFO, x, ref tbbi); 1199NativeMethods.TBBUTTON tbbutton = value.GetTBBUTTON(index); 1200UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TB_INSERTBUTTON, index, ref tbbutton); 1236NativeMethods.TBBUTTONINFO tbbi = value.GetTBBUTTONINFO(updateText, index); 1237UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TB_SETBUTTONINFO, index, ref tbbi); 1250SendMessage(NativeMethods.TB_AUTOSIZE, 0, 0); 1290SendMessage(NativeMethods.TB_BUTTONSTRUCTSIZE, Marshal.SizeOf(typeof(NativeMethods.TBBUTTON)), 0); 1295SendMessage(NativeMethods.TB_SETEXTENDEDSTYLE, 0, NativeMethods.TBSTYLE_EX_DRAWDDARROWS); 1300SendMessage(NativeMethods.TB_SETIMAGELIST, 0, imageList.Handle); 1366buttons[x].stringIndex = SendMessage(NativeMethods.TB_ADDSTRING, 0, addString); 1375int cb = Marshal.SizeOf(typeof(NativeMethods.TBBUTTON)); 1381NativeMethods.TBBUTTON tbbutton = buttons[x].GetTBBUTTON(x); 1386SendMessage(NativeMethods.TB_ADDBUTTONS, count, ptbbuttons); 1391SendMessage(NativeMethods.TB_AUTOSIZE, 0, 0); 1440SendMessage(NativeMethods.TB_SETBUTTONSIZE, 0, NativeMethods.Util.MAKELPARAM((int)(buttonSize.Width*currentScaleDX), (int)(buttonSize.Height*currentScaleDY))); 1494UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TB_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 1532NativeMethods.NMTOOLBAR nmTB = (NativeMethods.NMTOOLBAR)m.GetLParam(typeof(NativeMethods.NMTOOLBAR)); 1542NativeMethods.RECT rc = new NativeMethods.RECT(); 1543NativeMethods.TPMPARAMS tpm = new NativeMethods.TPMPARAMS(); 1545SendMessage(NativeMethods.TB_GETRECT, nmTB.iItem, ref rc); 1556UnsafeNativeMethods.MapWindowPoints(new HandleRef(nmTB.hdr, nmTB.hdr.hwndFrom), NativeMethods.NullHandleRef, ref rc, 2); 1565NativeMethods.TPM_LEFTALIGN | 1566NativeMethods.TPM_LEFTBUTTON | 1567NativeMethods.TPM_VERTICAL, 1575NativeMethods.TOOLTIPTEXT ttt = (NativeMethods.TOOLTIPTEXT) m.GetLParam(typeof(NativeMethods.TOOLTIPTEXT)); 1589ttt.uFlags |= NativeMethods.TTF_RTLREADING; 1597NativeMethods.TOOLTIPTEXTA ttt = (NativeMethods.TOOLTIPTEXTA) m.GetLParam(typeof(NativeMethods.TOOLTIPTEXTA)); 1611ttt.uFlags |= NativeMethods.TTF_RTLREADING; 1622NativeMethods.NMTBHOTITEM nmTbHotItem = (NativeMethods.NMTBHOTITEM)m.GetLParam(typeof(NativeMethods.NMTBHOTITEM)); 1623if (NativeMethods.HICF_ENTERING == (nmTbHotItem.dwFlags & NativeMethods.HICF_ENTERING)) 1625else if (NativeMethods.HICF_LEAVING == (nmTbHotItem.dwFlags & NativeMethods.HICF_LEAVING)) 1627else if (NativeMethods.HICF_MOUSE == (nmTbHotItem.dwFlags & NativeMethods.HICF_MOUSE)) 1629else if (NativeMethods.HICF_ARROWKEYS == (nmTbHotItem.dwFlags & NativeMethods.HICF_ARROWKEYS)) 1631else if (NativeMethods.HICF_ACCELERATOR == (nmTbHotItem.dwFlags & NativeMethods.HICF_ACCELERATOR)) 1633else if (NativeMethods.HICF_DUPACCEL == (nmTbHotItem.dwFlags & NativeMethods.HICF_DUPACCEL)) 1635else if (NativeMethods.HICF_RESELECT == (nmTbHotItem.dwFlags & NativeMethods.HICF_RESELECT)) 1637else if (NativeMethods.HICF_LMOUSE == (nmTbHotItem.dwFlags & NativeMethods.HICF_LMOUSE)) 1639else if (NativeMethods.HICF_TOGGLEDROPDOWN == (nmTbHotItem.dwFlags & NativeMethods.HICF_TOGGLEDROPDOWN)) 1650int id = NativeMethods.Util.LOWORD(m.WParam); 1670case NativeMethods.WM_COMMAND + NativeMethods.WM_REFLECT: 1674case NativeMethods.WM_NOTIFY: 1675case NativeMethods.WM_NOTIFY + NativeMethods.WM_REFLECT: 1676NativeMethods.NMHDR note = (NativeMethods.NMHDR) m.GetLParam(typeof(NativeMethods.NMHDR)); 1678case NativeMethods.TTN_NEEDTEXTA: 1689case NativeMethods.TTN_NEEDTEXTW: 1703case NativeMethods.TTN_SHOW: 1706NativeMethods.WINDOWPLACEMENT wndPlacement = new NativeMethods.WINDOWPLACEMENT(); 1732NativeMethods.POINT leftTop = new NativeMethods.POINT(x, y); 1753SafeNativeMethods.SetWindowPos(new HandleRef(null, note.hwndFrom), NativeMethods.NullHandleRef, leftTop.x, leftTop.y, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOZORDER | NativeMethods.SWP_NOACTIVATE); 1759case NativeMethods.TBN_HOTITEMCHANGE: 1764case NativeMethods.TBN_QUERYINSERT: 1768case NativeMethods.TBN_DROPDOWN: 1979owner.SendMessage(NativeMethods.TB_DELETEBUTTON, x - 1, 0); 2123owner.SendMessage(NativeMethods.TB_DELETEBUTTON, index, 0);
winforms\Managed\System\WinForms\ToolBarButton.cs (38)
173parent.SendMessage(NativeMethods.TB_ENABLEBUTTON, FindButtonIndex(), 286if ((int)parent.SendMessage(NativeMethods.TB_ISBUTTONINDETERMINATE, FindButtonIndex(), 0) != 0) 334NativeMethods.RECT rc = new NativeMethods.RECT(); 335UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.Handle), NativeMethods.TB_GETRECT, FindButtonIndex(), ref rc); 555NativeMethods.TBBUTTONINFO button = new NativeMethods.TBBUTTONINFO(); 556button.cbSize = Marshal.SizeOf(typeof(NativeMethods.TBBUTTONINFO)); 557button.dwMask = NativeMethods.TBIF_SIZE; 559int buttonID = (int)UnsafeNativeMethods.SendMessage(new HandleRef(Parent, Parent.Handle), NativeMethods.TB_GETBUTTONINFO, commandId, ref button); 569if ((int)parent.SendMessage(NativeMethods.TB_ISBUTTONCHECKED, FindButtonIndex(), 0) != 0) { 583internal NativeMethods.TBBUTTON GetTBBUTTON(int commandId) { 585NativeMethods.TBBUTTON button = new NativeMethods.TBBUTTON(); 592if (enabled) button.fsState |= NativeMethods.TBSTATE_ENABLED; 593if (partialPush && style == ToolBarButtonStyle.ToggleButton) button.fsState |= NativeMethods.TBSTATE_INDETERMINATE; 594if (pushed) button.fsState |= NativeMethods.TBSTATE_CHECKED; 595if (!visible) button.fsState |= NativeMethods.TBSTATE_HIDDEN; 601button.fsStyle = NativeMethods.TBSTYLE_BUTTON; 604button.fsStyle = NativeMethods.TBSTYLE_CHECK; 607button.fsStyle = NativeMethods.TBSTYLE_SEP; 610button.fsStyle = NativeMethods.TBSTYLE_DROPDOWN; 627internal NativeMethods.TBBUTTONINFO GetTBBUTTONINFO(bool updateText, int newCommandId) { 629NativeMethods.TBBUTTONINFO button = new NativeMethods.TBBUTTONINFO(); 630button.cbSize = Marshal.SizeOf(typeof(NativeMethods.TBBUTTONINFO)); 631button.dwMask = NativeMethods.TBIF_IMAGE 632| NativeMethods.TBIF_STATE | NativeMethods.TBIF_STYLE; 638button.dwMask |= NativeMethods.TBIF_TEXT; 646button.dwMask |= NativeMethods.TBIF_COMMAND; 652if (enabled) button.fsState |= NativeMethods.TBSTATE_ENABLED; 653if (partialPush && style == ToolBarButtonStyle.ToggleButton) button.fsState |= NativeMethods.TBSTATE_INDETERMINATE; 654if (pushed) button.fsState |= NativeMethods.TBSTATE_CHECKED; 655if (!visible) button.fsState |= NativeMethods.TBSTATE_HIDDEN; 661button.fsStyle = NativeMethods.TBSTYLE_BUTTON; 664button.fsStyle = NativeMethods.TBSTYLE_CHECK; 667button.fsStyle = NativeMethods.TBSTYLE_SEP;
winforms\Managed\System\WinForms\ToolStrip.cs (29)
795cp.ExStyle = NativeMethods.WS_EX_TOOLWINDOW; 1835DispId(NativeMethods.ActiveX.DISPID_TABSTOP), 2843UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.WM_PRINT, (IntPtr)imageHdc, 2844(IntPtr)(NativeMethods.PRF_CHILDREN | NativeMethods.PRF_CLIENT | NativeMethods.PRF_ERASEBKGND | NativeMethods.PRF_NONCLIENT)); 2849new HandleRef(g, imageHdc), 0, 0, NativeMethods.SRCCOPY); 3728SafeNativeMethods.BitBlt(itemHDC, 0, 0, item.Size.Width, item.Size.Height, toolStripHDC, item.Bounds.X, item.Bounds.Y, NativeMethods.SRCCOPY); 3736SafeNativeMethods.BitBlt(toolStripHDC, item.Bounds.X, item.Bounds.Y, item.Size.Width, item.Size.Height, itemHDC, 0, 0, NativeMethods.SRCCOPY); 4127UnsafeNativeMethods.SetFocus(NativeMethods.NullHandleRef); 4711if (m.Msg == NativeMethods.WM_SETFOCUS) { 4714if (m.Msg == NativeMethods.WM_MOUSEACTIVATE) { 4725m.Result = (IntPtr)NativeMethods.MA_NOACTIVATE; 4739m.Result = (IntPtr)NativeMethods.MA_ACTIVATEANDEAT; 4761if (m.Msg == NativeMethods.WM_NCDESTROY) { 5109if (propertyID == NativeMethods.UIA_ControlTypePropertyId) { 5110return NativeMethods.UIA_ToolBarControlTypeId; 5156case NativeMethods.WM_LBUTTONDOWN: 5157case NativeMethods.WM_RBUTTONDOWN: 5158case NativeMethods.WM_MBUTTONDOWN: 5159case NativeMethods.WM_NCLBUTTONDOWN: 5160case NativeMethods.WM_NCRBUTTONDOWN: 5161case NativeMethods.WM_NCMBUTTONDOWN: 5218private HandleRef cachedItemHDC = NativeMethods.NullHandleRef; 5220private HandleRef cachedItemBitmap = NativeMethods.NullHandleRef; 5261cachedItemBitmap = NativeMethods.NullHandleRef; 5267cachedItemHDC = NativeMethods.NullHandleRef; 5268cachedItemBitmap = NativeMethods.NullHandleRef;
winforms\Managed\System\WinForms\ToolStripButton.cs (2)
290case NativeMethods.UIA_ControlTypePropertyId: 291return NativeMethods.UIA_ButtonControlTypeId;
winforms\Managed\System\WinForms\ToolStripComboBox.cs (5)
806case NativeMethods.UIA_ControlTypePropertyId: 807return NativeMethods.UIA_ComboBoxControlTypeId; 808case NativeMethods.UIA_IsOffscreenPropertyId: 817if (patternId == NativeMethods.UIA_ExpandCollapsePatternId || 818patternId == NativeMethods.UIA_ValuePatternId) {
winforms\Managed\System\WinForms\ToolStripDropDown.cs (38)
322cp.ClassStyle |= NativeMethods.CS_DROPSHADOW; 331cp.Style &= ~(NativeMethods.WS_CAPTION | NativeMethods.WS_CLIPSIBLINGS); /* no caption, no siblings */ 332cp.ExStyle &= ~(NativeMethods.WS_EX_APPWINDOW); /* show in taskbar = false */ 334cp.Style |= (TopLevel) ? NativeMethods.WS_POPUP : NativeMethods.WS_CHILD; 335cp.ExStyle |= (NativeMethods.WS_EX_CONTROLPARENT); /* show in taskbar = false */ 341cp.ExStyle |= NativeMethods.WS_EX_LAYERED; 349cp.ClassStyle |= NativeMethods.CS_SAVEBITS; 352cp.Style |= NativeMethods.WS_CLIPSIBLINGS; 946return NativeMethods.SW_SHOWNOACTIVATE; 1102HandleRef topMostFlag = (topMost) ? NativeMethods.HWND_TOPMOST : NativeMethods.HWND_NOTOPMOST; 1104NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOACTIVATE); 1672UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, ToolStripManager.ModalMenuFilter.ActiveHwnd); 1680UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_HWNDPARENT, ownerHandle); 1773styleFlags &= ~NativeMethods.WS_CHILD; 1774styleFlags |= NativeMethods.WS_POPUP; 1778styleFlags &= ~NativeMethods.WS_POPUP; 1779styleFlags |= NativeMethods.WS_CHILD; 1842SafeNativeMethods.SetWindowPos(new HandleRef(this, Handle), NativeMethods.HWND_TOP, 0, 0, 0, 0, 1843NativeMethods.SWP_NOMOVE | NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOACTIVATE); 2022result = UnsafeNativeMethods.SetLayeredWindowAttributes(new HandleRef(this, Handle), 0, OpacityAsByte, NativeMethods.LWA_ALPHA); 2117if (m.Msg >= NativeMethods.WM_KEYFIRST && m.Msg <= NativeMethods.WM_KEYLAST && IsRestrictedWindow) { 2128case NativeMethods.WM_NCACTIVATE: 2135case NativeMethods.WM_ACTIVATE: 2139Debug.WriteLineIf(ToolStrip.SnapFocusDebug.TraceVerbose, "[ToolStripDropDown.WndProc] got a WM_ACTIVATE " + (((int)m.WParam == NativeMethods.WA_ACTIVE) ? "WA_ACTIVE" : "WA_INACTIVE") + " - checkin if we need to set the active toolstrip"); 2141if((int)m.WParam == NativeMethods.WA_ACTIVE) { 2233UnsafeNativeMethods.SendMessage(activeHwndHandleRef, NativeMethods.WM_NCACTIVATE, (IntPtr)1, NativeMethods.InvalidIntPtr); 2234SafeNativeMethods.RedrawWindow(activeHwndHandleRef, null, NativeMethods.NullHandleRef, NativeMethods.RDW_FRAME | NativeMethods.RDW_INVALIDATE);
winforms\Managed\System\WinForms\ToolStripDropDownButton.cs (2)
222if (propertyID == NativeMethods.UIA_ControlTypePropertyId) { 223return NativeMethods.UIA_ButtonControlTypeId;
winforms\Managed\System\WinForms\ToolStripDropDownItem.cs (2)
821if (patternId == NativeMethods.UIA_ExpandCollapsePatternId && owner.HasDropDownItems) { 830if (AccessibilityImprovements.Level3 && propertyID == NativeMethods.UIA_IsOffscreenPropertyId && owner != null && owner.Owner is ToolStripDropDown) {
winforms\Managed\System\WinForms\ToolStripDropDownMenu.cs (14)
289NativeMethods.MENUITEMINFO_T_RW info = new NativeMethods.MENUITEMINFO_T_RW(); 290info.cbSize = Marshal.SizeOf(typeof(NativeMethods.MENUITEMINFO_T_RW)); 291info.fMask = NativeMethods.MIIM_FTYPE; 292info.fType = NativeMethods.MIIM_FTYPE; 295if (info.fType == NativeMethods.MFT_SEPARATOR){ 301 info = new NativeMethods.MENUITEMINFO_T_RW(); 302 info.cbSize = Marshal.SizeOf(typeof(NativeMethods.MENUITEMINFO_T_RW)); 303 info.fMask = NativeMethods.MIIM_ID; 304 info.fType = NativeMethods.MIIM_ID; 312 info = new NativeMethods.MENUITEMINFO_T_RW(); 313 info.cbSize = Marshal.SizeOf(typeof(NativeMethods.MENUITEMINFO_T_RW)); 314 info.fMask = NativeMethods.MIIM_SUBMENU; 315 info.fType = NativeMethods.MIIM_SUBMENU;
winforms\Managed\System\WinForms\ToolStripDropTargetManager.cs (2)
263if (n != 0 && n != NativeMethods.DRAGDROP_E_ALREADYREGISTERED) 278if (n != 0 && n != NativeMethods.DRAGDROP_E_NOTREGISTERED)
winforms\Managed\System\WinForms\ToolStripGrip.cs (3)
295case NativeMethods.UIA_IsOffscreenPropertyId: 297case NativeMethods.UIA_ControlTypePropertyId: 298return NativeMethods.UIA_ThumbControlTypeId;
winforms\Managed\System\WinForms\ToolStripItem.cs (12)
4146runtimeId[0] = AccessibilityImprovements.Level3 ? NativeMethods.UiaAppendRuntimeId : 0x2a; 4165if (propertyID == NativeMethods.UIA_NamePropertyId) { 4168else if (propertyID == NativeMethods.UIA_IsExpandCollapsePatternAvailablePropertyId) { 4169return (Object)this.IsPatternSupported(NativeMethods.UIA_ExpandCollapsePatternId); 4175case NativeMethods.UIA_IsEnabledPropertyId: 4177case NativeMethods.UIA_IsOffscreenPropertyId: 4179case NativeMethods.UIA_IsKeyboardFocusablePropertyId: 4181case NativeMethods.UIA_HasKeyboardFocusPropertyId: 4183case NativeMethods.UIA_AccessKeyPropertyId: 4185case NativeMethods.UIA_IsPasswordPropertyId: 4187case NativeMethods.UIA_HelpTextPropertyId: 4560RaiseAutomationEvent(NativeMethods.UIA_AutomationFocusChangedEventId);
winforms\Managed\System\WinForms\ToolStripLabel.cs (3)
387if (propertyID == NativeMethods.UIA_ControlTypePropertyId) { 388return NativeMethods.UIA_TextControlTypeId; 390else if (propertyID == NativeMethods.UIA_LegacyIAccessibleStatePropertyId) {
winforms\Managed\System\WinForms\ToolStripManager.cs (42)
733private HandleRef _activeHwnd = NativeMethods.NullHandleRef; // the window that was active when we showed the dropdown 734private HandleRef _lastActiveWindow = NativeMethods.NullHandleRef; // the window that was last known to be active 920ActiveHwndInternal = NativeMethods.NullHandleRef; 927SafeNativeMethods.ShowCaret(NativeMethods.NullHandleRef); 1047NativeMethods.POINT pt = new NativeMethods.POINT(); 1174SafeNativeMethods.HideCaret(NativeMethods.NullHandleRef); 1215if (m.Msg >= NativeMethods.WM_MOUSEFIRST && m.Msg <= NativeMethods.WM_MOUSELAST) { 1218else if (m.Msg >= NativeMethods.WM_NCLBUTTONDOWN && m.Msg <= NativeMethods.WM_NCMBUTTONDBLCLK) { 1221else if (m.Msg >= NativeMethods.WM_KEYFIRST && m.Msg <= NativeMethods.WM_KEYLAST) { 1278case NativeMethods.WM_MOUSEMOVE: 1279case NativeMethods.WM_NCMOUSEMOVE: 1315case NativeMethods.WM_LBUTTONDOWN: 1316case NativeMethods.WM_RBUTTONDOWN: 1317case NativeMethods.WM_MBUTTONDOWN: 1323/*x=*/NativeMethods.Util.SignedLOWORD(m.LParam), 1324/*y=*/NativeMethods.Util.SignedHIWORD(m.LParam)); 1327case NativeMethods.WM_NCLBUTTONDOWN: 1328case NativeMethods.WM_NCRBUTTONDOWN: 1329case NativeMethods.WM_NCMBUTTONDOWN: 1335/*x=*/NativeMethods.Util.SignedLOWORD(m.LParam), 1336/*y=*/NativeMethods.Util.SignedHIWORD(m.LParam)); 1339case NativeMethods.WM_KEYDOWN: 1340case NativeMethods.WM_KEYUP: 1341case NativeMethods.WM_CHAR: 1342case NativeMethods.WM_DEADCHAR: 1343case NativeMethods.WM_SYSKEYDOWN: 1344case NativeMethods.WM_SYSKEYUP: 1345case NativeMethods.WM_SYSCHAR: 1346case NativeMethods.WM_SYSDEADCHAR: 1369private NativeMethods.HookProc hookProc; 1410hookProc = new NativeMethods.HookProc(this.MessageHookProc); 1412messageHookHandle = UnsafeNativeMethods.SetWindowsHookEx(NativeMethods.WH_GETMESSAGE, 1425if (nCode == NativeMethods.HC_ACTION) { 1426if (isHooked && (int)wparam == NativeMethods.PM_REMOVE /*only process GetMessage, not PeekMessage*/) { 1428NativeMethods.MSG* msg = (NativeMethods.MSG*)lparam; 1434msg->message = NativeMethods.WM_NULL; 1541if (m.Msg == NativeMethods.WM_SYSKEYDOWN) {
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (31)
707NativeMethods.MENUITEMINFO_T_RW info = new NativeMethods.MENUITEMINFO_T_RW(); 708info.cbSize = Marshal.SizeOf(typeof(NativeMethods.MENUITEMINFO_T_RW)); 709info.fMask = NativeMethods.MIIM_STATE; 710info.fType = NativeMethods.MIIM_STATE; 714return ((info.fState & NativeMethods.MFS_DISABLED) == 0); 727NativeMethods.MENUITEMINFO_T_RW info = new NativeMethods.MENUITEMINFO_T_RW(); 728info.fMask = NativeMethods.MIIM_STRING; 729info.fType = NativeMethods.MIIM_STRING; 772NativeMethods.MENUITEMINFO_T_RW info = new NativeMethods.MENUITEMINFO_T_RW(); 773info.fMask = NativeMethods.MIIM_BITMAP; 774info.fType = NativeMethods.MIIM_BITMAP; 778if (info.hbmpItem != IntPtr.Zero && info.hbmpItem.ToInt32() > NativeMethods.HBMMENU_POPUP_MINIMIZE) { 786case NativeMethods.HBMMENU_MBAR_CLOSE: 787case NativeMethods.HBMMENU_MBAR_CLOSE_D: 788case NativeMethods.HBMMENU_POPUP_CLOSE: 792case NativeMethods.HBMMENU_MBAR_MINIMIZE: 793case NativeMethods.HBMMENU_MBAR_MINIMIZE_D: 794case NativeMethods.HBMMENU_POPUP_MINIMIZE: 798case NativeMethods.HBMMENU_MBAR_RESTORE: 799case NativeMethods.HBMMENU_POPUP_RESTORE: 803case NativeMethods.HBMMENU_POPUP_MAXIMIZE: 807case NativeMethods.HBMMENU_SYSTEM: 809case NativeMethods.HBMMENU_CALLBACK: 877UnsafeNativeMethods.PostMessage( new HandleRef(this, targetWindowHandle), NativeMethods.WM_SYSCOMMAND,nativeMenuCommandID, 0); 883UnsafeNativeMethods.PostMessage( new HandleRef(this, targetWindowHandle), NativeMethods.WM_COMMAND, nativeMenuCommandID, 0); 1266if (propertyID == NativeMethods.UIA_ControlTypePropertyId) { 1267return NativeMethods.UIA_MenuItemControlTypeId; 1269else if (AccessibilityImprovements.Level2 && propertyID == NativeMethods.UIA_AcceleratorKeyPropertyId) {
winforms\Managed\System\WinForms\ToolStripOverflowButton.cs (2)
167if (AccessibilityImprovements.Level3 && propertyID == NativeMethods.UIA_ControlTypePropertyId) { 168return NativeMethods.UIA_MenuItemControlTypeId;
winforms\Managed\System\WinForms\ToolStripPanel.cs (7)
857NativeMethods.MSG msg = new NativeMethods.MSG(); 859NativeMethods.WM_PAINT, NativeMethods.WM_PAINT, 860NativeMethods.PM_REMOVE)) { 898if (m.Msg == NativeMethods.WM_NCHITTEST){ 899m.Result = (IntPtr)NativeMethods.HTTRANSPARENT;
winforms\Managed\System\WinForms\ToolStripScrollButton.cs (2)
186if (m.Msg >= NativeMethods.WM_KEYFIRST && m.Msg <= NativeMethods.WM_KEYLAST) {
winforms\Managed\System\WinForms\ToolStripSeparator.cs (2)
500if (AccessibilityImprovements.Level3 && propertyID == NativeMethods.UIA_ControlTypePropertyId) { 501return NativeMethods.UIA_SeparatorControlTypeId;
winforms\Managed\System\WinForms\ToolStripSplitButton.cs (3)
813if (propertyID == NativeMethods.UIA_ControlTypePropertyId) { 814return NativeMethods.UIA_ButtonControlTypeId; 831if (patternId == NativeMethods.UIA_ExpandCollapsePatternId && ownerItem.HasDropDownItems) {
winforms\Managed\System\WinForms\ToolStripStatusLabel.cs (4)
262return RaiseAutomationEvent(NativeMethods.UIA_LiveRegionChangedEventId); 267case NativeMethods.UIA_LiveSettingPropertyId: 269case NativeMethods.UIA_ControlTypePropertyId: 270return NativeMethods.UIA_TextControlTypeId;
winforms\Managed\System\WinForms\ToolStripTextBox.cs (22)
323DispId(NativeMethods.ActiveX.DISPID_BORDERSTYLE), 636private NativeMethods.RECT AbsoluteClientRECT { 638NativeMethods.RECT rect = new NativeMethods.RECT(); 660NativeMethods.RECT rect = AbsoluteClientRECT; 720NativeMethods.RECT absoluteClientRectangle = AbsoluteClientRECT; 721HandleRef hNonClientRegion = NativeMethods.NullHandleRef; 722HandleRef hClientRegion = NativeMethods.NullHandleRef; 723HandleRef hTotalRegion = NativeMethods.NullHandleRef; 731SafeNativeMethods.CombineRgn(hNonClientRegion, hTotalRegion, hClientRegion, NativeMethods.RGN_XOR); 734NativeMethods.RECT ignored = new NativeMethods.RECT(); 737NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_ERASE | 738NativeMethods.RDW_UPDATENOW | NativeMethods.RDW_ERASENOW | 739NativeMethods.RDW_FRAME); 894if (m.Msg == NativeMethods.WM_NCPAINT) { 936case NativeMethods.UIA_ControlTypePropertyId: 937return NativeMethods.UIA_EditControlTypeId; 938case NativeMethods.UIA_HasKeyboardFocusPropertyId: 946if (patternId == NativeMethods.UIA_ValuePatternId) {
winforms\Managed\System\WinForms\ToolTip.cs (192)
119delayTimes[NativeMethods.TTDT_AUTOMATIC] = DEFAULT_DELAY; 144UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ACTIVATE, (value==true)? 1: 0, 0); 168return delayTimes[NativeMethods.TTDT_AUTOMATIC]; 175SetDelayTime(NativeMethods.TTDT_AUTOMATIC, value); 196return delayTimes[NativeMethods.TTDT_AUTOPOP]; 203SetDelayTime(NativeMethods.TTDT_AUTOPOP, value); 225UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPBKCOLOR, ColorTranslator.ToWin32(backColor), 0); 245cp.ClassName = NativeMethods.TOOLTIPS_CLASS; 247cp.Style = NativeMethods.TTS_ALWAYSTIP; 250cp.Style |= NativeMethods.TTS_BALLOON; 253cp.Style |= NativeMethods.TTS_NOPREFIX; 256cp.Style |= NativeMethods.TTS_NOANIMATE; 259cp.Style |= NativeMethods.TTS_NOFADE; 290UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPTEXTCOLOR, ColorTranslator.ToWin32(foreColor), 0); 354(windowControl.ShowParams & 0xF) != NativeMethods.SW_SHOWNOACTIVATE) 357IntPtr rootHwnd =UnsafeNativeMethods.GetAncestor(new HandleRef(window, window.Handle), NativeMethods.GA_ROOT); 386return delayTimes[NativeMethods.TTDT_INITIAL]; 393SetDelayTime(NativeMethods.TTDT_INITIAL, value); 434return delayTimes[NativeMethods.TTDT_RESHOW]; 440SetDelayTime(NativeMethods.TTDT_RESHOW, value); 538UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTITLE, (int)toolTipIcon, title); 542UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_UPDATE, 0, 0); 577UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTITLE, (int)toolTipIcon, toolTipTitle); 581UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_UPDATE, 0, 0); 730delayTimes[NativeMethods.TTDT_RESHOW] = delayTimes[NativeMethods.TTDT_AUTOMATIC] / RESHOW_RATIO; 731delayTimes[NativeMethods.TTDT_AUTOPOP] = delayTimes[NativeMethods.TTDT_AUTOMATIC] * AUTOPOP_RATIO; 732delayTimes[NativeMethods.TTDT_INITIAL] = delayTimes[NativeMethods.TTDT_AUTOMATIC]; 882NativeMethods.INITCOMMONCONTROLSEX icc = new NativeMethods.INITCOMMONCONTROLSEX(); 883icc.dwICC = NativeMethods.ICC_TAB_CLASSES; 898int style = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 899style &= ~NativeMethods.WS_BORDER; 900UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 906UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 908Debug.Assert(NativeMethods.TTDT_AUTOMATIC == 0, "TTDT_AUTOMATIC != 0"); 911SetDelayTime(NativeMethods.TTDT_AUTOMATIC, delayTimes[NativeMethods.TTDT_AUTOMATIC]); 912delayTimes[NativeMethods.TTDT_AUTOPOP] = GetDelayTime(NativeMethods.TTDT_AUTOPOP); 913delayTimes[NativeMethods.TTDT_INITIAL] = GetDelayTime(NativeMethods.TTDT_INITIAL); 914delayTimes[NativeMethods.TTDT_RESHOW] = GetDelayTime(NativeMethods.TTDT_RESHOW); 926UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ACTIVATE, (active == true) ? 1 : 0, 0); 929UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPBKCOLOR, ColorTranslator.ToWin32(BackColor), 0); 932UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTIPTEXTCOLOR, ColorTranslator.ToWin32(ForeColor), 0); 937UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTITLE, (int)toolTipIcon, title); 969NativeMethods.TOOLINFO_TOOLTIP tool = GetTOOLINFO(ctl, caption, out allocatedString); 971int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ADDTOOL, 0, tool); 1066UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_DELTOOL, 0, GetMinTOOLINFO(ctl)); 1116return (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETDELAYTIME, type, 0); 1135private NativeMethods.TOOLINFO_TOOLTIP GetMinTOOLINFO(Control ctl) { 1139private NativeMethods.TOOLINFO_TOOLTIP GetMinToolInfoForTool(IWin32Window tool) { 1143private NativeMethods.TOOLINFO_TOOLTIP GetMinToolInfoForHandle(IntPtr handle) { 1144NativeMethods.TOOLINFO_TOOLTIP ti = new NativeMethods.TOOLINFO_TOOLTIP(); 1145ti.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO_TOOLTIP)); 1147ti.uFlags |= NativeMethods.TTF_IDISHWND; 1160private NativeMethods.TOOLINFO_TOOLTIP GetTOOLINFO(Control ctl, string caption, out bool allocatedString) { 1162NativeMethods.TOOLINFO_TOOLTIP ti = GetMinTOOLINFO(ctl); 1163ti.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO_TOOLTIP)); 1164ti.uFlags |= NativeMethods.TTF_TRANSPARENT | NativeMethods.TTF_SUBCLASS; 1172ti.uFlags |= NativeMethods.TTF_RTLREADING; 1178ti.lpszText = NativeMethods.InvalidIntPtr; 1183ti.lpszText = NativeMethods.InvalidIntPtr; 1200private NativeMethods.TOOLINFO_TOOLTIP GetWinTOOLINFO(IntPtr hWnd) { 1201NativeMethods.TOOLINFO_TOOLTIP ti = new NativeMethods.TOOLINFO_TOOLTIP(); 1202ti.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO_TOOLTIP)); 1204ti.uFlags |= NativeMethods.TTF_IDISHWND | NativeMethods.TTF_TRANSPARENT | NativeMethods.TTF_SUBCLASS; 1210bool isWindowMirrored = ((unchecked((int)(long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, hWnd), NativeMethods.GWL_STYLE)) & NativeMethods.WS_EX_LAYOUTRTL) == NativeMethods.WS_EX_LAYOUTRTL); 1214ti.uFlags |= NativeMethods.TTF_RTLREADING; 1284IntPtr found = UnsafeNativeMethods.ChildWindowFromPointEx(new HandleRef(null, baseHwnd), pt.X, pt.Y, NativeMethods.CWP_SKIPINVISIBLE); 1391if (type == NativeMethods.TTDT_AUTOMATIC) { 1401UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETDELAYTIME, type, time); 1407delayTimes[NativeMethods.TTDT_AUTOPOP] = GetDelayTime(NativeMethods.TTDT_AUTOPOP); 1408delayTimes[NativeMethods.TTDT_INITIAL] = GetDelayTime(NativeMethods.TTDT_INITIAL); 1409delayTimes[NativeMethods.TTDT_RESHOW] = GetDelayTime(NativeMethods.TTDT_RESHOW); 1476NativeMethods.TOOLINFO_TOOLTIP toolInfo = GetTOOLINFO(control, info.Caption, out allocatedString); 1478UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETTOOLINFO, 1556NativeMethods.RECT r = new NativeMethods.RECT(); 1571NativeMethods.RECT visibleRect = new NativeMethods.RECT(); 1659NativeMethods.RECT r = new NativeMethods.RECT(); 1686NativeMethods.RECT r = new NativeMethods.RECT(); 1711NativeMethods.RECT r = new NativeMethods.RECT(); 1736NativeMethods.RECT r = new NativeMethods.RECT(); 1783IntPtr bubbleSizeInt = UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_GETBUBBLESIZE, 0, this.GetMinToolInfoForTool(tool.GetOwnerWindow())); 1784if (bubbleSizeInt.ToInt32() != NativeMethods.S_FALSE) { 1785int width = NativeMethods.Util.LOWORD(bubbleSizeInt); 1786int height = NativeMethods.Util.HIWORD(bubbleSizeInt); 1931UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_TRACKPOSITION, 0, NativeMethods.Util.MAKELONG(pointX, pointY)); 1960UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_TRACKACTIVATE, 0, GetWinTOOLINFO(hWnd)); 1961UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_DELTOOL, 0, GetWinTOOLINFO(hWnd)); 2013NativeMethods.TOOLINFO_TOOLTIP ti = new NativeMethods.TOOLINFO_TOOLTIP(); 2015ti.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO_TOOLTIP)); 2018int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETTOOLINFO, 0, ti); 2020ti.uFlags |= NativeMethods.TTF_TRACK; 2023ti.uFlags |= NativeMethods.TTF_ABSOLUTE; 2040UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_SETTOOLINFO, 0, ti); 2041UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_TRACKACTIVATE, 1, ti); 2066NativeMethods.TOOLINFO_TOOLTIP toolInfo = GetWinTOOLINFO(hWnd); 2067toolInfo.uFlags |= NativeMethods.TTF_TRACK; 2070toolInfo.uFlags |= NativeMethods.TTF_ABSOLUTE; 2075UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_ADDTOOL, 0, toolInfo); 2076UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_TRACKACTIVATE, 1, toolInfo); 2174NativeMethods.HWND_TOPMOST, 2176NativeMethods.SWP_NOACTIVATE | NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOOWNERZORDER); 2185NativeMethods.RECT r = new NativeMethods.RECT(); 2187NativeMethods.TOOLINFO_TOOLTIP ti = new NativeMethods.TOOLINFO_TOOLTIP(); 2188ti.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO_TOOLTIP)); 2189int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti); 2231NativeMethods.TOOLINFO_TOOLTIP ti = new NativeMethods.TOOLINFO_TOOLTIP(); 2232ti.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO_TOOLTIP)); 2233int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti); 2246NativeMethods.RECT r = new NativeMethods.RECT(); 2254msg.Result = (IntPtr)NativeMethods.MA_NOACTIVATE; 2267NativeMethods.POINT sc = (NativeMethods.POINT)msg.GetLParam(typeof(NativeMethods.POINT)); 2284NativeMethods.RECT r = new NativeMethods.RECT(); 2287NativeMethods.TOOLINFO_TOOLTIP ti = new NativeMethods.TOOLINFO_TOOLTIP(); 2288ti.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO_TOOLTIP)); 2289int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti); 2325UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_ADJUSTRECT, 1, ref r); 2339UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, maxwidth); 2345NativeMethods.HWND_TOPMOST, 2347 NativeMethods.SWP_NOACTIVATE | NativeMethods.SWP_NOOWNERZORDER); 2354NativeMethods.HWND_TOPMOST, 2356NativeMethods.SWP_NOACTIVATE | NativeMethods.SWP_NOOWNERZORDER); 2372SafeNativeMethods.ShowWindow(new HandleRef(this, Handle), NativeMethods.SW_HIDE); 2391NativeMethods.WINDOWPOS* wp = (NativeMethods.WINDOWPOS *)m.LParam; 2398NativeMethods.TOOLINFO_TOOLTIP ti = new NativeMethods.TOOLINFO_TOOLTIP(); 2399ti.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO_TOOLTIP)); 2400int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti); 2492NativeMethods.TOOLINFO_TOOLTIP ti = new NativeMethods.TOOLINFO_TOOLTIP(); 2493ti.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO_TOOLTIP)); 2494int ret = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti); 2516UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, screen.WorkingArea.Width); 2556case NativeMethods.WM_REFLECT + NativeMethods.WM_NOTIFY: 2557NativeMethods.NMHDR nmhdr = (NativeMethods.NMHDR) msg.GetLParam(typeof(NativeMethods.NMHDR)); 2558if (nmhdr.code == NativeMethods.TTN_SHOW && !trackPosition) { 2561else if (nmhdr.code == NativeMethods.TTN_POP) { 2569case NativeMethods.WM_WINDOWPOSCHANGING: 2573case NativeMethods.WM_WINDOWPOSCHANGED: 2580case NativeMethods.WM_MOUSEACTIVATE: 2584case NativeMethods.WM_MOVE: 2588case NativeMethods.TTM_WINDOWFROMPOINT: 2592case NativeMethods.WM_PRINTCLIENT: 2593goto case NativeMethods.WM_PAINT; 2595case NativeMethods.WM_PAINT: 2598NativeMethods.PAINTSTRUCT ps = new NativeMethods.PAINTSTRUCT(); 2608NativeMethods.TOOLINFO_TOOLTIP ti = new NativeMethods.TOOLINFO_TOOLTIP(); 2609ti.cbSize = Marshal.SizeOf(typeof(NativeMethods.TOOLINFO_TOOLTIP)); 2610int ret = unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TTM_GETCURRENTTOOL, 0, ti)); 2620font = Font.FromHfont(UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.WM_GETFONT, 0, 0));
winforms\Managed\System\WinForms\TrackBar.cs (49)
202cp.ClassName = NativeMethods.WC_TRACKBAR; 206cp.Style |= NativeMethods.TBS_NOTICKS; 209cp.Style |= (NativeMethods.TBS_AUTOTICKS | NativeMethods.TBS_TOP); 212cp.Style |= (NativeMethods.TBS_AUTOTICKS | NativeMethods.TBS_BOTTOM); 215cp.Style |= (NativeMethods.TBS_AUTOTICKS | NativeMethods.TBS_BOTH); 220cp.Style |= NativeMethods.TBS_VERT; // HORIZ == 0 225cp.ExStyle |= NativeMethods.WS_EX_LAYOUTRTL | NativeMethods.WS_EX_NOINHERITLAYOUT; 227cp.ExStyle &= ~(NativeMethods.WS_EX_RTLREADING | NativeMethods.WS_EX_RIGHT | NativeMethods.WS_EX_LEFTSCROLLBAR); 368SendMessage(NativeMethods.TBM_SETPAGESIZE, 0, value); 501int cyhscroll = UnsafeNativeMethods.GetSystemMetrics(NativeMethods.SM_CYHSCROLL); 520SendMessage(NativeMethods.TBM_SETRANGEMAX, 1, maximum); 576SendMessage(NativeMethods.TBM_SETLINESIZE, 0, value); 662SendMessage(NativeMethods.TBM_SETTICFREQ, value, 0); 859NativeMethods.INITCOMMONCONTROLSEX icc = new NativeMethods.INITCOMMONCONTROLSEX(); 860icc.dwICC = NativeMethods.ICC_BAR_CLASSES; 883value = unchecked( (int) (long)SendMessage(NativeMethods.TBM_GETPOS, 0, 0)); 923SendMessage(NativeMethods.TBM_SETRANGEMIN, 0, minimum); 924SendMessage(NativeMethods.TBM_SETRANGEMAX, 0, maximum); 925SendMessage(NativeMethods.TBM_SETTICFREQ, tickFrequency, 0); 926SendMessage(NativeMethods.TBM_SETPAGESIZE, 0, largeChange); 927SendMessage(NativeMethods.TBM_SETLINESIZE, 0, smallChange); 989Debug.Assert(this.cumulativeWheelData > -NativeMethods.WHEEL_DELTA, "cumulativeWheelData is too small"); 990Debug.Assert(this.cumulativeWheelData < NativeMethods.WHEEL_DELTA, "cumulativeWheelData is too big"); 994partialNotches = (float)this.cumulativeWheelData / (float)NativeMethods.WHEEL_DELTA; 1008this.cumulativeWheelData -= (int)((float)scrollBands * ((float)NativeMethods.WHEEL_DELTA / (float)wheelScrollLines)); 1013this.cumulativeWheelData -= (int)((float)scrollBands * ((float)NativeMethods.WHEEL_DELTA / (float)wheelScrollLines)); 1099SendMessage(NativeMethods.TBM_SETRANGEMIN, 0, minimum); 1105SendMessage(NativeMethods.TBM_SETRANGEMAX, 1, maximum); 1148SendMessage(NativeMethods.TBM_SETPOS, 1, reflectedValue); 1173case NativeMethods.WM_REFLECT+NativeMethods.WM_HSCROLL: 1174case NativeMethods.WM_REFLECT+NativeMethods.WM_VSCROLL: 1175switch (NativeMethods.Util.LOWORD(m.WParam)) { 1176case NativeMethods.TB_LINEUP: 1177case NativeMethods.TB_LINEDOWN: 1178case NativeMethods.TB_PAGEUP: 1179case NativeMethods.TB_PAGEDOWN: 1181case NativeMethods.TB_THUMBTRACK: 1182case NativeMethods.TB_TOP: 1183case NativeMethods.TB_BOTTOM: 1184case NativeMethods.TB_ENDTRACK:
winforms\Managed\System\WinForms\TreeNode.cs (85)
164NativeMethods.TVIF_TEXT 165| NativeMethods.TVIF_IMAGE 166| NativeMethods.TVIF_SELECTEDIMAGE; 281NativeMethods.RECT rc = new NativeMethods.RECT(); 284if ((int)UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETITEMRECT, 1, ref rc) == 0) { 301NativeMethods.RECT rc = new NativeMethods.RECT(); 307if ((int)UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETITEMRECT, 0, ref rc) == 0) { 340NativeMethods.TV_ITEM item = new NativeMethods.TV_ITEM(); 341item.mask = NativeMethods.TVIF_HANDLE | NativeMethods.TVIF_STATE; 343item.stateMask = NativeMethods.TVIS_STATEIMAGEMASK; 345UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item); 538UpdateNode(NativeMethods.TVIF_IMAGE); 562UpdateNode(NativeMethods.TVIF_IMAGE); 605return(State & NativeMethods.TVIS_EXPANDED) != 0; 617return(State & NativeMethods.TVIS_SELECTED) != 0; 634NativeMethods.RECT rc = new NativeMethods.RECT(); 637bool visible = ((int)UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETITEMRECT, 1, ref rc) != 0); 713NativeMethods.TVM_GETNEXTITEM, NativeMethods.TVGN_NEXTVISIBLE, node.Handle); 841NativeMethods.TVM_GETNEXTITEM, 842NativeMethods.TVGN_PREVIOUSVISIBLE, node.Handle); 873UpdateNode(NativeMethods.TVIF_SELECTEDIMAGE); 898UpdateNode(NativeMethods.TVIF_SELECTEDIMAGE); 916NativeMethods.TV_ITEM item = new NativeMethods.TV_ITEM(); 918item.mask = NativeMethods.TVIF_HANDLE | NativeMethods.TVIF_STATE; 919item.stateMask = NativeMethods.TVIS_SELECTED | NativeMethods.TVIS_EXPANDED; 920UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETITEM, 0, ref item); 949UpdateNode(NativeMethods.TVIF_STATE); 980UpdateNode(NativeMethods.TVIF_STATE); 1019UpdateNode(NativeMethods.TVIF_TEXT); 1208UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EDITLABEL, 0, handle); 1378if ((State & NativeMethods.TVIS_EXPANDED) != 0) { 1382UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EXPAND, NativeMethods.TVE_COLLAPSE, Handle); 1493UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_ENDEDITLABELNOW, cancel?1:0, 0); 1554UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_ENSUREVISIBLE, 0, Handle); 1570UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EXPAND, NativeMethods.TVE_EXPAND, Handle); 1670NativeMethods.TV_INSERTSTRUCT tvis = new NativeMethods.TV_INSERTSTRUCT(); 1675tvis.hInsertAfter = (IntPtr)NativeMethods.TVI_FIRST; 1685tvis.item_mask = NativeMethods.TVIF_TEXT; 1691tvis.item_mask |= NativeMethods.TVIF_STATE; 1692tvis.item_stateMask |= NativeMethods.TVIS_STATEIMAGEMASK; 1696tvis.item_mask |= NativeMethods.TVIF_STATE; 1697tvis.item_stateMask = NativeMethods.TVIS_STATEIMAGEMASK; 1702if (tvis.item_iImage >= 0) tvis.item_mask |= NativeMethods.TVIF_IMAGE; 1703if (tvis.item_iSelectedImage >= 0) tvis.item_mask |= NativeMethods.TVIF_SELECTEDIMAGE; 1711IntPtr editHandle = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETEDITCONTROL, 0, 0); 1716UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_ENDEDITLABELNOW, 0 /* fCancel==FALSE */, 0); 1719handle = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_INSERTITEM, 0, ref tvis); 1723UpdateNode(NativeMethods.TVIF_PARAM); 1728UnsafeNativeMethods.PostMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EDITLABEL, IntPtr.Zero, handle); 1739UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.WM_SETREDRAW, 1, 0); 1806UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_DELETEITEM, 0, handle); 1827NativeMethods.TV_ITEM item = new NativeMethods.TV_ITEM(); 1828item.mask = NativeMethods.TVIF_HANDLE | NativeMethods.TVIF_STATE; 1830item.stateMask = NativeMethods.TVIS_EXPANDEDONCE; 1832UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item); 1922NativeMethods.TV_ITEM item = new NativeMethods.TV_ITEM(); 1923item.mask = NativeMethods.TVIF_HANDLE | mask; 1925if ((mask & NativeMethods.TVIF_TEXT) != 0) 1927if ((mask & NativeMethods.TVIF_IMAGE) != 0) 1929if ((mask & NativeMethods.TVIF_SELECTEDIMAGE) != 0) 1931if ((mask & NativeMethods.TVIF_STATE) != 0) { 1932item.stateMask = NativeMethods.TVIS_STATEIMAGEMASK; 1940if ((mask & NativeMethods.TVIF_PARAM) != 0) { 1944UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item); 1945if ((mask & NativeMethods.TVIF_TEXT) != 0) { 1959NativeMethods.TV_ITEM item = new NativeMethods.TV_ITEM(); 1961item.mask = NativeMethods.TVIF_HANDLE | NativeMethods.TVIF_IMAGE; 1964UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_SETITEM, 0, ref item);
winforms\Managed\System\WinForms\TreeNodeState.cs (9)
26Checked = NativeMethods.CDIS_CHECKED, 34Default = NativeMethods.CDIS_DEFAULT, 42Focused = NativeMethods.CDIS_FOCUS, 50Grayed = NativeMethods.CDIS_GRAYED, 58Hot = NativeMethods.CDIS_HOT, 66Indeterminate = NativeMethods.CDIS_INDETERMINATE, 74Marked = NativeMethods.CDIS_MARKED, 82Selected = NativeMethods.CDIS_SELECTED, 90ShowKeyboardCues = NativeMethods.CDIS_SHOWKEYBOARDCUES
winforms\Managed\System\WinForms\TreeView.cs (275)
212SendMessage(NativeMethods.TVM_SETBKCOLOR, 0, ColorTranslator.ToWin32(BackColor)); 217SendMessage(NativeMethods.TVM_SETINDENT, Indent, 0); 284DispId(NativeMethods.ActiveX.DISPID_BORDERSTYLE), 352cp.ClassName = NativeMethods.WC_TREEVIEW; 358int currentStyle = unchecked((int)((long)UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 359cp.Style |= (currentStyle & (NativeMethods.WS_HSCROLL | NativeMethods.WS_VSCROLL)); 363cp.ExStyle |= NativeMethods.WS_EX_CLIENTEDGE; 366cp.Style |= NativeMethods.WS_BORDER; 371cp.Style |= NativeMethods.LVS_NOSCROLL; 374cp.Style |= NativeMethods.TVS_SHOWSELALWAYS; 376cp.Style |= NativeMethods.TVS_EDITLABELS; 378cp.Style |= NativeMethods.TVS_HASLINES; 380cp.Style |= NativeMethods.TVS_HASBUTTONS; 382cp.Style |= NativeMethods.TVS_LINESATROOT; 384cp.Style |= NativeMethods.TVS_TRACKSELECT; 386cp.Style |= NativeMethods.TVS_FULLROWSELECT; 388cp.Style |= NativeMethods.TVS_NONEVENHEIGHT; 394cp.Style |= NativeMethods.TVS_INFOTIP; 401cp.Style |= NativeMethods.TVS_CHECKBOXES; 408cp.ExStyle |= NativeMethods.WS_EX_LAYOUTRTL; 410cp.ExStyle &= ~(NativeMethods.WS_EX_RTLREADING | NativeMethods.WS_EX_RIGHT | NativeMethods.WS_EX_LEFTSCROLLBAR); 413cp.Style |= NativeMethods.TVS_RTLREADING; 465SendMessage(NativeMethods.TVM_SETTEXTCOLOR, 0, ColorTranslator.ToWin32(ForeColor)); 647SendMessage(NativeMethods.TVM_SETIMAGELIST, 0, 756return unchecked( (int) (long)SendMessage(NativeMethods.TVM_GETINDENT, 0, 0)); 771SendMessage(NativeMethods.TVM_SETINDENT, value, 0); 772indent = unchecked( (int) (long)SendMessage(NativeMethods.TVM_GETINDENT, 0, 0)); 793return unchecked( (int) (long)SendMessage(NativeMethods.TVM_GETITEMHEIGHT, 0, 0)); 823SendMessage(NativeMethods.TVM_SETITEMHEIGHT, value, 0); 824itemHeight = unchecked( (int) (long)SendMessage(NativeMethods.TVM_GETITEMHEIGHT, 0, 0)); 867int intColor = unchecked((int)(long)SendMessage(NativeMethods.TVM_GETLINECOLOR, 0, 0)); 876SendMessage(NativeMethods.TVM_SETLINECOLOR, 0, ColorTranslator.ToWin32(lineColor)); 1124IntPtr hItem = SendMessage(NativeMethods.TVM_GETNEXTITEM, NativeMethods.TVGN_CARET, 0); 1144SendMessage(NativeMethods.TVM_SELECTITEM, NativeMethods.TVGN_CARET, hnode); 1335IntPtr hitem = SendMessage(NativeMethods.TVM_GETNEXTITEM, NativeMethods.TVGN_FIRSTVISIBLE, 0); 1348SendMessage(NativeMethods.TVM_SELECTITEM, NativeMethods.TVGN_FIRSTVISIBLE, hnode); 1374return unchecked( (int) (long)SendMessage(NativeMethods.TVM_GETVISIBLECOUNT, 0, 0)); 1658NativeMethods.INITCOMMONCONTROLSEX icc = new NativeMethods.INITCOMMONCONTROLSEX(); 1659icc.dwICC = NativeMethods.ICC_TREEVIEW_CLASSES; 1748SendMessage(NativeMethods.WM_SETREDRAW, 0, 0); 1750UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_SETREDRAW, (IntPtr)1, IntPtr.Zero); 1752SendMessage(NativeMethods.WM_SETREDRAW, 1, 0); 1764UnsafeNativeMethods.SendMessage(new HandleRef(toolTip, toolTip.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 1765UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TVM_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 1784NativeMethods.TV_HITTESTINFO tvhi = new NativeMethods.TV_HITTESTINFO(); 1787IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi); 1832NativeMethods.TV_HITTESTINFO tvhi = new NativeMethods.TV_HITTESTINFO(); 1837IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi); 1845SendMessage(NativeMethods.TVM_SETIMAGELIST, 0, handle); 1981int version = unchecked((int)(long)SendMessage(NativeMethods.CCM_GETVERSION, 0, 0)); 1983SendMessage(NativeMethods.CCM_SETVERSION, 5, 0); 1992int style = unchecked((int)(UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 1993style |= NativeMethods.TVS_CHECKBOXES; 1994UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 1998int style = unchecked((int)(UnsafeNativeMethods.GetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE))); 1999style |= NativeMethods.TVS_INFOTIP; 2000UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 2006SendMessage(NativeMethods.TVM_SETBKCOLOR, 0, ColorTranslator.ToWin32(c)); 2010SendMessage(NativeMethods.TVM_SETTEXTCOLOR, 0, ColorTranslator.ToWin32(c)); 2014SendMessage(NativeMethods.TVM_SETLINECOLOR, 0, ColorTranslator.ToWin32(lineColor)); 2018SendMessage(NativeMethods.TVM_SETIMAGELIST, 0, imageList.Handle); 2026SendMessage(NativeMethods.TVM_SETINDENT, indent, 0); 2030SendMessage(NativeMethods.TVM_SETITEMHEIGHT, ItemHeight, 0); 2044int flags = NativeMethods.SWP_NOZORDER | NativeMethods.SWP_NOACTIVATE | NativeMethods.SWP_NOMOVE; 2045SafeNativeMethods.SetWindowPos(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef, this.Left, this.Top, Int32.MaxValue, this.Height, flags); 2051SafeNativeMethods.SetWindowPos(new HandleRef(this, this.Handle), NativeMethods.NullHandleRef, this.Left, this.Top, oldSize, this.Height, flags); 2081SendMessage(NativeMethods.TVM_SETIMAGELIST, NativeMethods.TVSIL_STATE, newImageList.Handle); 2095IntPtr handleOld = SendMessage(NativeMethods.TVM_SETIMAGELIST, NativeMethods.TVSIL_STATE, handle); 2106IntPtr handle = SendMessage(NativeMethods.TVM_GETIMAGELIST, NativeMethods.TVSIL_STATE, IntPtr.Zero); 2112SendMessage(NativeMethods.TVM_SETIMAGELIST, NativeMethods.TVSIL_STATE, IntPtr.Zero); 2162NativeMethods.TV_HITTESTINFO tvhip = new NativeMethods.TV_HITTESTINFO(); 2167IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 2169if (hnode != IntPtr.Zero && ((tvhip.flags & NativeMethods.TVHT_ONITEM) != 0)) { 2473private unsafe void TvnBeginDrag(MouseButtons buttons, NativeMethods.NMTREEVIEW* nmtv) { 2474NativeMethods.TV_ITEM item = nmtv->itemNew; 2486private unsafe IntPtr TvnExpanding(NativeMethods.NMTREEVIEW* nmtv) { 2487NativeMethods.TV_ITEM item = nmtv->itemNew; 2495if ((item.state & NativeMethods.TVIS_EXPANDED) == 0) { 2506private unsafe void TvnExpanded(NativeMethods.NMTREEVIEW* nmtv) { 2507NativeMethods.TV_ITEM item = nmtv->itemNew; 2518if ((item.state & NativeMethods.TVIS_EXPANDED) == 0) { 2528private unsafe IntPtr TvnSelecting(NativeMethods.NMTREEVIEW* nmtv) { 2542case NativeMethods.TVC_BYKEYBOARD: 2545case NativeMethods.TVC_BYMOUSE: 2556private unsafe void TvnSelected(NativeMethods.NMTREEVIEW* nmtv) { 2564case NativeMethods.TVC_BYKEYBOARD: 2567case NativeMethods.TVC_BYMOUSE: 2577NativeMethods.RECT rc = new NativeMethods.RECT(); 2580if (unchecked( (int) (long)UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_GETITEMRECT, 1, ref rc)) != 0) 2585private IntPtr TvnBeginLabelEdit(NativeMethods.NMTVDISPINFO nmtvdi) { 2600private IntPtr TvnEndLabelEdit(NativeMethods.NMTVDISPINFO nmtvdi) { 2661SendMessage(NativeMethods.TVM_SELECTITEM, NativeMethods.TVGN_DROPHILITE, null); 2666OnMouseDown(new MouseEventArgs(button, clicks, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 2683NativeMethods.NMTVCUSTOMDRAW nmcd = (NativeMethods.NMTVCUSTOMDRAW)m.GetLParam(typeof(NativeMethods.NMTVCUSTOMDRAW)); 2688case NativeMethods.CDDS_PREPAINT: 2689m.Result = (IntPtr)NativeMethods.CDRF_NOTIFYITEMDRAW; // yes, we do... 2692case NativeMethods.CDDS_ITEMPREPAINT: 2701m.Result = (IntPtr)(NativeMethods.CDRF_SKIPDEFAULT); 2717m.Result = (IntPtr) (NativeMethods.CDRF_NEWFONT | NativeMethods.CDRF_NOTIFYPOSTPAINT); 2729NativeMethods.SCROLLINFO si = new NativeMethods.SCROLLINFO(); 2730si.cbSize = Marshal.SizeOf(typeof(NativeMethods.SCROLLINFO)); 2731si.fMask = NativeMethods.SIF_POS; 2732if (UnsafeNativeMethods.GetScrollInfo(new HandleRef(this, Handle), NativeMethods.SB_HORZ,si) != false) { 2751m.Result = (IntPtr)(NativeMethods.CDRF_SKIPDEFAULT); 2796m.Result = (IntPtr)NativeMethods.CDRF_NEWFONT; 2803case (NativeMethods.CDDS_ITEMPOSTPAINT): 2864m.Result = (IntPtr)NativeMethods.CDRF_NOTIFYSUBITEMDRAW; 2872m.Result = (IntPtr)NativeMethods.CDRF_DODEFAULT; 2889if ((state & (NativeMethods.CDIS_SELECTED | NativeMethods.CDIS_GRAYED | NativeMethods.CDIS_HOT | NativeMethods.CDIS_DISABLED))==0) { 2899NativeMethods.NMHDR* nmhdr = (NativeMethods.NMHDR*)m.LParam; 2903NativeMethods.TV_HITTESTINFO tvhip = new NativeMethods.TV_HITTESTINFO(); 2908IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 2910if (hnode != IntPtr.Zero && ((tvhip.flags & NativeMethods.TVHT_ONITEM) != 0)) { 2920UnsafeNativeMethods.SendMessage(new HandleRef(this, tooltipHandle), NativeMethods.TTM_ADJUSTRECT, 1, ref bounds); 2922NativeMethods.HWND_TOPMOST, bounds.Left, bounds.Top, 0, 0, NativeMethods.SWP_NOACTIVATE | NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOZORDER); 2935NativeMethods.TOOLTIPTEXT ttt = (NativeMethods.TOOLTIPTEXT) m.GetLParam(typeof(NativeMethods.TOOLTIPTEXT)); 2938NativeMethods.TV_HITTESTINFO tvhip = new NativeMethods.TV_HITTESTINFO(); 2943IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 2944if (hnode != IntPtr.Zero && ((tvhip.flags & NativeMethods.TVHT_ONITEM) != 0)) { 2962ttt.uFlags |= NativeMethods.TTF_RTLREADING; 2969NativeMethods.NMHDR* nmhdr = (NativeMethods.NMHDR *)m.LParam; 2973if ((nmhdr->code == NativeMethods.NM_CUSTOMDRAW)) { 2978NativeMethods.NMTREEVIEW* nmtv = (NativeMethods.NMTREEVIEW*)m.LParam; 2981case NativeMethods.TVN_ITEMEXPANDINGA: 2982case NativeMethods.TVN_ITEMEXPANDINGW: 2985case NativeMethods.TVN_ITEMEXPANDEDA: 2986case NativeMethods.TVN_ITEMEXPANDEDW: 2989case NativeMethods.TVN_SELCHANGINGA: 2990case NativeMethods.TVN_SELCHANGINGW: 2993case NativeMethods.TVN_SELCHANGEDA: 2994case NativeMethods.TVN_SELCHANGEDW: 2997case NativeMethods.TVN_BEGINDRAGA: 2998case NativeMethods.TVN_BEGINDRAGW: 3001case NativeMethods.TVN_BEGINRDRAGA: 3002case NativeMethods.TVN_BEGINRDRAGW: 3005case NativeMethods.TVN_BEGINLABELEDITA: 3006case NativeMethods.TVN_BEGINLABELEDITW: 3007m.Result = TvnBeginLabelEdit((NativeMethods.NMTVDISPINFO)m.GetLParam(typeof(NativeMethods.NMTVDISPINFO))); 3009case NativeMethods.TVN_ENDLABELEDITA: 3010case NativeMethods.TVN_ENDLABELEDITW: 3011m.Result = TvnEndLabelEdit((NativeMethods.NMTVDISPINFO)m.GetLParam(typeof(NativeMethods.NMTVDISPINFO))); 3013case NativeMethods.NM_CLICK: 3014case NativeMethods.NM_RCLICK: 3017NativeMethods.TV_HITTESTINFO tvhip = new NativeMethods.TV_HITTESTINFO(); 3022IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 3023if (nmtv->nmhdr.code != NativeMethods.NM_CLICK 3024|| (tvhip.flags & NativeMethods.TVHT_ONITEM) != 0) { 3025button = nmtv->nmhdr.code == NativeMethods.NM_CLICK 3032if (nmtv->nmhdr.code != NativeMethods.NM_CLICK 3033|| (tvhip.flags & NativeMethods.TVHT_ONITEM) != 0 || FullRowSelect) { 3041if (nmtv->nmhdr.code == NativeMethods.NM_RCLICK) { 3048SendMessage(NativeMethods.WM_CONTEXTMENU, Handle, SafeNativeMethods.GetMessagePos()); 3055if (nmtv->nmhdr.code != NativeMethods.NM_CLICK 3056|| (tvhip.flags & NativeMethods.TVHT_ONITEM) != 0) { 3086NativeMethods.POINT pt = new NativeMethods.POINT(); 3100NativeMethods.TPM_VERTICAL, 3107UnsafeNativeMethods.PostMessage(new HandleRef(this, this.Handle), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero); 3113UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.TVM_SELECTITEM, NativeMethods.TVGN_DROPHILITE, treeNode.Handle); 3127SendMessage(NativeMethods.TVM_SELECTITEM, NativeMethods.TVGN_DROPHILITE, null); 3133if ((NativeMethods.PRF_NONCLIENT & (int)m.LParam) != 0 && Application.RenderWithVisualStyles && this.BorderStyle == BorderStyle.Fixed3D) { 3156case NativeMethods.WM_WINDOWPOSCHANGING: 3157case NativeMethods.WM_NCCALCSIZE: 3158case NativeMethods.WM_WINDOWPOSCHANGED: 3159case NativeMethods.WM_SIZE: 3171case NativeMethods.WM_HSCROLL: 3180case NativeMethods.WM_PRINT: 3183case NativeMethods.TVM_SETITEMA: 3184case NativeMethods.TVM_SETITEMW: 3187NativeMethods.TV_ITEM item = (NativeMethods.TV_ITEM) m.GetLParam(typeof(NativeMethods.TV_ITEM)); 3190NativeMethods.TV_ITEM item1 = new NativeMethods.TV_ITEM(); 3191item1.mask = NativeMethods.TVIF_HANDLE | NativeMethods.TVIF_STATE; 3193item1.stateMask = NativeMethods.TVIS_STATEIMAGEMASK; 3194UnsafeNativeMethods.SendMessage(new HandleRef(null, this.Handle), NativeMethods.TVM_GETITEM, 0, ref item1); 3201case NativeMethods.WM_NOTIFY: 3202NativeMethods.NMHDR nmhdr = (NativeMethods.NMHDR) m.GetLParam(typeof(NativeMethods.NMHDR)); 3204case NativeMethods.TTN_GETDISPINFOA: 3205case NativeMethods.TTN_GETDISPINFOW: 3210UnsafeNativeMethods.SendMessage(new HandleRef(nmhdr, nmhdr.hwndFrom), NativeMethods.TTM_SETMAXTIPWIDTH, 0, SystemInformation.MaxWindowTrackSize.Width); 3214 case NativeMethods.TTN_SHOW: 3231case NativeMethods.WM_REFLECT + NativeMethods.WM_NOTIFY: 3234case NativeMethods.WM_LBUTTONDBLCLK: 3244case NativeMethods.WM_LBUTTONDOWN: 3256NativeMethods.TV_HITTESTINFO tvhip = new NativeMethods.TV_HITTESTINFO(); 3257tvhip.pt_x = NativeMethods.Util.SignedLOWORD(m.LParam); 3258tvhip.pt_y = NativeMethods.Util.SignedHIWORD(m.LParam); 3259hNodeMouseDown = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 3263if ((tvhip.flags & NativeMethods.TVHT_ONITEMSTATEICON) != 0) { 3265OnMouseDown(new MouseEventArgs(MouseButtons.Left, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 3282case NativeMethods.WM_LBUTTONUP: 3283case NativeMethods.WM_RBUTTONUP: 3284NativeMethods.TV_HITTESTINFO tvhi = new NativeMethods.TV_HITTESTINFO(); 3285tvhi.pt_x = NativeMethods.Util.SignedLOWORD(m.LParam); 3286tvhi.pt_y = NativeMethods.Util.SignedHIWORD(m.LParam); 3287IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi); 3297OnNodeMouseClick(new TreeNodeMouseClickEventArgs(NodeFromHandle(hnode), downButton, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam))); 3300OnClick(new MouseEventArgs(downButton, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 3301OnMouseClick(new MouseEventArgs(downButton, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 3308OnNodeMouseDoubleClick(new TreeNodeMouseClickEventArgs(NodeFromHandle(hnode), downButton, 2, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam))); 3309OnDoubleClick(new MouseEventArgs(downButton, 2, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 3310OnMouseDoubleClick(new MouseEventArgs(downButton, 2, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 3315OnMouseUp(new MouseEventArgs(downButton, 1, NativeMethods.Util.SignedLOWORD(m.LParam), NativeMethods.Util.SignedHIWORD(m.LParam), 0)); 3323case NativeMethods.WM_MBUTTONDBLCLK: 3328case NativeMethods.WM_MBUTTONDOWN: 3334case NativeMethods.WM_MOUSELEAVE: 3340case NativeMethods.WM_RBUTTONDBLCLK: 3350case NativeMethods.WM_RBUTTONDOWN: 3354NativeMethods.TV_HITTESTINFO tvhit = new NativeMethods.TV_HITTESTINFO(); 3355tvhit.pt_x = NativeMethods.Util.SignedLOWORD(m.LParam); 3356tvhit.pt_y = NativeMethods.Util.SignedHIWORD(m.LParam); 3357hNodeMouseDown = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhit); 3363case NativeMethods.WM_SYSCOLORCHANGE: 3364SendMessage(NativeMethods.TVM_SETINDENT, Indent, 0); 3367case NativeMethods.WM_SETFOCUS: 3382case NativeMethods.WM_CONTEXTMENU:
winforms\Managed\System\WinForms\TreeViewHitTestLocation.cs (11)
35None = NativeMethods.TVHT_NOWHERE, 43Image = NativeMethods.TVHT_ONITEMICON, 51Label = NativeMethods.TVHT_ONITEMLABEL, 59Indent = NativeMethods.TVHT_ONITEMINDENT, 67AboveClientArea = NativeMethods.TVHT_ABOVE, 75BelowClientArea = NativeMethods.TVHT_BELOW, 83LeftOfClientArea = NativeMethods.TVHT_TOLEFT, 91RightOfClientArea = NativeMethods.TVHT_TORIGHT, 99RightOfLabel = NativeMethods.TVHT_ONITEMRIGHT, 107StateImage = NativeMethods.TVHT_ONITEMSTATEICON, 115PlusMinus = NativeMethods.TVHT_ONITEMBUTTON,
winforms\Managed\System\WinForms\TrustManagerPromptUI.cs (1)
728UnsafeNativeMethods.SendMessage(new HandleRef(toolTipFromUrl, toolTipFromUrl.Handle), NativeMethods.TTM_SETMAXTIPWIDTH, 0, 600);
winforms\Managed\System\WinForms\UnsafeNativeMethods.cs (256)
302public static extern bool PageSetupDlg([In, Out] NativeMethods.PAGESETUPDLG lppsd); 306public static extern bool PrintDlg_32([In, Out] NativeMethods.PRINTDLG_32 lppd); 310public static extern bool PrintDlg_64([In, Out] NativeMethods.PRINTDLG_64 lppd); 312public static bool PrintDlg([In, Out] NativeMethods.PRINTDLG lppd) { 314NativeMethods.PRINTDLG_32 lppd_32 = lppd as NativeMethods.PRINTDLG_32; 321NativeMethods.PRINTDLG_64 lppd_64 = lppd as NativeMethods.PRINTDLG_64; 331public static extern int PrintDlgEx([In, Out] NativeMethods.PRINTDLGEX lppdex); 343public static extern void OleCreatePropertyFrameIndirect(NativeMethods.OCPFIPARAMS p); 346public static extern UnsafeNativeMethods.IFont OleCreateIFontIndirect(NativeMethods.FONTDESC fd, ref Guid iid); 356public static extern UnsafeNativeMethods.IPicture OleCreatePictureIndirect(NativeMethods.PICTDESC pictdesc, [In]ref Guid refiid, bool fOwn); 359public static extern UnsafeNativeMethods.IFont OleCreateFontIndirect(NativeMethods.tagFONTDESC fontdesc, [In]ref Guid refiid); 380if (capacity < NativeMethods.MAX_UNICODESTRING_LEN) 401public static extern bool EnumChildWindows(HandleRef hwndParent, NativeMethods.EnumChildrenCallback lpEnumFunc, HandleRef lParam); 417public static extern int Shell_NotifyIcon(int message, NativeMethods.NOTIFYICONDATA pnid); 420public extern static bool InsertMenuItem(HandleRef hMenu, int uItem, bool fByPosition, NativeMethods.MENUITEMINFO_T lpmii); 426public static extern bool GetMenuItemInfo(HandleRef hMenu, int uItem, bool fByPosition, [In, Out] NativeMethods.MENUITEMINFO_T lpmii); 429public static extern bool GetMenuItemInfo(HandleRef hMenu, int uItem, bool fByPosition, [In, Out] NativeMethods.MENUITEMINFO_T_RW lpmii); 432public extern static bool SetMenuItemInfo(HandleRef hMenu, int uItem, bool fByPosition, NativeMethods.MENUITEMINFO_T lpmii); 439return System.Internal.HandleCollector.Add(IntCreateMenu(), NativeMethods.CommonHandles.Menu); 444public static extern bool GetOpenFileName([In, Out] NativeMethods.OPENFILENAME_I ofn); 488System.Internal.HandleCollector.Add(handleTarget, NativeMethods.CommonHandles.Kernel); 500public static extern IntPtr SetWindowsHookEx(int hookid, NativeMethods.HookProc pfnhook, HandleRef hinst, int threadid); 521public static extern int ScreenToClient( HandleRef hWnd, [In, Out] NativeMethods.POINT pt ); 527StringBuilder buffer = new StringBuilder(NativeMethods.MAX_PATH); 533&& Marshal.GetLastWin32Error() == NativeMethods.ERROR_INSUFFICIENT_BUFFER 534&& buffer.Capacity < NativeMethods.MAX_UNICODESTRING_LEN) 537int capacity = noOfTimes * NativeMethods.MAX_PATH < NativeMethods.MAX_UNICODESTRING_LEN ? noOfTimes * NativeMethods.MAX_PATH : NativeMethods.MAX_UNICODESTRING_LEN; 545public static extern bool IsDialogMessage(HandleRef hWndDlg, [In, Out] ref NativeMethods.MSG msg); 548public static extern bool TranslateMessage([In, Out] ref NativeMethods.MSG msg); 551public static extern IntPtr DispatchMessage([In] ref NativeMethods.MSG msg); 554public static extern IntPtr DispatchMessageA([In] ref NativeMethods.MSG msg); 557public static extern IntPtr DispatchMessageW([In] ref NativeMethods.MSG msg); 573public extern static bool EnumThreadWindows(int dwThreadId, NativeMethods.EnumThreadWindowsCallback lpfn, HandleRef lParam); 585public static extern bool GetSaveFileName([In, Out] NativeMethods.OPENFILENAME_I ofn); 597System.Internal.HandleCollector.Remove((IntPtr)handle, NativeMethods.CommonHandles.Kernel); 607return System.Internal.HandleCollector.Add(IntCreateCompatibleDC(hDC), NativeMethods.CommonHandles.CompatibleHDC); 619public static extern uint SendInput(uint nInputs, NativeMethods.INPUT[] pInputs, int cbSize); 644return System.Internal.HandleCollector.Add(IntMapViewOfFile(hFileMapping, dwDesiredAccess, dwFileOffsetHigh, dwFileOffsetLow, dwNumberOfBytesToMap), NativeMethods.CommonHandles.Kernel); 651System.Internal.HandleCollector.Remove((IntPtr)pvBaseAddress, NativeMethods.CommonHandles.Kernel); 661return System.Internal.HandleCollector.Add(IntGetDCEx(hWnd, hrgnClip, flags), NativeMethods.CommonHandles.HDC); 667public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] NativeMethods.BITMAP bm); 671public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] NativeMethods.LOGPEN lp); 672public static int GetObject(HandleRef hObject, NativeMethods.LOGPEN lp) { 673return GetObject(hObject, Marshal.SizeOf(typeof(NativeMethods.LOGPEN)), lp); 678public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] NativeMethods.LOGBRUSH lb); 679public static int GetObject(HandleRef hObject, NativeMethods.LOGBRUSH lb) { 680return GetObject(hObject, Marshal.SizeOf(typeof(NativeMethods.LOGBRUSH)), lb); 685public static extern int GetObject(HandleRef hObject, int nSize, [In, Out] NativeMethods.LOGFONT lf); 686public static int GetObject(HandleRef hObject, NativeMethods.LOGFONT lp) { 687return GetObject(hObject, Marshal.SizeOf(typeof(NativeMethods.LOGFONT)), lp); 707return System.Internal.HandleCollector.Add(IntCreateAcceleratorTable(pentries, cCount), NativeMethods.CommonHandles.Accelerator); 713System.Internal.HandleCollector.Remove((IntPtr)hAccel, NativeMethods.CommonHandles.Accelerator); 731public static extern bool GetCursorPos([In, Out] NativeMethods.POINT pt); 748System.Internal.HandleCollector.Remove((IntPtr)hrgn, NativeMethods.CommonHandles.GDI); 856public static extern int MapWindowPoints(HandleRef hWndFrom, HandleRef hWndTo, [In, Out] ref NativeMethods.RECT rect, int cPoints); 860public static extern int MapWindowPoints(HandleRef hWndFrom, HandleRef hWndTo, [In, Out] NativeMethods.POINT pt, int cPoints); 892public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TOOLINFO_T lParam); 896public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TOOLINFO_TOOLTIP lParam); 900public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.TBBUTTON lParam); 904public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.TBBUTTONINFO lParam); 908public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.TV_ITEM lParam); 912public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.TV_INSERTSTRUCT lParam); 916public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TV_HITTESTINFO lParam); 920public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVBKIMAGE lParam); 924public static extern int SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.LVHITTESTINFO lParam); 928public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TCITEM_T lParam); 932public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.HDLAYOUT hdlayout); 948public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.PARAFORMAT lParam); 951public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.CHARFORMATA lParam); 954public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.CHARFORMAT2A lParam); 957public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.CHARFORMATW lParam); 963public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.CHARRANGE lParam); 966public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.FINDTEXT lParam); 969public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TEXTRANGE lParam); 972public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.POINT lParam); 975public static extern IntPtr SendMessage(HandleRef hWnd, int msg, NativeMethods.POINT wParam, int lParam); 978public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.REPASTESPECIAL lParam); 981public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.EDITSTREAM lParam); 984public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.EDITSTREAM64 lParam); 987public static extern IntPtr SendMessage(HandleRef hWnd, int msg, NativeMethods.GETTEXTLENGTHEX wParam, int lParam); 993public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] NativeMethods.SIZE lParam); 999public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] ref NativeMethods.LVFINDINFO lParam); 1002public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVHITTESTINFO lParam); 1005public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVCOLUMN_T lParam); 1008public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] ref NativeMethods.LVITEM lParam); 1011public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVCOLUMN lParam); 1014public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVGROUP lParam); 1017public static extern IntPtr SendMessage(HandleRef hWnd, int msg, NativeMethods.POINT wParam, [In, Out] NativeMethods.LVINSERTMARK lParam); 1020public static extern bool SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVINSERTMARK lParam); 1023public static extern bool SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] NativeMethods.LVTILEVIEWINFO lParam); 1029public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.MCHITTESTINFO lParam); 1032public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.SYSTEMTIME lParam); 1035public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.SYSTEMTIMEARRAY lParam); 1038public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] NativeMethods.LOGFONT lParam); 1041public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.MSG lParam); 1050public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, IntPtr wParam, [In, Out] ref NativeMethods.RECT lParam); 1062public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, int wParam, [In, Out] ref NativeMethods.RECT lParam); 1068public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, IntPtr wParam, NativeMethods.ListViewCompareCallback pfnCompare); 1081public static extern bool GetWindowRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect); 1122public static extern bool GetClassInfo(HandleRef hInst, string lpszClass, [In, Out] NativeMethods.WNDCLASS_I wc); 1157public static extern bool SystemParametersInfo(int nAction, int nParam, ref NativeMethods.RECT rc, int nUpdate); 1166public static extern bool SystemParametersInfo(int nAction, int nParam, ref NativeMethods.HIGHCONTRAST_I rc, int nUpdate); 1169public static extern bool SystemParametersInfo(int nAction, int nParam, [In, Out] NativeMethods.NONCLIENTMETRICS metrics, int nUpdate); 1174public static extern bool SystemParametersInfoForDpi(int nAction, int nParam, [In, Out] NativeMethods.NONCLIENTMETRICS metrics, int nUpdate, uint dpi); 1179public static bool TrySystemParametersInfoForDpi(int nAction, int nParam, [In, Out] NativeMethods.NONCLIENTMETRICS metrics, int nUpdate, uint dpi) { 1194public static extern bool SystemParametersInfo(int nAction, int nParam, [In, Out] NativeMethods.LOGFONT font, int nUpdate); 1209public static extern bool GetUserObjectInformation(HandleRef hObj, int nIndex, [MarshalAs(UnmanagedType.LPStruct)] NativeMethods.USEROBJECTFLAGS pvBuffer, int nLength, ref int lpnLengthNeeded); 1212public static extern int ClientToScreen( HandleRef hWnd, [In, Out] NativeMethods.POINT pt ); 1230public static extern bool PeekMessage([In, Out] ref NativeMethods.MSG msg, HandleRef hwnd, int msgMin, int msgMax, int remove); 1233public static extern bool PeekMessageW([In, Out] ref NativeMethods.MSG msg, HandleRef hwnd, int msgMin, int msgMax, int remove); 1236public static extern bool PeekMessageA([In, Out] ref NativeMethods.MSG msg, HandleRef hwnd, int msgMin, int msgMax, int remove); 1274private static extern IntPtr IntBeginPaint(HandleRef hWnd, [In, Out] ref NativeMethods.PAINTSTRUCT lpPaint); 1275public static IntPtr BeginPaint(HandleRef hWnd, [In, Out, MarshalAs(UnmanagedType.LPStruct)] ref NativeMethods.PAINTSTRUCT lpPaint) { 1276return System.Internal.HandleCollector.Add(IntBeginPaint(hWnd, ref lpPaint), NativeMethods.CommonHandles.HDC); 1281private static extern bool IntEndPaint(HandleRef hWnd, ref NativeMethods.PAINTSTRUCT lpPaint); 1282public static bool EndPaint(HandleRef hWnd, [In, MarshalAs(UnmanagedType.LPStruct)] ref NativeMethods.PAINTSTRUCT lpPaint) { 1283System.Internal.HandleCollector.Remove(lpPaint.hdc, NativeMethods.CommonHandles.HDC); 1293return System.Internal.HandleCollector.Add(IntGetDC(hWnd), NativeMethods.CommonHandles.HDC); 1302return System.Internal.HandleCollector.Add(IntGetWindowDC(hWnd), NativeMethods.CommonHandles.HDC); 1309System.Internal.HandleCollector.Remove((IntPtr)hDC, NativeMethods.CommonHandles.HDC); 1320return System.Internal.HandleCollector.Add(IntCreateDC(lpszDriver, null, null, NativeMethods.NullHandleRef), NativeMethods.CommonHandles.HDC); 1325return System.Internal.HandleCollector.Add(IntCreateDC(lpszDriverName, lpszDeviceName, lpszOutput, lpInitData), NativeMethods.CommonHandles.HDC); 1347public static extern bool GetScrollInfo(HandleRef hWnd, int fnBar, NativeMethods.SCROLLINFO si); 1351public static extern int SetScrollInfo(HandleRef hWnd, int fnBar, NativeMethods.SCROLLINFO si, bool redraw); 1412public static IntPtr SetWindowLong(HandleRef hWnd, int nIndex, NativeMethods.WndProc wndproc) 1423public static extern IntPtr SetWindowLongPtr32(HandleRef hWnd, int nIndex, NativeMethods.WndProc wndproc); 1427public static extern IntPtr SetWindowLongPtr64(HandleRef hWnd, int nIndex, NativeMethods.WndProc wndproc); 1442return System.Internal.HandleCollector.Add(IntCreatePopupMenu(), NativeMethods.CommonHandles.Menu); 1453System.Internal.HandleCollector.Remove((IntPtr)hMenu, NativeMethods.CommonHandles.Menu); 1471public static extern bool TranslateMDISysAccel(IntPtr hWndClient, [In, Out] ref NativeMethods.MSG msg); 1483public static extern int GetWindowPlacement(HandleRef hWnd, ref NativeMethods.WINDOWPLACEMENT placement); 1488public static extern void GetStartupInfo([In, Out] NativeMethods.STARTUPINFO_I startupinfo_i); 1508return System.Internal.HandleCollector.Add(IntCreateIC(lpszDriverName, lpszDeviceName, lpszOutput, lpInitData), NativeMethods.CommonHandles.HDC); 1513public static extern bool ClipCursor(ref NativeMethods.RECT rcClip); 1517public static extern bool ClipCursor(NativeMethods.COMRECT rcClip); 1535System.Internal.HandleCollector.Remove((IntPtr)hCurs, NativeMethods.CommonHandles.Cursor); 1547System.Internal.HandleCollector.Remove((IntPtr)hDC, NativeMethods.CommonHandles.HDC); 1553System.Internal.HandleCollector.Remove((IntPtr)hDC, NativeMethods.CommonHandles.CompatibleHDC); 1562public static extern bool GetMessageA([In, Out] ref NativeMethods.MSG msg, HandleRef hWnd, int uMsgFilterMin, int uMsgFilterMax); 1566public static extern bool GetMessageW([In, Out] ref NativeMethods.MSG msg, HandleRef hWnd, int uMsgFilterMin, int uMsgFilterMax); 1578public static extern bool GetClientRect(HandleRef hWnd, [In, Out] ref NativeMethods.RECT rect); 1629public static extern short RegisterClass(NativeMethods.WNDCLASS_D wc); 1641public static extern bool SetWindowPlacement(HandleRef hWnd, [In] ref NativeMethods.WINDOWPLACEMENT placement); 1652public static extern bool GetSystemPowerStatus([In, Out] ref NativeMethods.SYSTEM_POWER_STATUS systemPowerStatus); 1663public unsafe static NativeMethods.RECT[] GetRectsFromRegion(IntPtr hRgn) { 1664NativeMethods.RECT[] regionRects = null; 1675NativeMethods.RGNDATAHEADER* pRgnDataHeader = (NativeMethods.RGNDATAHEADER*)pBytes; 1677regionRects = new NativeMethods.RECT[pRgnDataHeader->nCount]; 1680Debug.Assert(Marshal.SizeOf(typeof(NativeMethods.RECT)) == pRgnDataHeader->nRgnSize || pRgnDataHeader->nRgnSize == 0); 1686regionRects[i] = *((NativeMethods.RECT*)((byte*)pBytes + rectStart + (Marshal.SizeOf(typeof(NativeMethods.RECT)) * i))); 1811NativeMethods._POINTL pPtlHimetric, 1813NativeMethods.tagPOINTF pPtfContainer, 1820ref NativeMethods.MSG pMsg, 1884NativeMethods.COMRECT lprcPosRect, 1886NativeMethods.COMRECT lprcClipRect, 1888NativeMethods.tagOIFI lpFrameInfo); 1892NativeMethods.tagSIZE scrollExtant); 1910NativeMethods.COMRECT lprcPosRect); 2049NativeMethods.COMRECT lprectBorder); 2054NativeMethods.COMRECT pborderwidths); 2059NativeMethods.COMRECT pborderwidths); 2073NativeMethods.tagOleMenuGroupWidths lpMenuWidths); 2101ref NativeMethods.MSG lpmsg, 2117NativeMethods.POINT pt, 2127NativeMethods.DOCHOSTUIINFO info); 2137NativeMethods.IOleCommandTarget commandTarget, 2173NativeMethods.COMRECT rect, 2182ref NativeMethods.MSG msg, 2276[DispId(501)] NativeMethods.OLECMDF QueryStatusWB([In] NativeMethods.OLECMDID cmdID); 2277[DispId(502)] void ExecWB([In] NativeMethods.OLECMDID cmdID, 2278[In] NativeMethods.OLECMDEXECOPT cmdexecopt, 4983NativeMethods.MSOCRINFOSTRUCT pcrinfo, 5005bool FUpdateComponentRegistration(IntPtr dwComponentID,NativeMethods.MSOCRINFOSTRUCT pcrinfo); 5204NativeMethods.MSOCRINFOSTRUCT pcrinfo, 5236bool FPreTranslateMessage(ref NativeMethods.MSG msg); 5369[MarshalAs(UnmanagedType.LPArray)] NativeMethods.MSG[] pMsgPeeked); 5518int GetClipboardData(NativeMethods.CHARRANGE lpchrg, int reco, IntPtr lplpdataobj); 5524int GetContextMenu(short seltype, IntPtr lpoleobj, NativeMethods.CHARRANGE lpchrg, out IntPtr hmenu); 5540NativeMethods.COMRECT lprectBorder); 5546NativeMethods.COMRECT pborderwidths); 5552NativeMethods.COMRECT pborderwidths); 5580ref NativeMethods.MSG lpmsg); 5595NativeMethods.COMRECT prcBorder, 5642NativeMethods.COMRECT lprcPosRect, 5644NativeMethods.COMRECT lprcClipRect); 5720NativeMethods.COMRECT lprcPosRect); 5748NativeMethods.tagSIZEL pSizel); 5755NativeMethods.tagSIZEL pSizel); 5779NativeMethods.tagLOGPALETTE pLogpal); 5849NativeMethods.COMRECT lprcPosRect); 5877NativeMethods.tagSIZEL pSizel); 5884NativeMethods.tagSIZEL pSizel); 5909NativeMethods.tagLOGPALETTE pLogpal); 5932NativeMethods.tagCONTROLINFO pCI); 5937ref NativeMethods.MSG pMsg); 5971NativeMethods.tagDVTARGETDEVICE ptd, 5977NativeMethods.COMRECT lprcBounds, 5979NativeMethods.COMRECT lprcWBounds, 5995NativeMethods.tagDVTARGETDEVICE ptd, 5999NativeMethods.tagLOGPALETTE ppColorSet); 6048NativeMethods.tagDVTARGETDEVICE ptd, 6054NativeMethods.COMRECT lprcBounds, 6056NativeMethods.COMRECT lprcWBounds, 6072NativeMethods.tagDVTARGETDEVICE ptd, 6076NativeMethods.tagLOGPALETTE ppColorSet); 6124NativeMethods.tagDVTARGETDEVICE ptd, 6126NativeMethods.tagSIZEL lpsizel); 6178NativeMethods.tagSIZEL pSizel); 6183NativeMethods.tagSIZEL pSizel); 6220NativeMethods.tagEXCEPINFO pExcepInfo_p1); 6369NativeMethods.tagOLEVERB rgelt, 6506NativeMethods.STATSTG pStatstg, 6691ExternalException e = new ExternalException(msg, NativeMethods.E_FAIL); 6696ExternalException e = new ExternalException(SR.GetString(SR.UnsafeNativeMethodsNotImplemented), NativeMethods.E_NOTIMPL); 6725case NativeMethods.STREAM_SEEK_SET: 6734case NativeMethods.STREAM_SEEK_END: 6743case NativeMethods.STREAM_SEEK_CUR: 6765public void Stat(NativeMethods.STATSTG pstatstg, int grfStatFlag) { 6893NativeMethods.FILETIME pctime, 6895NativeMethods.FILETIME patime, 6897NativeMethods.FILETIME pmtime); 6914NativeMethods.STATSTG pStatStg, 6938NativeMethods.tagLICINFO licInfo); 7024NativeMethods.tagDISPPARAMS pDispParams, 7028NativeMethods.tagEXCEPINFO pExcepInfo, 7111NativeMethods.tagINVOKEKIND invkind, 7176NativeMethods.tagDESCKIND[] pDescKind, 7178NativeMethods.tagFUNCDESC[] ppFuncDesc, 7180NativeMethods.tagVARDESC[] ppVarDesc, 7216NativeMethods.tagTYPEKIND[] pTKind); 7495NativeMethods.STATSTG pstatstg, 7596int bufferSize = NativeMethods.MAX_PATH * Marshal.SystemDefaultCharSize; 7597int length = NativeMethods.MAX_PATH; 7604&& length < NativeMethods.MAX_UNICODESTRING_LEN) 7612length = noOfTimes * length >= NativeMethods.MAX_UNICODESTRING_LEN 7613? NativeMethods.MAX_UNICODESTRING_LEN : noOfTimes * length; 7641if ((result = SHGetKnownFolderPath(ref rfid, dwFlags, hToken, out path)) == NativeMethods.S_OK) 7732ref NativeMethods.RECT prcView); 7737ref NativeMethods.RECT prcView); 7742NativeMethods.RECT prcView, 7744NativeMethods.RECT prcHScroll, 7746NativeMethods.RECT prcVScroll, 7748NativeMethods.RECT prcSizeBox); 8746NativeMethods.UiaRect BoundingRectangle { 8981module = LoadLibraryEx(libraryName, IntPtr.Zero, NativeMethods.LOAD_LIBRARY_SEARCH_SYSTEM32); 9010return ((result == NativeMethods.S_OK) && (isEnabled != 0));
winforms\Managed\System\WinForms\UpDownBase.cs (13)
279DispId(NativeMethods.ActiveX.DISPID_BORDERSTYLE), 358cp.Style &= (~NativeMethods.WS_BORDER); 362cp.ExStyle |= NativeMethods.WS_EX_CLIENTEDGE; 365cp.Style |= NativeMethods.WS_BORDER; 1005Debug.Assert(this.wheelDelta > -NativeMethods.WHEEL_DELTA, "wheelDelta is too smal"); 1006Debug.Assert(this.wheelDelta < NativeMethods.WHEEL_DELTA, "wheelDelta is too big"); 1010partialNotches = (float)this.wheelDelta / (float)NativeMethods.WHEEL_DELTA; 1026this.wheelDelta -= (int)((float)scrollBands * ((float)NativeMethods.WHEEL_DELTA / (float)wheelScrollLines)); 1034this.wheelDelta -= (int)((float)scrollBands * ((float)NativeMethods.WHEEL_DELTA / (float)wheelScrollLines)); 1164NativeMethods.POINT point = new NativeMethods.POINT(e.X, e.Y); 1214case NativeMethods.WM_SETFOCUS: 1230case NativeMethods.WM_KILLFOCUS:
winforms\Managed\System\WinForms\UserControl.cs (6)
200cp.ExStyle |= NativeMethods.WS_EX_CONTROLPARENT; 202cp.ExStyle &= (~NativeMethods.WS_EX_CLIENTEDGE); 203cp.Style &= (~NativeMethods.WS_BORDER); 207cp.ExStyle |= NativeMethods.WS_EX_CLIENTEDGE; 210cp.Style |= NativeMethods.WS_BORDER; 373case NativeMethods.WM_SETFOCUS:
winforms\Managed\System\WinForms\View.cs (5)
30LargeIcon = NativeMethods.LVS_ICON, 44Details = NativeMethods.LVS_REPORT, 52SmallIcon = NativeMethods.LVS_SMALLICON, 62List = NativeMethods.LVS_LIST, 70Tile = NativeMethods.LV_VIEW_TILE,
winforms\Managed\System\WinForms\VisualStyles\VisualStyleRenderer.cs (42)
291lastHResult = SafeNativeMethods.DrawThemeBackground(new HandleRef(this, hTheme.NativeHandle), hdc, part, state, new NativeMethods.COMRECT(bounds), null); 295lastHResult = SafeNativeMethods.DrawThemeBackground(new HandleRef(this, Handle), hdc, part, state, new NativeMethods.COMRECT(bounds), null); 325lastHResult = SafeNativeMethods.DrawThemeBackground(new HandleRef(this, hTheme.NativeHandle), hdc, part, state, new NativeMethods.COMRECT(bounds), new NativeMethods.COMRECT(clipRectangle)); 329lastHResult = SafeNativeMethods.DrawThemeBackground(new HandleRef(this, Handle), hdc, part, state, new NativeMethods.COMRECT(bounds), new NativeMethods.COMRECT(clipRectangle)); 357NativeMethods.COMRECT rect = new NativeMethods.COMRECT(); 361lastHResult = SafeNativeMethods.DrawThemeEdge( new HandleRef( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( bounds ), (int) style, (int) edges | (int) effects | EdgeAdjust, rect ); 452lastHResult = SafeNativeMethods.DrawThemeParentBackground( new HandleRef( this, childControl.Handle ), hdc, new NativeMethods.COMRECT( bounds ) ); 497lastHResult = SafeNativeMethods.DrawThemeText( new HandleRef( this, Handle ), hdc, part, state, textToDraw, textToDraw.Length, (int) flags, disableFlag, new NativeMethods.COMRECT( bounds ) ); 516NativeMethods.COMRECT rect = new NativeMethods.COMRECT(); 520lastHResult = SafeNativeMethods.GetThemeBackgroundContentRect( new HandleRef( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( bounds ), rect ); 540NativeMethods.COMRECT rect = new NativeMethods.COMRECT(); 544lastHResult = SafeNativeMethods.GetThemeBackgroundExtent( new HandleRef( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( contentBounds ), rect ); 572lastHResult = SafeNativeMethods.GetThemeBackgroundRegion( new HandleRef( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( bounds ), ref hRegion ); 680NativeMethods.LOGFONT logfont = new NativeMethods.LOGFONT(); 690if (NativeMethods.Succeeded(lastHResult)) { 751NativeMethods.SIZE size = new NativeMethods.SIZE(); 785NativeMethods.SIZE size = new NativeMethods.SIZE(); 789lastHResult = SafeNativeMethods.GetThemePartSize( new HandleRef( this, Handle ), hdc, part, state, new NativeMethods.COMRECT( bounds ), type, size ); 808NativeMethods.POINT point = new NativeMethods.POINT(); 830NativeMethods.MARGINS margins = new NativeMethods.MARGINS(); 874NativeMethods.COMRECT rect = new NativeMethods.COMRECT(); 899NativeMethods.COMRECT rect = new NativeMethods.COMRECT(); 903lastHResult = SafeNativeMethods.GetThemeTextExtent( new HandleRef( this, Handle ), hdc, part, state, textToDraw, textToDraw.Length, (int) flags, new NativeMethods.COMRECT( bounds ), rect ); 944NativeMethods.POINTSTRUCT point = new NativeMethods.POINTSTRUCT(pt.X, pt.Y); 948lastHResult = SafeNativeMethods.HitTestThemeBackground( new HandleRef( this, Handle ), hdc, part, state, (int) options, new NativeMethods.COMRECT( backgroundRectangle ), NativeMethods.NullHandleRef, point, ref htCode ); 987NativeMethods.POINTSTRUCT point = new NativeMethods.POINTSTRUCT(pt.X, pt.Y); 991lastHResult = SafeNativeMethods.HitTestThemeBackground( new HandleRef( this, Handle ), hdc, part, state, (int) options, new NativeMethods.COMRECT( backgroundRectangle ), new HandleRef( this, hRgn ), point, ref htCode );
winforms\Managed\System\WinForms\VisualStyles\VisualStyleState.cs (4)
33ClientAreaEnabled = NativeMethods.STAP_ALLOW_CONTROLS, 41NonClientAreaEnabled = NativeMethods.STAP_ALLOW_NONCLIENT, 49ClientAndNonClientAreasEnabled = NativeMethods.STAP_ALLOW_NONCLIENT | NativeMethods.STAP_ALLOW_CONTROLS
winforms\Managed\System\WinForms\VScrollBar.cs (1)
47cp.Style |= NativeMethods.SBS_VERT;
winforms\Managed\System\WinForms\VScrollProperties.cs (1)
38return NativeMethods.SB_VERT;
winforms\Managed\System\WinForms\WebBrowser.cs (49)
862this.AxIWebBrowser2.ExecWB(NativeMethods.OLECMDID.OLECMDID_PRINT, NativeMethods.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, ref nullObjectArray, IntPtr.Zero); 963this.AxIWebBrowser2.ExecWB(NativeMethods.OLECMDID.OLECMDID_PAGESETUP, NativeMethods.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER, ref nullObjectArray, IntPtr.Zero); 985this.AxIWebBrowser2.ExecWB(NativeMethods.OLECMDID.OLECMDID_PRINT, NativeMethods.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER, ref nullObjectArray, IntPtr.Zero); 1006this.AxIWebBrowser2.ExecWB(NativeMethods.OLECMDID.OLECMDID_PRINTPREVIEW, NativeMethods.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER, ref nullObjectArray, IntPtr.Zero); 1026this.AxIWebBrowser2.ExecWB(NativeMethods.OLECMDID.OLECMDID_PROPERTIES, NativeMethods.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER, ref nullObjectArray, IntPtr.Zero); 1048this.AxIWebBrowser2.ExecWB(NativeMethods.OLECMDID.OLECMDID_SAVEAS, NativeMethods.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT, ref nullObjectArray, IntPtr.Zero); 1648case NativeMethods.WM_CONTEXTMENU: 1649int x = NativeMethods.Util.SignedLOWORD(m.LParam); 1650int y = NativeMethods.Util.SignedHIWORD(m.LParam); 1717int UnsafeNativeMethods.IDocHostUIHandler.ShowContextMenu(int dwID, NativeMethods.POINT pt, object pcmdtReserved, object pdispReserved) { 1722return NativeMethods.S_FALSE; 1732return NativeMethods.S_OK; 1739int UnsafeNativeMethods.IDocHostUIHandler.GetHostInfo(NativeMethods.DOCHOSTUIINFO info) { 1742info.dwDoubleClick = (int)NativeMethods.DOCHOSTUIDBLCLICK.DEFAULT; 1743info.dwFlags = (int)NativeMethods.DOCHOSTUIFLAG.NO3DOUTERBORDER | 1744(int)NativeMethods.DOCHOSTUIFLAG.DISABLE_SCRIPT_INACTIVE; 1747info.dwFlags |= (int)NativeMethods.DOCHOSTUIFLAG.FLAT_SCROLLBAR; 1750info.dwFlags |= (int)NativeMethods.DOCHOSTUIFLAG.SCROLL_NO; 1754info.dwFlags |= (int)NativeMethods.DOCHOSTUIFLAG.THEME; 1757info.dwFlags |= (int)NativeMethods.DOCHOSTUIFLAG.NOTHEME; 1760return NativeMethods.S_OK; 1766return NativeMethods.E_NOTIMPL; 1772NativeMethods.IOleCommandTarget commandTarget, UnsafeNativeMethods.IOleInPlaceFrame frame, 1774return NativeMethods.S_FALSE; 1780return NativeMethods.E_NOTIMPL; 1786return NativeMethods.E_NOTIMPL; 1792return NativeMethods.E_NOTIMPL; 1798return NativeMethods.E_NOTIMPL; 1803int UnsafeNativeMethods.IDocHostUIHandler.ResizeBorder(NativeMethods.COMRECT rect, UnsafeNativeMethods.IOleInPlaceUIWindow doc, bool fFrameWindow) { 1804return NativeMethods.E_NOTIMPL; 1810return NativeMethods.E_NOTIMPL; 1820return NativeMethods.E_NOTIMPL; 1828return NativeMethods.S_OK; 1834int UnsafeNativeMethods.IDocHostUIHandler.TranslateAccelerator(ref NativeMethods.MSG msg, ref Guid group, int nCmdID) { 1845if (msg.message != NativeMethods.WM_CHAR 1847return NativeMethods.S_OK; 1849return NativeMethods.S_FALSE; 1851return NativeMethods.S_FALSE; 1861return NativeMethods.S_FALSE; 1872return NativeMethods.S_FALSE; 1879if (dispid != NativeMethods.ActiveX.DISPID_READYSTATE) { 1913if (command == NativeMethods.CSC_NAVIGATEBACK) { 1916else if (command == NativeMethods.CSC_NAVIGATEFORWARD) {
winforms\Managed\System\WinForms\WebBrowserBase.cs (76)
258this.AXInPlaceObject.SetObjectRects(new NativeMethods.COMRECT(new Rectangle(0, 0, width, height)), WebBrowserHelper.GetClipRect()); 301NativeMethods.MSG win32Message = new NativeMethods.MSG(); 316if (hr == NativeMethods.S_OK) 330if (hr == NativeMethods.S_FALSE) 384NativeMethods.tagCONTROLINFO ctlInfo = new NativeMethods.tagCONTROLINFO(); 386if (NativeMethods.Succeeded(hr)) { 391NativeMethods.MSG msg = new NativeMethods.MSG(); 393msg.message = NativeMethods.WM_SYSKEYDOWN; 397NativeMethods.POINT p = new NativeMethods.POINT(); 431case NativeMethods.WM_ERASEBKGND: 432case NativeMethods.WM_REFLECT + NativeMethods.WM_NOTIFYFORMAT: 433case NativeMethods.WM_SETCURSOR: 434case NativeMethods.WM_SYSCOLORCHANGE: 435case NativeMethods.WM_LBUTTONDBLCLK: 436case NativeMethods.WM_LBUTTONUP: 437case NativeMethods.WM_MBUTTONDBLCLK: 438case NativeMethods.WM_MBUTTONUP: 439case NativeMethods.WM_RBUTTONDBLCLK: 440case NativeMethods.WM_RBUTTONUP: 441case NativeMethods.WM_CONTEXTMENU: 445case NativeMethods.WM_DRAWITEM: 449case NativeMethods.WM_COMMAND: 454case NativeMethods.WM_HELP: 460case NativeMethods.WM_LBUTTONDOWN: 461case NativeMethods.WM_MBUTTONDOWN: 462case NativeMethods.WM_RBUTTONDOWN: 463case NativeMethods.WM_MOUSEACTIVATE: 472case NativeMethods.WM_KILLFOCUS: 482case NativeMethods.WM_DESTROY: 492if (NativeMethods.Succeeded(this.AXInPlaceObject.GetWindow(out hwndInPlaceObject))) { 591AmbientChanged(NativeMethods.ActiveX.DISPID_AMBIENT_FONT); 602AmbientChanged(NativeMethods.ActiveX.DISPID_AMBIENT_FORECOLOR); 613AmbientChanged(NativeMethods.ActiveX.DISPID_AMBIENT_BACKCOLOR); 745new NativeMethods.COMRECT(this.Bounds)); 747Debug.Assert(hr == NativeMethods.S_OK, String.Format(CultureInfo.CurrentCulture, "DoVerb call failed for verb 0x{0:X}", verb)); 748return hr == NativeMethods.S_OK; 914this.activeXInstance = UnsafeNativeMethods.CoCreateInstance(ref clsid, null, NativeMethods.CLSCTX_INPROC_SERVER, ref NativeMethods.ActiveX.IID_IUnknown); 963int hr = this.axOleObject.GetMiscStatus(NativeMethods.ActiveX.DVASPECT_CONTENT, out bits); 964if (NativeMethods.Succeeded(hr) && ((bits & NativeMethods.ActiveX.OLEMISC_SETCLIENTSITEFIRST) != 0)) { 1011DoVerb(NativeMethods.OLEIVERB_INPLACEACTIVATE); 1051DoVerb(NativeMethods.OLEIVERB_UIACTIVATE); 1067Debug.Assert(NativeMethods.Succeeded(hr), "Failed to UIDeactivate"); 1151NativeMethods.tagSIZEL sz = new NativeMethods.tagSIZEL(); 1157this.axOleObject.SetExtent(NativeMethods.ActiveX.DVASPECT_CONTENT, sz); 1163this.axOleObject.GetExtent(NativeMethods.ActiveX.DVASPECT_CONTENT, sz); 1165this.axOleObject.SetExtent(NativeMethods.ActiveX.DVASPECT_CONTENT, sz); 1175NativeMethods.tagSIZEL sz = new NativeMethods.tagSIZEL(); 1176this.axOleObject.GetExtent(NativeMethods.ActiveX.DVASPECT_CONTENT, sz); 1181private void HiMetric2Pixel(NativeMethods.tagSIZEL sz, NativeMethods.tagSIZEL szout) { 1182NativeMethods._POINTL phm = new NativeMethods._POINTL(); 1185NativeMethods.tagPOINTF pcont = new NativeMethods.tagPOINTF(); 1186((UnsafeNativeMethods.IOleControlSite)this.ActiveXSite).TransformCoords(phm, pcont, NativeMethods.ActiveX.XFORMCOORDS_SIZE | NativeMethods.ActiveX.XFORMCOORDS_HIMETRICTOCONTAINER); 1191private void Pixel2hiMetric(NativeMethods.tagSIZEL sz, NativeMethods.tagSIZEL szout) { 1192NativeMethods.tagPOINTF pcont = new NativeMethods.tagPOINTF(); 1195NativeMethods._POINTL phm = new NativeMethods._POINTL(); 1196((UnsafeNativeMethods.IOleControlSite)this.ActiveXSite).TransformCoords(phm, pcont, NativeMethods.ActiveX.XFORMCOORDS_SIZE | NativeMethods.ActiveX.XFORMCOORDS_CONTAINERTOHIMETRIC); 1971case NativeMethods.WM_WINDOWPOSCHANGING: 1981NativeMethods.WINDOWPOS* wp = (NativeMethods.WINDOWPOS *)m.LParam;
winforms\Managed\System\WinForms\WebBrowserContainer.cs (21)
45return NativeMethods.E_NOTIMPL; 58return NativeMethods.S_OK; 62return NativeMethods.S_OK; 66return NativeMethods.E_NOTIMPL; 77return NativeMethods.S_OK; 80int UnsafeNativeMethods.IOleInPlaceFrame.GetBorder(NativeMethods.COMRECT lprectBorder) { 81return NativeMethods.E_NOTIMPL; 84int UnsafeNativeMethods.IOleInPlaceFrame.RequestBorderSpace(NativeMethods.COMRECT pborderwidths) { 85return NativeMethods.E_NOTIMPL; 88int UnsafeNativeMethods.IOleInPlaceFrame.SetBorderSpace(NativeMethods.COMRECT pborderwidths) { 89return NativeMethods.E_NOTIMPL; 98return NativeMethods.S_OK; 134return NativeMethods.S_OK; 137int UnsafeNativeMethods.IOleInPlaceFrame.InsertMenus(IntPtr hmenuShared, NativeMethods.tagOleMenuGroupWidths lpMenuWidths) { 138return NativeMethods.S_OK; 142return NativeMethods.E_NOTIMPL; 146return NativeMethods.E_NOTIMPL; 150return NativeMethods.E_NOTIMPL; 154return NativeMethods.E_NOTIMPL; 157int UnsafeNativeMethods.IOleInPlaceFrame.TranslateAccelerator(ref NativeMethods.MSG lpmsg, short wID) { 158return NativeMethods.S_FALSE;
winforms\Managed\System\WinForms\WebBrowserHelper.cs (8)
117IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 119logPixelsX = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSX); 120UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 135IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 137logPixelsY = UnsafeNativeMethods.GetDeviceCaps(new HandleRef(null, hDC), NativeMethods.LOGPIXELSY); 138UnsafeNativeMethods.ReleaseDC(NativeMethods.NullHandleRef, new HandleRef(null, hDC)); 165internal static NativeMethods.COMRECT GetClipRect() { 166return new NativeMethods.COMRECT(new Rectangle(0, 0, 32000, 32000));
winforms\Managed\System\WinForms\WebBrowserSiteBase.cs (50)
113return NativeMethods.S_OK; 119return NativeMethods.E_NOTIMPL; 126return NativeMethods.E_NOTIMPL; 131int UnsafeNativeMethods.IOleControlSite.TransformCoords(NativeMethods._POINTL pPtlHimetric, NativeMethods.tagPOINTF pPtfContainer, int dwFlags) { 132if ((dwFlags & NativeMethods.ActiveX.XFORMCOORDS_HIMETRICTOCONTAINER) != 0) { 133if ((dwFlags & NativeMethods.ActiveX.XFORMCOORDS_SIZE) != 0) { 137else if ((dwFlags & NativeMethods.ActiveX.XFORMCOORDS_POSITION) != 0) { 142return NativeMethods.E_INVALIDARG; 145else if ((dwFlags & NativeMethods.ActiveX.XFORMCOORDS_CONTAINERTOHIMETRIC) != 0) { 146if ((dwFlags & NativeMethods.ActiveX.XFORMCOORDS_SIZE) != 0) { 150else if ((dwFlags & NativeMethods.ActiveX.XFORMCOORDS_POSITION) != 0) { 155return NativeMethods.E_INVALIDARG; 159return NativeMethods.E_INVALIDARG; 162return NativeMethods.S_OK; 167int UnsafeNativeMethods.IOleControlSite.TranslateAccelerator(ref NativeMethods.MSG pMsg, int grfModifiers) { 179return f ? NativeMethods.S_OK : NativeMethods.S_FALSE; 189return NativeMethods.S_OK; 195return NativeMethods.E_NOTIMPL; 204return NativeMethods.E_NOTIMPL; 211return NativeMethods.E_NOTIMPL; 218return NativeMethods.S_OK; 227if (NativeMethods.Succeeded(this.Host.AXInPlaceObject.GetWindow(out hwnd))) { 231this.OnActiveXRectChange(new NativeMethods.COMRECT(this.Host.Bounds)); 239return NativeMethods.S_OK; 245return NativeMethods.S_OK; 251return NativeMethods.E_NOTIMPL; 274return NativeMethods.E_NOTIMPL; 280return NativeMethods.S_OK; 287this.OnActiveXRectChange(new NativeMethods.COMRECT(this.Host.Bounds)); 288return NativeMethods.S_OK; 296return NativeMethods.S_OK; 302NativeMethods.COMRECT lprcPosRect, NativeMethods.COMRECT lprcClipRect, NativeMethods.tagOIFI lpFrameInfo) { 313lpFrameInfo.cb = Marshal.SizeOf(typeof(NativeMethods.tagOIFI)); 319return NativeMethods.S_OK; 324int UnsafeNativeMethods.IOleInPlaceSite.Scroll(NativeMethods.tagSIZE scrollExtant) { 325return NativeMethods.S_FALSE; 335return NativeMethods.S_OK; 347return NativeMethods.S_OK; 353return NativeMethods.S_OK; 364int UnsafeNativeMethods.IOleInPlaceSite.OnPosRectChange(NativeMethods.COMRECT lprcPosRect) { 374return NativeMethods.S_OK; 380return NativeMethods.S_FALSE; 413return NativeMethods.S_OK; 491private int OnActiveXRectChange(NativeMethods.COMRECT lprcPosRect) { 493NativeMethods.COMRECT.FromXYWH(0, 0, lprcPosRect.right - lprcPosRect.left, lprcPosRect.bottom - lprcPosRect.top), 496return NativeMethods.S_OK;
winforms\Managed\System\WinForms\WinFormsUtils.cs (28)
29using Util = NativeMethods.Util; 56return new Point(NativeMethods.Util.SignedLOWORD(lastXY),NativeMethods.Util.SignedHIWORD(lastXY)) ; 288IntPtr rootHwnd = UnsafeNativeMethods.GetAncestor(new HandleRef(hwnd, hwnd.Handle), NativeMethods.GA_ROOT); 330NativeMethods.POINT pt = new NativeMethods.POINT(point.X, point.Y); 615NativeMethods.POINT viewportOrg = new NativeMethods.POINT(); 616HandleRef hOriginalClippingRegion = NativeMethods.NullHandleRef; 617NativeMethods.RegionFlags originalRegionType = NativeMethods.RegionFlags.NULLREGION; 644NativeMethods.POINT lastViewPort = new NativeMethods.POINT(); 651NativeMethods.RECT originalClipRect = new NativeMethods.RECT(); 652originalRegionType = (NativeMethods.RegionFlags)SafeNativeMethods.GetRgnBox(hOriginalClippingRegion, ref originalClipRect); 653Debug.Assert(originalRegionType != NativeMethods.RegionFlags.ERROR, "ERROR returned from SelectClipRgn while selecting the original clipping region.."); 655if (originalRegionType == NativeMethods.RegionFlags.SIMPLEREGION) 661NativeMethods.RegionFlags combineResult = (NativeMethods.RegionFlags)SafeNativeMethods.CombineRgn(hClippingRegion, hClippingRegion, hOriginalClippingRegion, NativeMethods.RGN_AND); 662Debug.Assert((combineResult == NativeMethods.RegionFlags.SIMPLEREGION) || 663(combineResult == NativeMethods.RegionFlags.NULLREGION), 673originalRegionType = NativeMethods.RegionFlags.SIMPLEREGION; 677NativeMethods.RegionFlags selectResult = (NativeMethods.RegionFlags)SafeNativeMethods.SelectClipRgn(hDC, hClippingRegion); 678Debug.Assert((selectResult == NativeMethods.RegionFlags.SIMPLEREGION || 679selectResult == NativeMethods.RegionFlags.NULLREGION),