Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / Drawing / System / Drawing / Design / NativeMethods.cs / 1 / NativeMethods.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Drawing.Design { using System.Runtime.InteropServices; using System; using System.Diagnostics.CodeAnalysis; using System.Security.Permissions; using System.Collections; using System.IO; using System.Text; internal class NativeMethods { private NativeMethods() {} public static IntPtr InvalidIntPtr = ((IntPtr)((int)(-1))); public const int EM_GETSEL = 0x00B0, EM_SETSEL = 0x00B1, EM_GETRECT = 0x00B2, EM_SETRECT = 0x00B3, EM_SETRECTNP = 0x00B4, EM_SCROLL = 0x00B5, EM_LINESCROLL = 0x00B6, EM_SCROLLCARET = 0x00B7, EM_GETMODIFY = 0x00B8, EM_SETMODIFY = 0x00B9, EM_GETLINECOUNT = 0x00BA, EM_LINEINDEX = 0x00BB, EM_SETHANDLE = 0x00BC, EM_GETHANDLE = 0x00BD, EM_GETTHUMB = 0x00BE, EM_LINELENGTH = 0x00C1, EM_REPLACESEL = 0x00C2, EM_GETLINE = 0x00C4, EM_LIMITTEXT = 0x00C5, EM_CANUNDO = 0x00C6, EM_UNDO = 0x00C7, EM_FMTLINES = 0x00C8, EM_LINEFROMCHAR = 0x00C9, EM_SETTABSTOPS = 0x00CB, EM_SETPASSWORDCHAR = 0x00CC, EM_EMPTYUNDOBUFFER = 0x00CD, EM_GETFIRSTVISIBLELINE = 0x00CE, EM_SETREADONLY = 0x00CF, EM_SETWORDBREAKPROC = 0x00D0, EM_GETWORDBREAKPROC = 0x00D1, EM_GETPASSWORDCHAR = 0x00D2, EM_SETMARGINS = 0x00D3, EM_GETMARGINS = 0x00D4, EM_SETLIMITTEXT = 0x00C5, EM_GETLIMITTEXT = 0x00D5, EM_POSFROMCHAR = 0x00D6, EM_CHARFROMPOS = 0x00D7, EC_LEFTMARGIN = 0x0001, EC_RIGHTMARGIN = 0x0002, EC_USEFONTINFO = 0xffff, IDOK = 1, IDCANCEL = 2, IDABORT = 3, IDRETRY = 4, IDIGNORE = 5, IDYES = 6, IDNO = 7, IDCLOSE = 8, IDHELP = 9, WM_INITDIALOG = 0x0110, SWP_NOSIZE = 0x0001, SWP_NOMOVE = 0x0002, SWP_NOZORDER = 0x0004, SWP_NOREDRAW = 0x0008, SWP_NOACTIVATE = 0x0010, SWP_FRAMECHANGED = 0x0020, SWP_SHOWWINDOW = 0x0040, SWP_HIDEWINDOW = 0x0080, SWP_NOCOPYBITS = 0x0100, SWP_NOOWNERZORDER = 0x0200, SWP_NOSENDCHANGING = 0x0400, SWP_DRAWFRAME = 0x0020, SWP_NOREPOSITION = 0x0200, SWP_DEFERERASE = 0x2000, SWP_ASYNCWINDOWPOS = 0x4000, WM_COMMAND = 0x0111, CC_FULLOPEN = 0x00000002, CC_PREVENTFULLOPEN = 0x00000004, CC_SHOWHELP = 0x00000008, CC_ENABLEHOOK = 0x00000010, CC_ENABLETEMPLATE = 0x00000020, CC_ENABLETEMPLATEHANDLE = 0x00000040, CC_SOLIDCOLOR = 0x00000080, CC_ANYCOLOR = 0x00000100; [DllImport(ExternDll.User32, CharSet=System.Runtime.InteropServices.CharSet.Auto)] public extern static IntPtr SendDlgItemMessage(IntPtr hDlg, int nIDDlgItem, int Msg, IntPtr wParam, IntPtr lParam); [DllImport(ExternDll.User32, ExactSpelling=true, CharSet=System.Runtime.InteropServices.CharSet.Auto)] public static extern IntPtr GetDlgItem(IntPtr hWnd, int nIDDlgItem); [DllImport(ExternDll.User32, ExactSpelling=true, CharSet=System.Runtime.InteropServices.CharSet.Auto)] public static extern bool EnableWindow(IntPtr hWnd, bool enable); [DllImport(ExternDll.User32, ExactSpelling=true, CharSet=System.Runtime.InteropServices.CharSet.Auto)] public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, int flags); [DllImport(ExternDll.User32, ExactSpelling=true, CharSet=System.Runtime.InteropServices.CharSet.Auto)] public static extern int GetDlgItemInt(IntPtr hWnd, int nIDDlgItem, bool[] err, bool signed); [DllImport(ExternDll.User32, CharSet=System.Runtime.InteropServices.CharSet.Auto)] public static extern IntPtr PostMessage(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam); [ System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode) ] public class Util { private Util() {} public static int MAKELONG(int low, int high) { return (high << 16) | (low & 0xffff); } [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] public static int MAKELPARAM(int low, int high) { return (high << 16) | (low & 0xffff); } [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] public static int HIWORD(int n) { return (n >> 16) & 0xffff; } public static int LOWORD(int n) { return n & 0xffff; } [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] public static int SignedHIWORD(int n) { int i = (int)(short)((n >> 16) & 0xffff); i = i << 16; i = i >> 16; return i; } [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] public static int SignedLOWORD(int n) { int i = (int)(short)(n & 0xFFFF); i = i << 16; i = i >> 16; return i; } [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [DllImport(ExternDll.Kernel32, CharSet=System.Runtime.InteropServices.CharSet.Auto)] private static extern int lstrlen(String s); [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [DllImport(ExternDll.User32, CharSet=System.Runtime.InteropServices.CharSet.Auto)] internal static extern int RegisterWindowMessage(String msg); } [StructLayout(LayoutKind.Sequential)] public class POINT { public int x; public int y; [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] public POINT() { } public POINT(int x, int y) { this.x = x; this.y = y; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebPartZoneCollection.cs
- ObjectDataSourceEventArgs.cs
- RuntimeConfig.cs
- RubberbandSelector.cs
- Visual3D.cs
- KerberosRequestorSecurityToken.cs
- SplitterPanelDesigner.cs
- MediaCommands.cs
- wgx_exports.cs
- TextReader.cs
- SecurityDocument.cs
- Html32TextWriter.cs
- FileUpload.cs
- InternalResources.cs
- XpsFilter.cs
- XmlILAnnotation.cs
- QueryOperatorEnumerator.cs
- ResourceDictionary.cs
- VersionPair.cs
- WeakReference.cs
- ComplexLine.cs
- SecurityTokenValidationException.cs
- QueryOutputWriter.cs
- FixedPageProcessor.cs
- FormParameter.cs
- MenuDesigner.cs
- SingleAnimationBase.cs
- SelectionItemPattern.cs
- XsdBuilder.cs
- HatchBrush.cs
- GlobalizationAssembly.cs
- Animatable.cs
- _SingleItemRequestCache.cs
- ComplusEndpointConfigContainer.cs
- QuotedPrintableStream.cs
- BoolExpr.cs
- XmlSchemaAppInfo.cs
- FixedElement.cs
- StylusPointDescription.cs
- ExternalCalls.cs
- cookieexception.cs
- NamespaceEmitter.cs
- IndependentAnimationStorage.cs
- CommonProperties.cs
- FormatConvertedBitmap.cs
- NonBatchDirectoryCompiler.cs
- EventPrivateKey.cs
- OAVariantLib.cs
- XsltLoader.cs
- RtfToXamlReader.cs
- PackageDigitalSignature.cs
- ImageCodecInfoPrivate.cs
- HttpCookiesSection.cs
- StateMachineDesignerPaint.cs
- _Win32.cs
- RawStylusSystemGestureInputReport.cs
- XmlQueryCardinality.cs
- MenuBindingsEditorForm.cs
- NestPullup.cs
- WindowsPrincipal.cs
- WindowsListViewItemStartMenu.cs
- ExpressionPrefixAttribute.cs
- WindowHelperService.cs
- XmlSchemaSimpleContentExtension.cs
- ControlParameter.cs
- XmlFormatWriterGenerator.cs
- DesignerRegion.cs
- HttpListenerContext.cs
- WindowsToolbar.cs
- DefaultObjectMappingItemCollection.cs
- TreeNodeConverter.cs
- AbstractSvcMapFileLoader.cs
- shaperfactoryquerycachekey.cs
- OleDbConnectionInternal.cs
- ToolStripProgressBar.cs
- TileBrush.cs
- TreeNodeStyle.cs
- Mouse.cs
- SortedDictionary.cs
- StringUtil.cs
- MergeFilterQuery.cs
- regiisutil.cs
- CodeLabeledStatement.cs
- HMACMD5.cs
- TextTreeUndoUnit.cs
- CommandDevice.cs
- AnimatedTypeHelpers.cs
- DocumentViewerHelper.cs
- ObjectDataSourceDisposingEventArgs.cs
- System.Data_BID.cs
- PolyQuadraticBezierSegment.cs
- GlyphInfoList.cs
- StorageEntityTypeMapping.cs
- ElementInit.cs
- TriggerBase.cs
- SafeRegistryHandle.cs
- remotingproxy.cs
- RayHitTestParameters.cs
- ProcessHostMapPath.cs
- MasterPage.cs