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