1
// Copyright (c) 2006, Gustavo Franco
2
// Email: gustavo_franco@hotmail.com
3
// All rights reserved.
5
// Redistribution and use in source and binary forms, with or without modification,
6
// are permitted provided that the following conditions are met:
8
// Redistributions of source code must retain the above copyright notice,
9
// this list of conditions and the following disclaimer.
10
// Redistributions in binary form must reproduce the above copyright notice,
11
// this list of conditions and the following disclaimer in the documentation
12
// and/or other materials provided with the distribution.
14
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
15
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
16
// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
17
// PURPOSE. IT CAN BE DISTRIBUTED FREE OF CHARGE AS LONG AS THIS HEADER
23
using System.Collections.Generic;
24
using System.Runtime.InteropServices;
26
namespace CustomControls.OS
29
[Author("Franco, Gustavo")]
30
[StructLayout(LayoutKind.Sequential)]
31
public struct WINDOWINFO
36
public UInt32 dwStyle;
37
public UInt32 dwExStyle;
38
public UInt32 dwWindowStatus;
39
public UInt32 cxWindowBorders;
40
public UInt32 cyWindowBorders;
41
public UInt16 atomWindowType;
42
public UInt16 wCreatorVersion;
47
[Author("Franco, Gustavo")]
48
[StructLayout(LayoutKind.Sequential)]
55
public POINT(int x, int y)
61
public POINT(Point point)
71
[Author("Franco, Gustavo")]
72
[StructLayout(LayoutKind.Sequential)]
83
get {return new POINT((int) left, (int) top);}
86
right -= (left - (uint) value.x);
87
bottom -= (bottom - (uint) value.y);
88
left = (uint) value.x;
95
get {return right - left;}
96
set {right = left + value;}
101
get {return bottom - top;}
102
set {bottom = top + value;}
107
public override string ToString()
109
return left + ":" + top + ":" + right + ":" + bottom;
116
[Author("Franco, Gustavo")]
117
[StructLayout(LayoutKind.Sequential)]
118
public struct WINDOWPOS
121
public IntPtr hwndAfter;
129
public override string ToString()
131
return x + ":" + y + ":" + cx + ":" + cy + ":" + ((SWP_Flags) flags).ToString();
137
#region NCCALCSIZE_PARAMS
138
public struct NCCALCSIZE_PARAMS
150
public IntPtr hwndFrom;
151
public IntPtr idFrom;
157
[Author("Franco, Gustavo")]
158
[StructLayout(LayoutKind.Sequential)]
159
public struct OFNOTIFY
162
public IntPtr OPENFILENAME;
163
public IntPtr fileNameShareViolation;
167
[StructLayout(LayoutKind.Sequential)]
168
public struct SHFILEINFO
172
public uint dwAttributes;
173
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)]
174
public string szDisplayName;
175
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
176
public string szTypeName;