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
- GridViewColumnHeader.cs
- NegotiateStream.cs
- IssuedTokenServiceCredential.cs
- AppSettingsReader.cs
- SystemResourceHost.cs
- MailFileEditor.cs
- RelationshipConverter.cs
- NamedPermissionSet.cs
- Logging.cs
- _BasicClient.cs
- VerificationException.cs
- RelatedEnd.cs
- EndpointPerformanceCounters.cs
- PrintingPermissionAttribute.cs
- OrderedParallelQuery.cs
- WebHttpSecurity.cs
- IncrementalReadDecoders.cs
- ComboBox.cs
- KeyEvent.cs
- WindowsListViewItem.cs
- wgx_exports.cs
- ConnectionConsumerAttribute.cs
- SqlDataSourceStatusEventArgs.cs
- DataGridViewAccessibleObject.cs
- BuildProviderCollection.cs
- DataBoundControlHelper.cs
- ConfigXmlElement.cs
- GridViewRow.cs
- BlurBitmapEffect.cs
- WorkflowPersistenceService.cs
- ZipIOExtraFieldPaddingElement.cs
- LineServicesRun.cs
- MediaElement.cs
- InteropExecutor.cs
- StoreContentChangedEventArgs.cs
- StorageAssociationTypeMapping.cs
- SqlReferenceCollection.cs
- UTF32Encoding.cs
- EditorServiceContext.cs
- Win32MouseDevice.cs
- ObjectNotFoundException.cs
- PartialTrustHelpers.cs
- PreApplicationStartMethodAttribute.cs
- PointLight.cs
- SoapBinding.cs
- ipaddressinformationcollection.cs
- Blend.cs
- UserControlParser.cs
- EntityProviderFactory.cs
- Cursor.cs
- ArraySegment.cs
- SelectionRangeConverter.cs
- ToolBar.cs
- ToolStripItemCollection.cs
- ButtonColumn.cs
- SerializationInfo.cs
- ConfigViewGenerator.cs
- DataGridViewColumnConverter.cs
- MetadataStore.cs
- TypefaceMap.cs
- MembershipSection.cs
- PrimitiveSchema.cs
- SafeCryptHandles.cs
- PropertyInfoSet.cs
- QilParameter.cs
- NewExpression.cs
- DurableTimerExtension.cs
- DataGridViewColumnCollection.cs
- FrameSecurityDescriptor.cs
- DbModificationCommandTree.cs
- _KerberosClient.cs
- MaterialGroup.cs
- SqlGatherProducedAliases.cs
- SrgsElement.cs
- PrimarySelectionGlyph.cs
- TextComposition.cs
- FrameworkReadOnlyPropertyMetadata.cs
- HasCopySemanticsAttribute.cs
- XmlSchemaAttributeGroupRef.cs
- XmlSchemaObject.cs
- WeakRefEnumerator.cs
- AuthenticationModuleElementCollection.cs
- SiteMapDataSourceView.cs
- TypeForwardedToAttribute.cs
- TargetException.cs
- UniformGrid.cs
- AbsoluteQuery.cs
- UnmanagedHandle.cs
- _PooledStream.cs
- MetafileHeader.cs
- TextAnchor.cs
- ColorConverter.cs
- WsatConfiguration.cs
- AggregationMinMaxHelpers.cs
- JournalEntryStack.cs
- WebBrowserHelper.cs
- EventMappingSettings.cs
- FixedSchema.cs
- ZipIOLocalFileHeader.cs
- AudienceUriMode.cs