3 // Permission is hereby granted, free of charge, to any person obtaining
4 // a copy of this software and associated documentation files (the
5 // "Software"), to deal in the Software without restriction, including
6 // without limitation the rights to use, copy, modify, merge, publish,
7 // distribute, sublicense, and/or sell copies of the Software, and to
8 // permit persons to whom the Software is furnished to do so, subject to
9 // the following conditions:
11 // The above copyright notice and this permission notice shall be
12 // included in all copies or substantial portions of the Software.
14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 * Copyright (C) 5/11/2002 Carlos Harvey Perez
24 * Modifcations and additons, Copyright Ximian 2002/3
26 * Permission is hereby granted, free of charge, to any person obtaining
27 * a copy of this software and associated documentation files (the
28 * "Software"), to deal in the Software without restriction, including
29 * without limitation the rights to use, copy, modify, merge, publish,
30 * distribute, sublicense, and/or sell copies of the Software, and to
31 * permit persons to whom the Software is furnished to do so, subject
32 * to the following conditions:
34 * The above copyright notice and this permission notice shall be
35 * included in all copies or substantial portions of the Software.
37 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
38 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
39 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
41 * IN NO EVENT SHALL CARLOS HARVEY PEREZ BE LIABLE FOR ANY CLAIM,
42 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
43 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
44 * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
46 * Except as contained in this notice, the name of Carlos Harvey Perez
47 * shall not be used in advertising or otherwise to promote the sale,
48 * use or other dealings in this Software without prior written
49 * authorization from Carlos Harvey Perez.
53 Note. Please, take into account the Windows types defintion
55 http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog/winprog/windows_data_types.asp
57 Typically: DWORD=uint, Handles=IntPtr, WORD=ushort, etc
63 using System
.Runtime
.InteropServices
;
65 using System
.Diagnostics
;
67 //namespace UtilityLibrary.Win32
68 namespace System
.Windows
.Forms
72 /// Structures to interoperate with the Windows 32 API
76 [StructLayout(LayoutKind
.Sequential
)]
85 [StructLayout(LayoutKind
.Sequential
)]
95 #region INITCOMMONCONTROLSEX
96 [StructLayout(LayoutKind
.Sequential
, Pack
=1)]
97 internal class INITCOMMONCONTROLSEX
99 internal int dwSize
= 8;
100 internal CommonControlInitFlags dwICC
;
105 [StructLayout(LayoutKind
.Sequential
, Pack
=1)]
106 internal struct TBBUTTON
108 internal int iBitmap
;
109 internal int idCommand
;
110 internal byte fsState
;
111 internal byte fsStyle
;
112 internal byte bReserved0
;
113 internal byte bReserved1
;
115 internal int iString
;
120 [StructLayout(LayoutKind
.Sequential
)]
121 internal struct POINT
129 [StructLayout(LayoutKind
.Sequential
)]
130 internal struct MINMAXINFO
132 internal POINT ptReserved
;
133 internal POINT ptMaxSize
;
134 internal POINT ptMaxPosition
;
135 internal POINT ptMinTrackSize
;
136 internal POINT ptMaxTrackSize
;
141 [StructLayout(LayoutKind
.Sequential
)]
142 internal struct WINDOWPOS
{
143 internal IntPtr hwnd
;
144 internal IntPtr hwndInsertAfter
;
154 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
)]
155 internal struct NMHDR
157 internal IntPtr hwndFrom
;
164 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
)]
165 internal struct TOOLTIPTEXTA
168 internal IntPtr lpszText
;
169 [MarshalAs(UnmanagedType
.ByValTStr
, SizeConst
=80)]
170 internal string szText
;
171 internal IntPtr hinst
;
172 internal ToolTipFlags flags
;
177 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Auto
)]
178 internal struct TOOLTIPTEXT
181 internal IntPtr lpszText
;
182 [MarshalAs(UnmanagedType
.ByValTStr
, SizeConst
=80)]
183 internal string szText
;
184 internal IntPtr hinst
;
190 [StructLayout(LayoutKind
.Sequential
)]
191 internal struct NMCUSTOMDRAW
194 internal uint dwDrawStage
;
197 internal int dwItemSpec
;
198 internal uint uItemState
;
199 internal IntPtr lItemlParam
;
203 #region NMTBCUSTOMDRAW
204 [StructLayout(LayoutKind
.Sequential
)]
205 internal struct NMTBCUSTOMDRAW
207 internal NMCUSTOMDRAW nmcd
;
208 internal IntPtr hbrMonoDither
;
209 internal IntPtr hbrLines
;
210 internal IntPtr hpenLines
;
211 internal int clrText
;
212 internal int clrMark
;
213 internal int clrTextHighlight
;
214 internal int clrBtnFace
;
215 internal int clrBtnHighlight
;
216 internal int clrHighlightHotTrack
;
217 internal RECT rcText
;
218 internal int nStringBkMode
;
219 internal int nHLStringBkMode
;
223 #region NMLVCUSTOMDRAW
224 [StructLayout(LayoutKind
.Sequential
)]
225 internal struct NMLVCUSTOMDRAW
227 internal NMCUSTOMDRAW nmcd
;
228 internal uint clrText
;
229 internal uint clrTextBk
;
230 internal uint iSubItem
;
236 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Auto
)]
237 internal struct TBBUTTONINFO
241 internal int idCommand
;
243 internal byte fsState
;
244 internal byte fsStyle
;
246 internal IntPtr lParam
;
247 internal IntPtr pszText
;
248 internal int cchText
;
252 #region REBARBANDINFO
253 [StructLayout(LayoutKind
.Sequential
)]
254 internal struct REBARBANDINFO
257 internal RebarInfoMask fMask
;
258 internal RebarStylesEx fStyle
;
259 internal int clrFore
;
260 internal int clrBack
;
261 internal IntPtr lpText
;
264 internal IntPtr hwndChild
;
265 internal int cxMinChild
;
266 internal int cyMinChild
;
268 internal IntPtr hbmBack
;
270 internal int cyChild
;
271 internal int cyMaxChild
;
272 internal int cyIntegral
;
273 internal int cxIdeal
;
275 internal int cxHeader
;
279 #region MOUSEHOOKSTRUCT
280 [StructLayout(LayoutKind
.Sequential
)]
281 internal struct MOUSEHOOKSTRUCT
284 internal IntPtr hwnd
;
285 internal int wHitTestCode
;
286 internal IntPtr dwExtraInfo
;
291 [StructLayout(LayoutKind
.Sequential
)]
292 internal struct NMTOOLBAR
296 internal TBBUTTON tbButton
;
297 internal int cchText
;
298 internal IntPtr pszText
;
299 internal RECT rcButton
;
303 #region NMREBARCHEVRON
304 [StructLayout(LayoutKind
.Sequential
)]
305 internal struct NMREBARCHEVRON
312 internal int lParamNM
;
317 [StructLayout(LayoutKind
.Sequential
)]
318 internal struct BITMAP
320 internal long bmType
;
321 internal long bmWidth
;
322 internal long bmHeight
;
323 internal long bmWidthBytes
;
324 internal short bmPlanes
;
325 internal short bmBitsPixel
;
326 internal IntPtr bmBits
;
330 #region BITMAPINFO_FLAT
331 [StructLayout(LayoutKind
.Sequential
)]
332 internal struct BITMAPINFO_FLAT
334 internal int bmiHeader_biSize
;
335 internal int bmiHeader_biWidth
;
336 internal int bmiHeader_biHeight
;
337 internal short bmiHeader_biPlanes
;
338 internal short bmiHeader_biBitCount
;
339 internal int bmiHeader_biCompression
;
340 internal int bmiHeader_biSizeImage
;
341 internal int bmiHeader_biXPelsPerMeter
;
342 internal int bmiHeader_biYPelsPerMeter
;
343 internal int bmiHeader_biClrUsed
;
344 internal int bmiHeader_biClrImportant
;
345 [MarshalAs(System
.Runtime
.InteropServices
.UnmanagedType
.ByValArray
, SizeConst
=1024)]
346 internal byte[] bmiColors
;
351 internal struct RGBQUAD
353 internal byte rgbBlue
;
354 internal byte rgbGreen
;
355 internal byte rgbRed
;
356 internal byte rgbReserved
;
360 #region BITMAPFILEHEADER
361 [StructLayout(LayoutKind
.Sequential
)]
362 internal struct BITMAPFILEHEADER
{ // File info header
363 public ushort bfType
; // Specifies the type of file. This member must be BM.
364 public uint bfSize
; // Specifies the size of the file, in bytes.
365 public ushort bfReserved1
; // Reserved; must be set to zero.
366 public ushort bfReserved2
; // Reserved; must be set to zero.
367 public uint bfOffBits
; // Specifies the byte offset from the BITMAPFILEHEADER
371 #region BITMAPINFOHEADER
372 [StructLayout(LayoutKind
.Sequential
)]
373 internal class BITMAPINFOHEADER
375 internal uint biSize
;
376 internal int biWidth
;
377 internal int biHeight
;
378 internal ushort biPlanes
;
379 internal ushort biBitCount
;
380 internal uint biCompression
;
381 internal uint biSizeImage
;
382 internal int biXPelsPerMeter
;
383 internal int biYPelsPerMeter
;
384 internal uint biClrUsed
;
385 internal uint biClrImportant
;
390 [StructLayout(LayoutKind
.Sequential
)]
391 internal class BITMAPINFO
393 internal BITMAPINFOHEADER bmiHeader
= new BITMAPINFOHEADER();
394 [MarshalAs(System
.Runtime
.InteropServices
.UnmanagedType
.ByValArray
, SizeConst
=1024)]
395 internal byte[] bmiColors
;
400 [StructLayout(LayoutKind
.Sequential
)]
401 internal struct PALETTEENTRY
404 internal byte peGreen
;
405 internal byte peBlue
;
406 internal byte peFlags
;
411 [StructLayout(LayoutKind
.Sequential
)]
412 internal struct MESSAGE
414 internal IntPtr hwnd
;
415 internal int message
;
416 internal IntPtr wParam
;
417 internal IntPtr lParam
;
424 #region HD_HITTESTINFO
425 [StructLayout(LayoutKind
.Sequential
)]
426 internal struct HD_HITTESTINFO
429 internal HeaderControlHitTestFlags flags
;
434 #region DLLVERSIONINFO
435 [StructLayout(LayoutKind
.Sequential
)]
436 internal struct DLLVERSIONINFO
439 internal int dwMajorVersion
;
440 internal int dwMinorVersion
;
441 internal int dwBuildNumber
;
442 internal int dwPlatformID
;
447 [StructLayout(LayoutKind
.Sequential
)]
448 internal struct PAINTSTRUCT
452 internal RECT rcPaint
;
453 internal int fRestore
;
454 internal int fIncUpdate
;
455 internal int Reserved1
;
456 internal int Reserved2
;
457 internal int Reserved3
;
458 internal int Reserved4
;
459 internal int Reserved5
;
460 internal int Reserved6
;
461 internal int Reserved7
;
462 internal int Reserved8
;
466 #region BLENDFUNCTION
467 [StructLayout(LayoutKind
.Sequential
, Pack
=1)]
468 internal struct BLENDFUNCTION
470 internal byte BlendOp
;
471 internal byte BlendFlags
;
472 internal byte SourceConstantAlpha
;
473 internal byte AlphaFormat
;
480 #region TRACKMOUSEEVENTS
481 [StructLayout(LayoutKind
.Sequential
)]
482 internal struct TRACKMOUSEEVENT
484 internal int cbSize
; // = 16
485 internal int dwFlags
; // not TrackerEventFlags
486 internal IntPtr hWnd
;
487 internal int dwHoverTime
;
491 #region NMTVCUSTOMDRAW
492 [StructLayout(LayoutKind
.Sequential
)]
493 internal struct NMTVCUSTOMDRAW
495 internal NMCUSTOMDRAW nmcd
;
496 internal int clrText
;
497 internal int clrTextBk
;
503 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
)]
504 internal struct TVITEM
507 internal IntPtr hItem
;
509 internal uint stateMask
;
510 internal string pszText
;
511 internal int cchTextMax
;
513 internal int iSelectedImage
;
514 internal int cChildren
;
515 internal IntPtr lParam
;
520 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Auto
)]
521 internal struct LVITEM
523 internal ListViewItemFlags mask
;
525 internal int iSubItem
;
527 internal int stateMask
;
528 internal string pszText
;
529 internal int cchTextMax
;
532 internal int iIndent
;
537 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Auto
)]
538 internal struct HDITEM
540 internal HeaderItemFlags mask
;
542 internal IntPtr pszText
;
544 internal int cchTextMax
;
552 #region WINDOWPLACEMENT
553 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Auto
)]
554 internal struct WINDOWPLACEMENT
556 internal uint length
; //Were int in original code
557 internal uint flags
; //
558 internal uint showCmd
; //
559 internal POINT ptMinPosition
;
560 internal POINT ptMaxPosition
;
561 internal RECT rcNormalPosition
;
566 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Auto
)]
567 internal struct SCROLLINFO
575 internal int nTrackPos
;
580 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Auto
)]
581 internal struct SHFILEINFO
583 internal IntPtr hIcon
;
585 internal int dwAttributes
;
586 [MarshalAs(UnmanagedType
.ByValTStr
, SizeConst
=260)]
587 internal string szDisplayName
;
588 [MarshalAs(UnmanagedType
.ByValTStr
, SizeConst
=80)]
589 internal string szTypeName
;
595 [StructLayout(LayoutKind
.Sequential
)]
596 internal struct SHITEMID
599 [MarshalAs(System
.Runtime
.InteropServices
.UnmanagedType
.ByValArray
, SizeConst
=1)]
600 internal byte[] abID
;
605 [StructLayout(LayoutKind
.Sequential
)]
606 internal struct ITEMIDLIST
608 internal SHITEMID mkid
;
613 [StructLayout(LayoutKind
.Sequential
)]
619 [MarshalAs(System
.Runtime
.InteropServices
.UnmanagedType
.ByValArray
, SizeConst
=8)]
625 [StructLayout(LayoutKind
.Sequential
)]
626 internal struct REFIID
631 [MarshalAs(System
.Runtime
.InteropServices
.UnmanagedType
.ByValArray
, SizeConst
=8)]
632 internal byte[] chars
;
634 internal REFIID(string guid
)
636 // Needs to be a string of the form:
637 // "000214E6-0000-0000-c000-000000000046"
638 string[] data
= guid
.Split('-');
639 Debug
.Assert(data
.Length
== 5);
640 x
= Convert
.ToInt32(data
[0], 16);
641 s1
= Convert
.ToInt16(data
[1], 16);
642 s2
= Convert
.ToInt16(data
[2], 16);
643 string bytesData
= data
[3] + data
[4];
644 chars
= new byte[] { Convert
.ToByte(bytesData
.Substring(0,2), 16), Convert
.ToByte(bytesData
.Substring(2,2), 16),
645 Convert
.ToByte(bytesData
.Substring(4,2), 16), Convert
.ToByte(bytesData
.Substring(6,2), 16),
646 Convert
.ToByte(bytesData
.Substring(8,2), 16), Convert
.ToByte(bytesData
.Substring(10,2), 16),
647 Convert
.ToByte(bytesData
.Substring(12,2), 16), Convert
.ToByte(bytesData
.Substring(14,2), 16) };
654 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Auto
)]
655 internal struct STRRET
657 internal STRRETFlags uType
; // One of the STRRET values
658 [MarshalAs(System
.Runtime
.InteropServices
.UnmanagedType
.ByValArray
, SizeConst
=1024)]
659 internal byte[] cStr
;
664 [StructLayout(LayoutKind
.Explicit
)]
665 internal struct STRRET_EX
667 [FieldOffset(0)] internal STRRETFlags uType
; // One of the STRRET values
668 [FieldOffset(4)] internal IntPtr pOLEString
;
672 #region TVINSERTSTRUCT
673 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Auto
)]
674 internal struct TVINSERTSTRUCT
676 internal IntPtr hParent
;
677 internal IntPtr hInsertAfter
;
678 internal TVITEM item
;
683 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Auto
)]
684 internal struct NM_TREEVIEW
688 internal TVITEM itemOld
;
689 internal TVITEM itemNew
;
690 internal POINT ptDrag
;
694 #region TVHITTESTINFO
695 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Auto
)]
696 internal struct TVHITTESTINFO
699 internal TreeViewHitTestFlags flags
;
700 internal IntPtr hItem
;
705 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Auto
)]
706 internal struct TVSORTCB
708 internal IntPtr hParent
;
709 internal Win32
.CompareFunc lpfnCompare
;
714 #region SCROLLBARINFO
715 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Auto
)]
716 internal struct SCROLLBARINFO
719 internal RECT rcScrollBar
;
720 internal int dxyLineButton
;
721 internal int xyThumbTop
;
722 internal int xyThumbBottom
;
723 internal int reserved
;
724 [MarshalAs(System
.Runtime
.InteropServices
.UnmanagedType
.ByValArray
, SizeConst
=6)]
725 internal int[] rgstate
;
729 #region CMINVOKECOMMANDINFO
730 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Auto
)]
731 internal struct CMINVOKECOMMANDINFO
733 internal int cbSize
; // sizeof(CMINVOKECOMMANDINFO)
734 internal int fMask
; // any combination of CMIC_MASK_*
735 internal IntPtr hwnd
; // might be NULL (indicating no owner window)
736 internal IntPtr lpVerb
; // either a string or MAKEINTRESOURCE(idOffset)
737 internal IntPtr lpParameters
; // might be NULL (indicating no parameter)
738 internal IntPtr lpDirectory
; // might be NULL (indicating no specific directory)
739 internal int nShow
; // one of SW_ values for ShowWindow() API
740 internal int dwHotKey
;
741 internal IntPtr hIcon
;
746 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Auto
)]
747 internal struct NMHEADER
751 internal int iButton
;
752 internal IntPtr pitem
;
757 [ StructLayout( LayoutKind
.Sequential
)]
758 internal class SYSTIME
761 public ushort wMonth
;
762 public ushort wDayOfWeek
;
765 public ushort wMinute
;
766 public ushort wSecond
;
767 public ushort wMilliseconds
;
771 [StructLayout(LayoutKind
.Sequential
)]
772 internal struct MSG
{
773 internal IntPtr hwnd
;
774 internal Msg message
;
775 internal IntPtr wParam
;
776 internal IntPtr lParam
;
781 [StructLayout(LayoutKind
.Sequential
)]
782 internal struct WNDCLASS
{
784 internal Win32
.WndProc lpfnWndProc
;
785 internal int cbClsExtra
;
786 internal int cbWndExtra
;
787 internal IntPtr hInstance
;
788 internal IntPtr hIcon
;
789 internal IntPtr hCursor
;
790 internal IntPtr hbrBackground
;
791 internal string lpszMenuName
;
792 internal string lpszClassName
;
795 [StructLayout(LayoutKind
.Sequential
)]
796 internal struct MEASUREITEMSTRUCT
{
800 public int itemWidth
;
801 public int itemHeight
;
802 public IntPtr itemData
;
805 [StructLayout(LayoutKind
.Sequential
)]
806 internal struct DRAWITEMSTRUCT
{
810 public uint itemAction
;
811 public int itemState
;
812 public IntPtr hwndItem
;
815 public IntPtr itemData
;
818 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
)]
819 internal struct TOOLINFO
{
820 internal uint cbSize
;
821 internal uint uFlags
;
822 internal IntPtr hwnd
;
825 internal IntPtr hinst
;
826 internal string lpszText
;
827 internal IntPtr lParam
;
830 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Auto
)]
831 internal struct NM_UPDOWN
838 [StructLayout(LayoutKind
.Sequential
)]
839 internal struct CLIENTCREATESTRUCT
{
840 internal IntPtr hWindowMenu
;
841 internal uint idFirstChild
;
844 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
)]
845 internal struct TCITEM
{
847 internal uint dwState
;
848 internal uint dwStateMask
;
849 internal string pszText
;
850 internal int cchTextMax
;
855 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
)]
856 internal struct CHOOSECOLOR
{
857 internal uint lStructSize
;
858 internal IntPtr hwndOwner
;
859 internal IntPtr hInstance
;
860 internal int rgbResult
;
861 internal IntPtr lpCustColors
;
863 internal IntPtr lCustData
;
864 internal Win32
.FnHookProc lpfnHook
;
865 internal string lpTemplateName
;
868 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
)]
869 internal struct OPENFILENAME_PREWIN50
{
870 internal uint lStructSize
;
871 internal IntPtr hwndOwner
;
872 internal IntPtr hInstance
;
873 internal string lpstrFilter
;
874 internal string lpstrCustomFilter
;
875 internal uint nMaxCustFilter
;
876 internal uint nFilterIndex
;
877 internal string lpstrFile
;
878 internal uint nMaxFile
;
879 internal string lpstrFileTitle
;
880 internal uint nMaxFileTitle
;
881 internal string lpstrInitialDir
;
882 internal string lpstrTitle
;
884 internal short nFileOffset
;
885 internal short nFileExtension
;
886 internal string lpstrDefExt
;
887 internal int lCustData
;
888 internal Win32
.FnHookProc lpfnHook
;
889 internal string lpTemplateName
;
894 // This the new OPENFILENAME struct included in the most
895 // recent Plataforms SDK.
897 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
)]
898 internal struct OPENFILENAME
{
899 internal uint lStructSize
;
900 internal IntPtr hwndOwner
;
901 internal IntPtr hInstance
;
902 internal string lpstrFilter
;
903 internal string lpstrCustomFilter
;
904 internal uint nMaxCustFilter
;
905 internal uint nFilterIndex
;
906 internal string lpstrFile
;
907 internal uint nMaxFile
;
908 internal string lpstrFileTitle
;
909 internal uint nMaxFileTitle
;
910 internal string lpstrInitialDir
;
911 internal string lpstrTitle
;
913 internal short nFileOffset
;
914 internal short nFileExtension
;
915 internal string lpstrDefExt
;
916 internal int lCustData
;
917 internal Win32
.FnHookProc lpfnHook
;
918 internal string lpTemplateName
;
919 internal IntPtr pvReserved
; //#if (_WIN32_WINNT >= 0x0500)
920 internal uint dwReserved
;
921 internal uint FlagsEx
;
924 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
)]
925 internal struct LOGFONT
927 internal uint lfHeight
;
928 internal uint lfWidth
;
929 internal uint lfEscapement
;
930 internal uint lfOrientation
;
931 internal uint lfWeight
;
932 internal byte lfItalic
;
933 internal byte lfUnderline
;
934 internal byte lfStrikeOut
;
935 internal byte lfCharSet
;
936 internal byte lfOutPrecision
;
937 internal byte lfClipPrecision
;
938 internal byte lfQuality
;
939 internal byte lfPitchAndFamily
;
941 [MarshalAs(UnmanagedType
.ByValTStr
, SizeConst
=32)]
942 internal string lfFaceName
;
946 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
)]
947 internal struct CHOOSEFONT
{
949 internal uint lStructSize
;
950 internal IntPtr hwndOwner
;
952 internal IntPtr lpLogFont
;
953 internal int iPointSize
;
955 internal uint rgbColors
;
956 internal uint lCustData
;
957 internal Win32
.FnHookProc lpfnHook
;
958 internal uint lpTemplateName
;
959 internal IntPtr hInstance
;
960 internal uint lpszStyle
;
961 internal short nFontType
;
962 internal short ___MISSING_ALIGNMENT__
;
963 internal int nSizeMin
;
964 internal int nSizeMax
;
968 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
)]
969 internal struct LVCOLUMN
{
974 internal string pszText
;
975 internal int cchTextMax
;
976 internal int iSubItem
;
981 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
)]
982 internal struct NMLISTVIEW
{
986 internal int iSubItem
;
987 internal uint uNewState
;
988 internal uint uOldState
;
989 internal uint uChanged
;
990 internal POINT ptAction
;
991 internal IntPtr lItemlParam
;
994 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
)]
995 internal struct NMITEMACTIVATE
{
999 internal int iSubItem
;
1000 internal uint uNewState
;
1001 internal uint uOldState
;
1002 internal uint uChanged
;
1003 internal POINT ptAction
;
1004 internal IntPtr lParam
;
1005 internal uint uKeyFlags
;
1008 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
)]
1009 internal struct LVDISPINFO
{
1011 internal LVITEM item
;
1016 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
)]
1017 internal struct OFNOTIFY
{
1018 //internal NMHDR hdr; // FIXME: cannot be marshaled
1019 internal IntPtr hwndFrom
;
1020 internal int idFrom
;
1022 internal IntPtr lpOFN
;
1023 //internal string pszFile; // FIXME: cannot be marshaled
1024 internal IntPtr pszFile
;
1027 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
)]
1028 internal struct NMTREEVIEW
{
1030 internal uint action
;
1031 internal TVITEM itemOld
;
1032 internal TVITEM itemNew
;
1033 internal POINT ptDrag
;
1037 // This currently causes corlib to throw an exception
1039 // [StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi, Pack=1)]
1041 [StructLayout(LayoutKind
.Sequential
)]
1042 internal struct PRINTDLG
{
1043 internal uint lStructSize
;
1044 internal IntPtr hwndOwner
;
1045 internal IntPtr hDevMode
;
1046 internal IntPtr hDevNames
;
1047 internal IntPtr hDC
;
1048 internal PrintDlgFlags Flags
; //uint
1049 internal short nFromPage
;
1050 internal short nToPage
;
1051 internal short nMinPage
;
1052 internal short nMaxPage
;
1053 internal short nCopies
;
1054 internal IntPtr hInstance
;
1055 internal IntPtr lCustData
;
1056 internal IntPtr lpfnPrintHook
;
1057 internal IntPtr lpfnSetupHook
;
1058 internal IntPtr lpPrintTemplateName
;
1059 internal IntPtr lpSetupTemplateName
;
1060 internal IntPtr hPrintTemplate
;
1061 internal IntPtr hSetupTemplate
;
1064 [StructLayout(LayoutKind
.Sequential
, CharSet
=CharSet
.Ansi
, Pack
=1)]
1065 internal struct BROWSEINFO
{
1066 internal IntPtr hwndOwner
;
1067 internal IntPtr pidlRoot
;
1068 internal IntPtr pszDisplayName
;
1069 internal string lpszTitle
;
1070 internal uint ulFlags
;
1071 internal IntPtr lpfn
;
1072 internal IntPtr lParam
;
1073 internal int iImage
;