Desktop Functions: Smart Device Functions:
|
Search Results for "rect" in [All]opengl32
public enum FrontFaceDirection : uint
GL_PERSPECTIVE_CORRECTION_HINT = 0x0C50,
GL_SPOT_DIRECTION = 0x1204,
public static extern void glRectd(double x1, double y1, double x2, double y2);
public static extern void glRectdv(double[] v1, double[] v2);
public static extern void glRectf(float x1, float y1, float x2, float y2);
public static extern void glRectfv(float[] v1, float[] v2);
public static extern void glRecti(int x1, int y1, int x2, int y2);
public static extern void glRectiv(int[] v1, int[] v2);
public static extern void glRects(short x1, short y1, short x2, short y2);
public static extern void glRectsv(short[] v1, short[] v2); Constants2: BM_CLICK
RECT r;
//GetClientRect(mainFrame, &r);
//GetClientRect(mainFrame, &r);
GetClientRect(pls_frame, &r); 3: CB_
CB_GETDROPPEDCONTROLRECT = 0x0152,
public const int CB_GETDROPPEDCONTROLRECT = 0x0152;
CB_GETDROPPEDCONTROLRECT = &H152
Public Const CB_GETDROPPEDCONTROLRECT As Integer = &H152 4: EMR_
EMR_EXCLUDECLIPRECT = 29,
EMR_INTERSECTCLIPRECT = 30,
EMR_CREATEBRUSHINDIRECT = 39,
EMR_RECTANGLE = 43,
EMR_ROUNDRECT = 44,
EMR_SETARCDIRECTION = 57,
EMR_EXTCREATEFONTINDIRECTW = 82,
EMR_COLORCORRECTPALETTE =111, public const int FILE_ATTRIBUTE_DIRECTORY = 0x10;
Public Const FILE_ATTRIBUTE_DIRECTORY As Integer = &H10 6: GRADIENT_
GRADIENT_FILL_RECT_H = 0x00000000,
GRADIENT_FILL_RECT_V = 0x00000001, 7: IDANI_ // ported http://stackoverflow.com/questions/6218325/how-do-you-check-if-a-directory-exists-on-windows-in-c
public static bool DirectoryExists(string path)
return (attributes != INVALID_FILE_ATTRIBUTES && ((attributes & FILE_ATTRIBUTE_DIRECTORY) != 0)); 9: LR_
/// Returns the original hImage if it satisfies the criteria for the copy—that is, correct dimensions and color depth—in
''' Returns the original hImage if it satisfies the criteria for the copy—that is, correct dimensions and color depth—in 10: NERR_
public const int DevNotRedirected = 2107;
/// <summary> 2116 - The device or directory does not exist. </summary>
/// <summary> 2117 - The operation is invalid on a redirected resource. </summary>
public const int RedirectedPath = 2117;
/// <summary> 2232 - The parent directory could not be located. </summary>
/// <summary> 2319 - The information in the list of servers may be incorrect. </summary>
/// <summary> 2380 - The source path cannot be a directory. </summary>
/// <summary> 2450 - The user accounts database is not configured correctly. </summary>
/// <summary> 2481 - The UPS service is not configured correctly. </summary>
/// <summary> 2683 - A child or parent directory of the share is already in a Dfs. </summary> 11: PROPERTYKEY
public static PropertyKey PKEY_GPS_ImgDirection = new PropertyKey( 0x16473C91, 0xD017, 0x4ED9, 0xBA, 0x4D, 0xB6, 0xBA, 0xA5, 0x5D, 0xBC, 0xF8, 100);
public static PropertyKey PKEY_GPS_ImgDirectionDenominator = new PropertyKey( 0x10B24595, 0x41A2, 0x4E20, 0x93, 0xC2, 0x57, 0x61, 0xC1, 0x39, 0x5F, 0x32, 100);
public static PropertyKey PKEY_GPS_ImgDirectionNumerator = new PropertyKey( 0xDC5877C7, 0x225F, 0x45F7, 0xBA, 0xC7, 0xE8, 0x13, 0x34, 0xB6, 0x13, 0x0A, 100);
public static PropertyKey PKEY_GPS_ImgDirectionRef = new PropertyKey( 0xA4AAA5B7, 0x1AD0, 0x445F, 0x81, 0x1A, 0x0F, 0x8F, 0x6E, 0x67, 0xF6, 0xB5, 100);
public static PropertyKey PKEY_Search_IsClosedDirectory = new PropertyKey( 0x0B63E343, 0x9CCC, 0x11D0, 0xBC, 0xDB, 0x00, 0x80, 0x5F, 0xCC, 0xCE, 0x04, 23);
public static PropertyKey PKEY_Video_Director = new PropertyKey( 0x64440492, 0x4C8B, 0x11D1, 0x8B, 0x70, 0x08, 0x00, 0x36, 0xB1, 0x1A, 0x03, 20);
public static PropertyKey WPD_IMAGE_COLOR_CORRECTED_STATUS = new PropertyKey(0x63D64908, 0x9FA1, 0x479F, 0x85, 0xBA, 0x99, 0x52, 0x21, 0x64, 0x47, 0xDB, 5);
public static PropertyKey SENSOR_DATA_TYPE_WIND_DIRECTION_DEGREES_ANTICLOCKWISE = new PropertyKey(0X8B0AA2F1, 0X2D57, 0X42EE, 0X8C, 0XC0, 0X4D, 0X27, 0X62, 0X2B, 0X46, 0XC4, 5); //[VT_R4]
/// typeof(directshow.mediatype).InterpretGuidType(guid) returns: "Video")
/// typeof(directshow.mediatype).InterpretGuidType(guid) returns: "Video")
/// (directshow.mediatype.ListGuidTypes() returns: "Null", "Video", "Interleaved", "Audio", ...) 12: ShellAPI
public const int FOF_NORECURSION = 0x1000; // don't recurse into directories.
public const int SHIL_SYSSMALL = 3; // like SHIL_SMALL, but tracks system small icon metric correctly 13: ShellAPI
public const int FOF_NORECURSION = 0x1000; // don't recurse into directories.
public const int SHIL_SYSSMALL = 3; // like SHIL_SMALL, but tracks system small icon metric correctly 14: TCM_ public const UInt32 TCM_GETITEMRECT = (TCM_FIRST + 10);
// (BOOL)SNDMSG((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT FAR*)(prc)) public const UInt32 TCM_ADJUSTRECT = (TCM_FIRST + 40);
// (int)SNDMSG(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)bLarger, (LPARAM)(RECT FAR *)prc)
Private Const TCM_GETITEMRECT As UInt32 = (TCM_FIRST + 10)
' (BOOL)SNDMSG((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT FAR*)(prc))
Private Const TCM_ADJUSTRECT As UInt32 = (TCM_FIRST + 40)
' (int)SNDMSG(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)bLarger, (LPARAM)(RECT FAR *)prc) 15: WINERROR
/// Incorrect function.
/// The environment is incorrect.
/// An attempt was made to load a program with an incorrect format.
/// The directory cannot be removed.
public const int ERROR_CURRENT_DIRECTORY = 16;
/// The program issued a command but the command length is incorrect.
/// Windows cannot find the network path. Verify that the network path is correct and the destination computer is not busy or turned off. If Windows still cannot find the network path, contact your network administrator.
/// The network resource type is not correct.
/// The directory or file cannot be created.
/// The specified network password is not correct.
/// The parameter is incorrect.
/// The target internal file identifier is incorrect.
/// The IOCTL call made by the application program is not correct.
/// The verify-on-write switch parameter value is not correct.
/// The filename, directory name, or volume label syntax is incorrect.
/// The system call level is not correct.
public const int ERROR_DIRECT_ACCESS_HANDLE = 130;
/// The system tried to join a drive to a directory on a joined drive.
/// The system tried to substitute a drive to a directory on a substituted drive.
/// The system tried to join a drive to a directory on a substituted drive.
/// The system tried to SUBST a drive to a directory on a joined drive.
/// The system cannot join or substitute a drive to or for a directory on the same drive.
/// The directory is not a subdirectory of the root directory.
/// The directory is not empty.
/// An attempt was made to join or substitute a drive for which a directory on the drive is the target of a previous substitute.
/// The number of specified semaphore events for DosMuxSemWait is not correct.
/// The DosMuxSemWait list is not correct.
/// The address for the thread ID is not correct.
/// One or more arguments are not correct.
/// The system detected a segment number that was not correct.
/// The flag passed is not correct.
/// The global filename characters, * or ?, are entered incorrectly or too many global filename characters are specified.
/// The signal being posted is not correct.
/// The directory name is invalid.
public const int ERROR_DIRECTORY = 267;
/// When accessing a new tape of a multivolume partition, the current block size is incorrect.
/// A file was found, but it may not be the correct file.
public const int ERROR_INCORRECT_ADDRESS = 1241;
/// Unable to update the password. The value provided as the current password is incorrect.
/// The file or directory is corrupted and unreadable.
/// Logon Failure: The target account name is incorrect.
/// The Windows Installer Service could not be accessed. This can occur if you are running Windows in safe mode, or if the Windows Installer is not correctly installed. Contact your support personnel for assistance.
/// d that you have the correct upgrade patch.
/// The binding handle is not the correct type.
/// The redirector is in use and cannot be unloaded.
public const int ERROR_REDIRECTOR_HAS_OPEN_HANDLES = 1794;
/// The backup failed. Check the directory to which you are backing the database.
/// The file or directory is not a reparse point.
/// The group or resource is not in the correct state to perform the requested operation.
/// This computer cannot be made a member of a cluster because it does not have the correct version of Windows installed.
/// The directory has been disabled for encryption.
/// This is most often the result of a driver or system DLL requiring direct console access.
/// The file replication service API was called incorrectly.
/// An error occurred while installing the directory service. For more information, see the event log.
/// The directory service evaluated group memberships locally.
/// The specified directory service attribute or value does not exist.
/// The attribute syntax specified to the directory service is invalid.
/// The attribute type specified to the directory service is not defined.
/// The specified directory service attribute or value already exists.
/// The directory service is busy.
/// The directory service is unavailable.
/// The directory service was unable to allocate a relative identifier.
/// The directory service has exhausted the pool of relative identifiers.
/// The requested operation could not be performed because the directory service is not the master for that type of operation.
public const int ERROR_DS_INCORRECT_ROLE_OWNER = 8210;
/// The directory service was unable to initialize the subsystem that allocates relative identifiers.
/// The directory service can perform the requested operation only on a leaf object.
/// The directory service cannot perform the requested operation on the RDN attribute of an object.
/// The directory service detected an attempt to modify the object class of an object.
/// The requested policy information is only in the directory service.
/// An attempt was made to add an object to the directory with a name that is already in use.
/// Directory object not found.
/// A directory service error has occurred.
/// The directory service encountered an error parsing a name.
/// The directory service cannot get the attribute type for a name.
/// The operation could not be performed because the directory service is shutting down.
/// The directory service request is invalid.
/// The global catalog verification failed. The global catalog is not available or does not support the operation. Some part of the directory is currently not available.
/// The directory configuration parameter is missing from the registry.
/// The directory service encountered an internal failure.
/// The directory service encountered an unknown failure.
/// This directory server is shutting down, and cannot take ownership of new floating single-master operation roles.
/// The directory service is missing mandatory configuration information, and is unable to determine the ownership of floating single-master operation roles.
/// The directory service was unable to transfer ownership of one or more floating single-master operation roles to other servers.
/// The directory service is too busy to complete the replication operation at this time.
/// The requested operation is not supported by this version of the directory service.
/// The version of the Active Directory schema of the source forest is not compatible with the version of Active Directory on this computer. You must upgrade the operating system on a domain controller in the source forest before this computer can be added as a domain controller to that forest.
/// The OM-Object-Class specified is incorrect for an attribute with the specified syntax.
/// The requested operation requires a directory service, and none was available.
/// The directory cannot validate the proposed naming context name because it does not hold a replica of the naming context above the proposed naming context. Please ensure that the domain naming master role is held by a server that is configured as a global catalog server, and that the server is up to date with its replication partners. (Applies only to Windows 2000 Domain Naming masters)
/// The directory service failed to lock a tree in preparation for a tree deletion because the tree was in use.
/// The directory service failed to identify the list of objects to delete while attempting a tree deletion.
/// Error Status: 0x%2. Click OK to shut down the system and reboot into Directory Services Restore Mode. Check the event log for detailed information.
/// Adding a new mandatory attribute to an existing class, deleting a mandatory attribute from an existing class, or adding an optional attribute to the special class Top that is not a backlink attribute (directly or through inheritance, for example, by adding or deleting an auxiliary class) is not allowed.
/// The replica/child install failed to read the objectVersion attribute in the SCHEMA section of the file schema.ini in the system32 directory.
/// The syntax of the linked attribute being added is incorrect. Forward links can only have syntax 2.5.5.1, 2.5.5.7, and 2.5.5.14, and backlinks can only have syntax 2.5.5.1
/// Directory Service cannot start.
/// Directory Services could not start.
/// Critical Directory Service System objects cannot be deleted during tree delete operations. The tree delete may have been partially performed.
/// Directory Services could not start because of the following error: %1.
/// This version of Windows is too old to support the current directory forest behavior. You must upgrade the operating system on this server before it can become a domain controller in this forest.
/// This version of Windows no longer supports the behavior version in use in this directory forest. You must advance the forest behavior version before this server can become a domain controller in the forest.
/// Could not access a partition of the Active Directory located on a remote server. Make sure at least one server is running for the partition in question.
/// The directory cannot validate the proposed naming context (or partition) name because it does not hold a replica nor can it contact a replica of the naming context above the proposed naming context. Please ensure that the parent naming context is properly registered in DNS, and at least one replica of this naming context is reachable by the Domain Naming master.
/// The Directory Service failed to enter single user mode.
/// The Directory Service cannot parse the script because of a syntax error.
/// The Directory Service cannot process the script because of an error.
/// The directory service cannot perform the requested operation because the servers
/// The directory service binding must be renegotiated due to a change in the server
/// The directory service failed to authorize the request.
/// The Directory Service cannot process the script because it is invalid.
/// The directory service is unavailable.
/// DNS zone already exists in the directory service.
/// DNS server not creating or reading the boot file for the directory service integrated DNS zone.
/// The specified directory partition does not exist.
/// The specified directory partition already exists.
/// The DS is not enlisted in the specified directory partition.
/// The DS is already enlisted in the specified directory partition.
/// A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous shutdown call.
/// Cannot remove a directory that is not empty.
/// The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for.
/// An incorrect number of QOS FILTERSPECs were specified in the FLOWDESCRIPTOR.
/// An incorrect number of flow descriptors was specified in the QOS structure.
/// This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.
/// Two or more components referenced directly or indirectly by the application manifest have files by the same name.
/// Two or more components referenced directly or indirectly by the application manifest have window classes with the same name.
/// Two or more components referenced directly or indirectly by the application manifest have the same COM server CLSIDs.
/// Two or more components referenced directly or indirectly by the application manifest have proxies for the same COM interface IIDs.
/// Two or more components referenced directly or indirectly by the application manifest have the same COM type library TLBIDs.
/// Two or more components referenced directly or indirectly by the application manifest have the same COM ProgIDs.
/// Two or more components referenced directly or indirectly by the application manifest are different versions of the same component which is not permitted.
/// Manifest Parse Error : Incorrect syntax was used in a comment.
/// Failed to obtain new SPI for the inbound SA from Ipsec driver. The most common cause for this is that the driver does not have the correct filter. Check your policy to verify the filters.
/// The server process could not be started. The pathname may be incorrect.
/// The server process could not be started as the configured identity. The pathname may be incorrect or unavailable.
/// The server process could not be started because the configured identity is incorrect. Check the username and password.
/// Incorrect function.
/// Invalid rectangle
public const int OLE_E_INVALIDRECT = (int)(0x8004000D - 0x100000000);
/// No package in the software installation data in the Active Directory meets this criteria.
/// An error occurred in the software installation data in the Active Directory.
/// No package in the software installation data in the Active Directory meets this criteria.
/// Deleting this will break the referential integrity of the software installation data in the Active Directory.
/// The CLSID was not found in the software installation data in the Active Directory.
/// The software installation data in the Active Directory is corrupt.
/// There is no software installation data in the Active Directory.
/// There is no software installation data object in the Active Directory.
/// The software installation data object in the Active Directory already exists.
/// The path to the software installation data in the Active Directory is not correct.
/// The schema for the software installation data in the Active Directory does not match the required schema.
/// An error occurred in the software installation data in the Active Directory.
/// Contents of the OLESTREAM not in correct format
/// Contents of the IStorage not in correct format
/// The COM+ component you created must use object construction to work correctly.
/// Incorrect inheritance depth in standard OLE hmember.
/// The data packet with the marshalled parameter data is incorrect.
/// Unable to obtain the Windows directory
/// Provider DLL failed to initialize correctly.
/// The target principal name is incorrect.
/// The client cert name does not matches the user name or the KDC name is incorrect.
/// Client's supplied SSPI channel bindings were incorrect.
/// The hash value is not correct.
/// Not a cryptographic message or the cryptographic message is not formatted correctly.
/// The request is incorrectly formatted. The encrypted private key must be in an unauthenticated attribute in an outermost signature.
/// The Active Directory GUID is unavailable and cannot be added to the Subject Alternate name.
public const int CERTSRV_E_SUBJECT_DIRECTORY_GUID_REQUIRED = (int)(0x8009480E - 0x100000000);
/// The magic number in the head table is incorrect.
/// The offset table has incorrect values.
/// A table checksum is incorrect.
/// The file checksum is incorrect.
/// The signature does not have the correct attributes for the policy.
/// The structure of the DSIG table is incorrect.
/// The validity periods of the certification chain do not nest correctly.
/// A certification chain processed correctly, but one of the CA certificates is not trusted by the policy provider.
/// An INF was copied into the Windows INF directory in an improper manner.
public const int SPAPI_E_INCORRECTLY_COPIED_INF = (int)(0x800F0237 - 0x100000000);
/// The identified directory does not exist in the smart card.
/// The supplied path does not represent a smart card directory.
/// The supplied PIN is incorrect.
/// Application install directory not found 16: WINNT
private const uint FILE_ATTRIBUTE_DIRECTORY = 0x00000010; 17: WM
user3218: AdjustWindowRect
static extern bool AdjustWindowRectEx(ref Rect lpRect, uint dwStyle,
Public Function AdjustWindowRectEx(<MarshalAs(UnmanagedType.Struct)>byref lpRect As RECT, _
Public Declare Function AdjustWindowRectEx Lib "user32" _
(lpRect As RECT, _ System.Windows.Rect
static extern bool AdjustWindowRectEx(ref RECT lpRect, uint dwStyle,
Public Function AdjustWindowRectEx(<MarshalAs(UnmanagedType.Struct)>byref lpRect As RECT, _
Public Declare Function AdjustWindowRectEx Lib "user32" _
(lpRect As RECT, _ 20: AlignRects The multiple-window-position structure is an internal structure; an application cannot access it directly. 22: BlockInput Useful to create a temporary block in input for sensitive GUI operations. For instance when manually activating a screen saver from within a GUI function, a short blocking delay will prevent the user mouse movements directly after selection from accidently escaping the screen saver. 23: CallNextHookEx
/// installed hooks will not receive hook notifications and may behave incorrectly as a result. You should call 24: CascadeWindows
IntPtr lpRect, uint cKids, IntPtr [] lpKids); 25: ClientRectangle
static extern TODO ClientRectangle(TODO);
Declare Function ClientRectangle Lib "user32.dll" (TODO) As TODO 26: ClientToScreen
Control.RectangleToScreen 27: ClipCursor
static extern bool ClipCursor(ref RECT lpRect);
Private Declare Function ClipCursor Lib "user32"(ByRef lpRect As RECT) As Long
public struct RECT
/// Left position of the rectangle.
/// Top position of the rectangle.
/// Right position of the rectangle.
/// Bottom position of the rectangle.
/// Operator to convert a RECT to Drawing.Rectangle.
/// <param name="rect">Rectangle to convert.</param>
/// <returns>A Drawing.Rectangle</returns>
public static implicit operator Rectangle(RECT rect)
return Rectangle.FromLTRB(rect.Left, rect.Top, rect.Right, rect.Bottom);
/// Operator to convert Drawing.Rectangle to a RECT.
/// <param name="rect">Rectangle to convert.</param>
/// <returns>RECT rectangle.</returns>
public static implicit operator RECT(Rectangle rect)
return new RECT(rect.Left, rect.Top, rect.Right, rect.Bottom);
public RECT(int left, int top, int right, int bottom)
RECT rect =new RECT( 10, 10, 20, 20 );
ClipCursor(ref rect); 28: CopyIcon
string folderPath = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); 29: CopyRect 30: CreateDesktop If you come across this error "System.Runtime.InteropServices.MarshalDirectiveException: Cannot marshal 'parameter #6': Invalid managed/unmanaged type combination (this value type must be paired with Struct).", you may want to use 32: CreateIcon
static extern IntPtr CreateIconIndirect([In] ref ICONINFO piconinfo);
private static extern IntPtr CreateIconIndirect([In] ref ICONINFO iconInfo);
IntPtr handle = CreateIconIndirect(ref ii);
static extern IntPtr CreateIconIndirect([In] ref ICONINFO piconinfo);
private static extern IntPtr CreateIconIndirect([In] ref ICONINFO iconInfo);
IntPtr handle = CreateIconIndirect(ref ii); 34: CreatePopupMenu
// Get info about the directory 35: CreateWindowEx
RECT rect;
Win32.GetClientRect (hWnd, out rect) ;
Win32.DrawText (hdc, "Hello, Windows 98!", -1, ref rect, Either use this name directly or modify the first line of the signature to:
static extern bool DrawAnimatedRects(IntPtr hwnd, int idAni,
[In] ref RECT lprcFrom, [In] ref RECT lprcTo); Since only IDANI_CAPTION is implemented, to get the effect of IDANI_OPEN, simply swap the lprcFrom and lprcTo rectangles, but still specify the IDANI_CAPTION constant.
struct RECT
public RECT(System.Drawing.Rectangle rectangle)
Left = rectangle.Left;
Top = rectangle.Top;
Right = rectangle.Right;
Bottom = rectangle.Bottom;
public RECT(System.Drawing.Point location, System.Drawing.Size size)
static extern bool DrawAnimatedRects(System.IntPtr hwnd, int idAni,
[System.Runtime.InteropServices.In] ref RECT lprcFrom,
[System.Runtime.InteropServices.In] ref RECT lprcTo);
static extern bool GetWindowRect(System.IntPtr hWnd, out RECT lpRect);
RECT from = new RECT(form.Location, form.Size);
RECT to;
GetWindowRect(hWnd, out to);
DrawAnimatedRects(form.Handle, IDANI_CAPTION, ref to, ref from);
DrawAnimatedRects(form.Handle, IDANI_CAPTION, ref from, ref to);
ref struct RECT {
RECT() {
RECT(System::Drawing::Rectangle rectangle) {
Left = rectangle.Left;
Top = rectangle.Top;
Right = rectangle.Right;
Bottom = rectangle.Bottom;
RECT(System::Drawing::Point location, System::Drawing::Size size) {
bool DrawAnimatedRects(int hwnd, int idAni, RECT^ lprcFrom, RECT^ lprcTo);
bool GetWindowRect(int hWnd, RECT^ lpRect);
RECT^ from=gcnew RECT(this->Location, this->Size);
RECT^ to=gcnew RECT();
GetWindowRect(hWnd, to);
DrawAnimatedRects(this->Handle.ToInt32(), IDANI_CAPTION, to, from);
DrawAnimatedRects(this->Handle.ToInt32(), IDANI_CAPTION, from, to); 39: DrawEdge
static extern bool DrawEdge(IntPtr hdc, ref RECT qrc, uint edge, 40: DrawFocusRect
static extern bool DrawFocusRect(IntPtr hDC, [In] ref RECT lprc);
Public Declare Auto Function DrawFocusRect Lib "user32" ( _
ByRef lpRect As Rect _
<StructLayout(LayoutKind.Explicit)> Public Structure Rect Where DrawFocusRect is used:
Dim FR As Win32.Rect
FR = New Win32.Rect
Win32.DrawFocusRect(hdc, FR) 'static/shared method
// The following style can be used to adjust the bounding rectangle of the push button.
/// Bounding rectangle is adjusted to exclude the surrounding edge of the push button.
DFCS_ADJUSTRECT = 0x2000, 42: DrawText
ref RECT lprc, uint dwDTFormat, ref DRAWTEXTPARAMS lpDTParams); private const int DT_CALCRECT = 0x00000400; 43: DrawTextEx
ref RECT lprc, uint dwDTFormat, ref DRAWTEXTPARAMS lpDTParams);
delegate bool MonitorEnumDelegate(IntPtr hMonitor, IntPtr hdcMonitor, ref Rect lprcMonitor, IntPtr dwData);
public struct Rect
public Rect MonitorArea { get; set; }
public Rect WorkArea { get; set; }
delegate (IntPtr hMonitor, IntPtr hdcMonitor, ref Rect lprcMonitor, IntPtr dwData) 45: EqualRect 46: FillRect
static extern int FillRect(IntPtr hDC, [In] ref RECT lprc, IntPtr hbr);
Private Shared Function FillRect(hDC As IntPtr, ByRef lprc As RECT, hbr As IntPtr) As Integer 47: FrameRect 48: GetClientRect
static extern bool GetClientRect(IntPtr hWnd, out RECT lpRect);
Private Shared Function GetClientRect(ByVal hWnd As System.IntPtr, _
ByRef lpRECT As RECT) As Integer The Win32 RECT structure is not compatible with the .NET System.Drawing.Rectangle structure.
public static RECT GetClientRect(IntPtr hWnd)
RECT result;
GetClientRect(hWnd, out result);
RECT clientRect = GetClientRect(handle); ClientRectangle property of the System.Windows.Forms.Control class 49: GetComboBoxInfo 50: GetCursorInfo 51: GetDCEx
/// <summary>DCX_WINDOW: Returns a DC that corresponds to the window rectangle rather
/// than the client rectangle.</summary> 52: GetGUIThreadInfo
public System.Drawing.Rectangle rcCaret;
public System.Drawing.Rectangle rcCaret;
internal struct Rect
public Rect rcCaret; 53: GetMenuItemRect 54: GetMonitorInfo internal delegate bool MonitorEnumProc(IntPtr hMonitor, IntPtr hdcMonitor, ref RECT lprcMonitor, IntPtr dwData); private bool MonitorEnumCallBack(IntPtr hMonitor, IntPtr hdcMonitor, ref RECT lprcMonitor, IntPtr dwData) 55: GetParent DoNotIndirectlyExposeMethodsWithLinkDemands 'NativeMethods.GetParentSafe(IntPtr)' calls into 'Marshal.GetLastWin32Error()' which has a LinkDemand. By making this call, 'Marshal.GetLastWin32Error()' is indirectly exposed to user code. Review the following protection: 56: GetScrollBarInfo
public Rectangle rcScrollBar; This didn't work for me with the Rectangle type for SCROLLBARINFO.rcScrollBar. To rectify this I altered this declaration to type RECT using the following standard definition.
public struct RECT 57: GetScrollInfo
Declare Function GetScrollInfo Lib "user32" (ByVal hWnd As IntPtr, ByVal fnBar As ScrollBarDirection, ByRef lpsi As SCROLLINFO) As Integer
GetScrollInfo( RichTextBox1.Handle, (int) ScrollBarDirection.SB_HORZ, ref si ); 58: GetSystemMetrics The SM_ARRANGE setting specifies how the system arranges minimized windows, and consists of a starting position and a direction. The starting position can be one of the following values. The direction in which to arrange can be one of the following values. 59: GetUpdateRect
public extern static bool GetUpdateRect(IntPtr hWnd, ref RECT rect, bool bErase);
Private Shared Function GetUpdateRect(ByVal hWnd As IntPtr, ByRef rect As RECT, ByVal bErase As Boolean) As Boolean
Dim rRect As New RECT
GetUpdateRect(Me.Handle, rRect, bErase) 60: GetWindowInfo Note that the members of the RECT structure should be int, not long. In some other API functions they are long, so this can be confusing. Cut off search results after 60. Please refine your search. |