Include Files in Visual basic ??

  • Thread starter Thread starter Peter Stojkovic
  • Start date Start date
Peter Stojkovic said:
VS:2003 Visual Basic

Is it possible to program

INCLUDE <Filename>

like in C++
Not in the way you mention, but it may well be possible to "include" what
you want to reference in a different way. Please post back with details of
your situation so the experts here (I'm not among them) can offer you
potential solutions.
 
Peter Stojkovic said:
VS:2003 Visual Basic

Is it possible to program

INCLUDE <Filename>

like in C++

No, gladly this is not possible. I am curious why you would need this
feature?
 
Is it possible to program
INCLUDE <Filename>

Sort of. You can add a file to a project as a link file (Project, Add
Existing Item, browse to the file, select it, and then do link file rather
than open - click the little dot at the right side of the open button).

The file must be in valid format, ie it must contain complete modules or
classes - you cant include small code fragments like you can in C. But if
you want some constants and declarations available to multiple projects, you
can make them public in a public module, and all projects can add it as a
link file. If you edit the link file in one project, the changes are visible
in all projects.

The hazard associated with this practice is the one you are probably already
aware of, namely, a change to the common file for the sake of one project may
break another project.

I do this in all of my .net vb projects. I link to my utility.vb which
contains some win32 declarations, a some small utility classes, and a some
small vb subs and functions. I have a test project where utility.vb actually
resides, and in this project, the file is added as an ordinary file (not as a
link file). The purpose of this project is to rigorously test all of
utility.vb. This way of doing business has served me well for several years.
It is practical for me because the total compiled contents of utility.vb is
small.
 
I think that you're probably wanting to include the useful system
definitions found in Win32. In this case the answer is a resounding no but,
it's possible to use this information and modify it slightly to give you the
definitions you need.

I, like others I'm sure, have created files full of useful definitions from
the original C++ .H files and used them in my code. After my signature is
the listing of one of them. (Sorry it's C++ but the principle is the same
for VB.NET). You could easily re-create the defs that you need. I use a the
macro-recording feature of VS to record and reproduce these reppetitious
actions.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

using System;

using System.Runtime.InteropServices;

using System.Drawing;

using xRay.Toolkit.Utilities.Win32;

namespace xRay.Toolkit.Win32Defs

{

public enum HHTDefs

{

HHT_NOWHERE =0x0001,

HHT_ONHEADER =0x0002,

HHT_ONDIVIDER =0x0004,

HHT_ONDIVOPEN =0x0008,

HHT_ONFILTER =0x0010,

HHT_ONFILTERBUTTON =0x0020,

HHT_ABOVE =0x0100,

HHT_BELOW =0x0200,

HHT_TORIGHT =0x0400,

HHT_TOLEFT =0x0800

}

public enum HDMDefs

{

HDM_FIRST =0x1200, // Header messages

HDM_GETITEMCOUNT =(HDM_FIRST + 0),

HDM_INSERTITEMA =(HDM_FIRST + 1),

HDM_INSERTITEMW =(HDM_FIRST + 10),

HDM_INSERTITEM =HDM_INSERTITEMA,

HDM_DELETEITEM =(HDM_FIRST + 2),

HDM_GETITEMA =(HDM_FIRST + 3),

HDM_GETITEMW =(HDM_FIRST + 11),

HDM_GETITEM =HDM_GETITEMA,

HDM_SETITEMA =(HDM_FIRST + 4),

HDM_SETITEMW =(HDM_FIRST + 12),

HDM_SETITEM =HDM_SETITEMA,

HDM_LAYOUT =(HDM_FIRST + 5),

HDM_HITTEST =(HDM_FIRST + 6),

HDM_GETITEMRECT =(HDM_FIRST + 7),

HDM_SETIMAGELIST =(HDM_FIRST + 8),

HDM_GETIMAGELIST =(HDM_FIRST + 9),

HDM_ORDERTOINDEX =(HDM_FIRST + 15),

HDM_CREATEDRAGIMAGE =(HDM_FIRST + 16), // wparam = which item (by index)

HDM_GETORDERARRAY =(HDM_FIRST + 17),

HDM_SETORDERARRAY =(HDM_FIRST + 18),

HDM_SETHOTDIVIDER = (HDM_FIRST + 19),

HDM_SETBITMAPMARGIN = (HDM_FIRST + 20),

HDM_GETBITMAPMARGIN = (HDM_FIRST + 21),

//HDM_SETUNICODEFORMAT =CCM_SETUNICODEFORMAT

//HDM_GETUNICODEFORMAT =CCM_GETUNICODEFORMAT

HDM_SETFILTERCHANGETIMEOUT =(HDM_FIRST+22),

HDM_EDITFILTER =(HDM_FIRST+23),

HDM_CLEARFILTER =(HDM_FIRST+24),

}

public enum GWLDefs

{

GWL_WNDPROC =(-4),

GWL_HINSTANCE =(-6),

GWL_HWNDPARENT =(-8),

GWL_STYLE =(-16),

GWL_EXSTYLE =(-20),

GWL_USERDATA =(-21),

GWL_ID =(-12)

}

public enum LVSDefs

{

LVS_ICON =0x0000,

LVS_REPORT =0x0001,

LVS_SMALLICON =0x0002,

LVS_LIST =0x0003,

LVS_TYPEMASK =0x0003,

LVS_SINGLESEL =0x0004,

LVS_SHOWSELALWAYS =0x0008,

LVS_SORTASCENDING =0x0010,

LVS_SORTDESCENDING =0x0020,

LVS_SHAREIMAGELISTS =0x0040,

LVS_NOLABELWRAP =0x0080,

LVS_AUTOARRANGE =0x0100,

LVS_EDITLABELS =0x0200,

LVS_OWNERDATA =0x1000,

LVS_NOSCROLL =0x2000,

LVS_TYPESTYLEMASK =0xfc00,

LVS_ALIGNTOP =0x0000,

LVS_ALIGNLEFT =0x0800,

LVS_ALIGNMASK =0x0c00,

LVS_OWNERDRAWFIXED =0x0400,

LVS_NOCOLUMNHEADER =0x4000,

LVS_NOSORTHEADER =0x8000

}

public enum LVMDefs

{

LVM_FIRST =0x1000, // ListView messages

LVM_GETITEMRECT =(LVM_FIRST + 14),

LVM_GETSUBITEMRECT =(LVM_FIRST + 56)

}

public enum LVIRDefs

{

LVIR_BOUNDS =0,

LVIR_ICON =1,

LVIR_LABEL =2,

LVIR_SELECTBOUNDS =3

}

public enum WSDefs

{

WS_OVERLAPPED =0x00000000,

WS_POPUP =-2147483648,

WS_CHILD =0x40000000,

WS_MINIMIZE =0x20000000,

WS_VISIBLE =0x10000000,

WS_DISABLED =0x08000000,

WS_CLIPSIBLINGS =0x04000000,

WS_CLIPCHILDREN =0x02000000,

WS_MAXIMIZE =0x01000000,

WS_CAPTION =0x00C00000, /* WS_BORDER | WS_DLGFRAME */

WS_BORDER =0x00800000,

WS_DLGFRAME =0x00400000,

WS_VSCROLL =0x00200000,

WS_HSCROLL =0x00100000,

WS_SYSMENU =0x00080000,

WS_THICKFRAME =0x00040000,

WS_GROUP =0x00020000,

WS_TABSTOP =0x00010000,

WS_MINIMIZEBOX =0x00020000,

WS_MAXIMIZEBOX =0x00010000,



WS_TILED =WS_OVERLAPPED,

WS_ICONIC =WS_MINIMIZE,

WS_SIZEBOX =WS_THICKFRAME,

WS_TILEDWINDOW =WS_OVERLAPPEDWINDOW,

/*

* Common Window Styles

*/

WS_OVERLAPPEDWINDOW =(WS_OVERLAPPED |

WS_CAPTION |

WS_SYSMENU |

WS_THICKFRAME |

WS_MINIMIZEBOX |

WS_MAXIMIZEBOX),

WS_POPUPWINDOW =(WS_POPUP |

WS_BORDER |

WS_SYSMENU),

WS_CHILDWINDOW =(WS_CHILD),

/*

* Extended Window Styles

*/

WS_EX_DLGMODALFRAME =0x00000001,

WS_EX_NOPARENTNOTIFY =0x00000004,

WS_EX_TOPMOST =0x00000008,

WS_EX_ACCEPTFILES =0x00000010,

WS_EX_TRANSPARENT =0x00000020,

WS_EX_MDICHILD =0x00000040,

WS_EX_TOOLWINDOW =0x00000080,

WS_EX_WINDOWEDGE =0x00000100,

WS_EX_CLIENTEDGE =0x00000200,

WS_EX_CONTEXTHELP =0x00000400,

WS_EX_RIGHT =0x00001000,

WS_EX_LEFT =0x00000000,

WS_EX_RTLREADING =0x00002000,

WS_EX_LTRREADING =0x00000000,

WS_EX_LEFTSCROLLBAR =0x00004000,

WS_EX_RIGHTSCROLLBAR =0x00000000,

WS_EX_CONTROLPARENT =0x00010000,

WS_EX_STATICEDGE =0x00020000,

WS_EX_APPWINDOW =0x00040000,

WS_EX_OVERLAPPEDWINDOW =(WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE),

WS_EX_PALETTEWINDOW =(WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST),

WS_EX_LAYERED =0x00080000,



WS_EX_NOINHERITLAYOUT =0x00100000, // Disable inheritence of mirroring by
children

WS_EX_LAYOUTRTL =0x00400000, // Right to left mirroring

WS_EX_COMPOSITED =0x02000000,

WS_EX_NOACTIVATE =0x08000000

}

public enum SIFDefs

{

SIF_RANGE =0x0001,

SIF_PAGE =0x0002,

SIF_POS =0x0004,

SIF_DISABLENOSCROLL =0x0008,

SIF_TRACKPOS =0x0010,

SIF_ALL =(SIF_RANGE | SIF_PAGE | SIF_POS | SIF_TRACKPOS)

}

public enum SBDefs

{

SB_HORZ =0,

SB_VERT =1,

SB_CTL =2,

SB_BOTH =3,

SB_LINEUP =0,

SB_LINELEFT =0,

SB_LINEDOWN =1,

SB_LINERIGHT =1,

SB_PAGEUP =2,

SB_PAGELEFT =2,

SB_PAGEDOWN =3,

SB_PAGERIGHT =3,

SB_THUMBPOSITION =4,

SB_THUMBTRACK =5,

SB_TOP =6,

SB_LEFT =6,

SB_BOTTOM =7,

SB_RIGHT =7,

SB_ENDSCROLL =8

}

public enum WMDefs

{

WM_NULL =0x0000,

WM_CREATE =0x0001,

WM_DESTROY =0x0002,

WM_MOVE =0x0003,

WM_SIZE =0x0005,

WM_ACTIVATE =0x0006,

WA_INACTIVE =0,

WA_ACTIVE =1,

WA_CLICKACTIVE =2,

WM_SETFOCUS =0x0007,

WM_KILLFOCUS =0x0008,

WM_ENABLE =0x000A,

WM_SETREDRAW =0x000B,

WM_SETTEXT =0x000C,

WM_GETTEXT =0x000D,

WM_GETTEXTLENGTH =0x000E,

WM_PAINT =0x000F,

WM_CLOSE =0x0010,

WM_QUERYENDSESSION =0x0011,

WM_QUERYOPEN =0x0013,

WM_ENDSESSION =0x0016,

WM_QUIT =0x0012,

WM_ERASEBKGND =0x0014,

WM_SYSCOLORCHANGE =0x0015,

WM_SHOWWINDOW =0x0018,

WM_WININICHANGE =0x001A,

WM_SETTINGCHANGE =WM_WININICHANGE,

WM_DEVMODECHANGE =0x001B,

WM_ACTIVATEAPP =0x001C,

WM_FONTCHANGE =0x001D,

WM_TIMECHANGE =0x001E,

WM_CANCELMODE =0x001F,

WM_SETCURSOR =0x0020,

WM_MOUSEACTIVATE =0x0021,

WM_CHILDACTIVATE =0x0022,

WM_QUEUESYNC =0x0023,

WM_GETMINMAXINFO =0x0024,

WM_PAINTICON =0x0026,

WM_ICONERASEBKGND =0x0027,

WM_NEXTDLGCTL =0x0028,

WM_SPOOLERSTATUS =0x002A,

WM_DRAWITEM =0x002B,

WM_MEASUREITEM =0x002C,

WM_DELETEITEM =0x002D,

WM_VKEYTOITEM =0x002E,

WM_CHARTOITEM =0x002F,

WM_SETFONT =0x0030,

WM_GETFONT =0x0031,

WM_SETHOTKEY =0x0032,

WM_GETHOTKEY =0x0033,

WM_QUERYDRAGICON =0x0037,

WM_COMPAREITEM =0x0039,

WM_GETOBJECT =0x003D,

WM_COMPACTING =0x0041,

WM_COMMNOTIFY =0x0044,

WM_WINDOWPOSCHANGING =0x0046,

WM_WINDOWPOSCHANGED =0x0047,

WM_POWER =0x0048,

PWR_OK =1,

PWR_FAIL =0xffff,

PWR_SUSPENDREQUEST =1,

PWR_SUSPENDRESUME =2,

PWR_CRITICALRESUME =3,

WM_COPYDATA =0x004A,

WM_CANCELJOURNAL =0x004B,

WM_NOTIFY =0x004E,

WM_INPUTLANGCHANGEREQUEST =0x0050,

WM_INPUTLANGCHANGE =0x0051,

WM_TCARD =0x0052,

WM_HELP =0x0053,

WM_USERCHANGED =0x0054,

WM_NOTIFYFORMAT =0x0055,

NFR_ANSI =1,

NFR_UNICODE =2,

NF_QUERY =3,

NF_REQUERY =4,

WM_CONTEXTMENU =0x007B,

WM_STYLECHANGING =0x007C,

WM_STYLECHANGED =0x007D,

WM_DISPLAYCHANGE =0x007E,

WM_GETICON =0x007F,

WM_SETICON =0x0080,

WM_NCCREATE =0x0081,

WM_NCDESTROY =0x0082,

WM_NCCALCSIZE =0x0083,

WM_NCHITTEST =0x0084,

WM_NCPAINT =0x0085,

WM_NCACTIVATE =0x0086,

WM_GETDLGCODE =0x0087,

WM_SYNCPAINT =0x0088,

WM_NCMOUSEMOVE =0x00A0,

WM_NCLBUTTONDOWN =0x00A1,

WM_NCLBUTTONUP =0x00A2,

WM_NCLBUTTONDBLCLK =0x00A3,

WM_NCRBUTTONDOWN =0x00A4,

WM_NCRBUTTONUP =0x00A5,

WM_NCRBUTTONDBLCLK =0x00A6,

WM_NCMBUTTONDOWN =0x00A7,

WM_NCMBUTTONUP =0x00A8,

WM_NCMBUTTONDBLCLK =0x00A9,

WM_NCXBUTTONDOWN =0x00AB,

WM_NCXBUTTONUP =0x00AC,

WM_NCXBUTTONDBLCLK =0x00AD,

WM_INPUT =0x00FF,

WM_KEYFIRST =0x0100,

WM_KEYDOWN =0x0100,

WM_KEYUP =0x0101,

WM_CHAR =0x0102,

WM_DEADCHAR =0x0103,

WM_SYSKEYDOWN =0x0104,

WM_SYSKEYUP =0x0105,

WM_SYSCHAR =0x0106,

WM_SYSDEADCHAR =0x0107,

WM_UNICHAR =0x0109,

WM_KEYLAST =0x0108,

UNICODE_NOCHAR =0xFFFF,

WM_IME_STARTCOMPOSITION =0x010D,

WM_IME_ENDCOMPOSITION =0x010E,

WM_IME_COMPOSITION =0x010F,

WM_IME_KEYLAST =0x010F,

WM_INITDIALOG =0x0110,

WM_COMMAND =0x0111,

WM_SYSCOMMAND =0x0112,

WM_TIMER =0x0113,

WM_HSCROLL =0x0114,

WM_VSCROLL =0x0115,

WM_INITMENU =0x0116,

WM_INITMENUPOPUP =0x0117,

WM_MENUSELECT =0x011F,

WM_MENUCHAR =0x0120,

WM_ENTERIDLE =0x0121,

WM_MENURBUTTONUP =0x0122,

WM_MENUDRAG =0x0123,

WM_MENUGETOBJECT =0x0124,

WM_UNINITMENUPOPUP =0x0125,

WM_MENUCOMMAND =0x0126,

WM_CHANGEUISTATE =0x0127,

WM_UPDATEUISTATE =0x0128,

WM_QUERYUISTATE =0x0129,

UIS_SET =1,

UIS_CLEAR =2,

UIS_INITIALIZE =3,

UISF_HIDEFOCUS =0x1,

UISF_HIDEACCEL =0x2,

UISF_ACTIVE =0x4,

WM_CTLCOLOR =0x0019,

WM_CTLCOLORMSGBOX =0x0132,

WM_CTLCOLOREDIT =0x0133,

WM_CTLCOLORLISTBOX =0x0134,

WM_CTLCOLORBTN =0x0135,

WM_CTLCOLORDLG =0x0136,

WM_CTLCOLORSCROLLBAR =0x0137,

WM_CTLCOLORSTATIC =0x0138,

MN_GETHMENU =0x01E1,

WM_MOUSEFIRST =0x0200,

WM_MOUSEMOVE =0x0200,

WM_LBUTTONDOWN =0x0201,

WM_LBUTTONUP =0x0202,

WM_LBUTTONDBLCLK =0x0203,

WM_RBUTTONDOWN =0x0204,

WM_RBUTTONUP =0x0205,

WM_RBUTTONDBLCLK =0x0206,

WM_MBUTTONDOWN =0x0207,

WM_MBUTTONUP =0x0208,

WM_MBUTTONDBLCLK =0x0209,

WM_MOUSEWHEEL =0x020A,

WM_XBUTTONDOWN =0x020B,

WM_XBUTTONUP =0x020C,

WM_XBUTTONDBLCLK =0x020D,

WM_MOUSELAST =0x020D,

WHEEL_DELTA =120,

XBUTTON1 =0x0001,

XBUTTON2 =0x0002,

WM_PARENTNOTIFY =0x0210,

WM_ENTERMENULOOP =0x0211,

WM_EXITMENULOOP =0x0212,

WM_NEXTMENU =0x0213,

WM_SIZING =0x0214,

WM_CAPTURECHANGED =0x0215,

WM_MOVING =0x0216,

WM_POWERBROADCAST =0x0218,

PBT_APMQUERYSUSPEND =0x0000,

PBT_APMQUERYSTANDBY =0x0001,

PBT_APMQUERYSUSPENDFAILED =0x0002,

PBT_APMQUERYSTANDBYFAILED =0x0003,

PBT_APMSUSPEND =0x0004,

PBT_APMSTANDBY =0x0005,

PBT_APMRESUMECRITICAL =0x0006,

PBT_APMRESUMESUSPEND =0x0007,

PBT_APMRESUMESTANDBY =0x0008,

PBTF_APMRESUMEFROMFAILURE =0x00000001,

PBT_APMBATTERYLOW =0x0009,

PBT_APMPOWERSTATUSCHANGE =0x000A,

PBT_APMOEMEVENT =0x000B,

PBT_APMRESUMEAUTOMATIC =0x0012,

WM_DEVICECHANGE =0x0219,

WM_MDICREATE =0x0220,

WM_MDIDESTROY =0x0221,

WM_MDIACTIVATE =0x0222,

WM_MDIRESTORE =0x0223,

WM_MDINEXT =0x0224,

WM_MDIMAXIMIZE =0x0225,

WM_MDITILE =0x0226,

WM_MDICASCADE =0x0227,

WM_MDIICONARRANGE =0x0228,

WM_MDIGETACTIVE =0x0229,

WM_MDISETMENU =0x0230,

WM_ENTERSIZEMOVE =0x0231,

WM_EXITSIZEMOVE =0x0232,

WM_DROPFILES =0x0233,

WM_MDIREFRESHMENU =0x0234,

WM_IME_SETCONTEXT =0x0281,

WM_IME_NOTIFY =0x0282,

WM_IME_CONTROL =0x0283,

WM_IME_COMPOSITIONFULL =0x0284,

WM_IME_SELECT =0x0285,

WM_IME_CHAR =0x0286,

WM_IME_REQUEST =0x0288,

WM_IME_KEYDOWN =0x0290,

WM_IME_KEYUP =0x0291,

WM_MOUSEHOVER =0x02A1,

WM_MOUSELEAVE =0x02A3,

WM_NCMOUSELEAVE =0x02A2,

WM_WTSSESSION_CHANGE =0x02B1,

WM_TABLET_FIRST =0x02c0,

WM_TABLET_LAST =0x02df,

WM_CUT =0x0300,

WM_COPY =0x0301,

WM_PASTE =0x0302,

WM_CLEAR =0x0303,

WM_UNDO =0x0304,

WM_RENDERFORMAT =0x0305,

WM_RENDERALLFORMATS =0x0306,

WM_DESTROYCLIPBOARD =0x0307,

WM_DRAWCLIPBOARD =0x0308,

WM_PAINTCLIPBOARD =0x0309,

WM_VSCROLLCLIPBOARD =0x030A,

WM_SIZECLIPBOARD =0x030B,

WM_ASKCBFORMATNAME =0x030C,

WM_CHANGECBCHAIN =0x030D,

WM_HSCROLLCLIPBOARD =0x030E,

WM_QUERYNEWPALETTE =0x030F,

WM_PALETTEISCHANGING =0x0310,

WM_PALETTECHANGED =0x0311,

WM_HOTKEY =0x0312,

WM_PRINT =0x0317,

WM_PRINTCLIENT =0x0318,

WM_APPCOMMAND =0x0319,

WM_THEMECHANGED =0x031A,

WM_HANDHELDFIRST =0x0358,

WM_HANDHELDLAST =0x035F,

WM_AFXFIRST =0x0360,

WM_AFXLAST =0x037F,

WM_PENWINFIRST =0x0380,

WM_PENWINLAST =0x038F,

WM_USER =0x0400,

WM_REFLECT =0x2000,

WM_APP =0x8000

}

public enum NMDefs

{

NM_FIRST =0,

NM_OUTOFMEMORY =(NM_FIRST-1),

NM_CLICK =(NM_FIRST-2), // uses NMCLICK struct

NM_DBLCLK =(NM_FIRST-3),

NM_RETURN =(NM_FIRST-4),

NM_RCLICK =(NM_FIRST-5), // uses NMCLICK struct

NM_RDBLCLK =(NM_FIRST-6),

NM_SETFOCUS =(NM_FIRST-7),

NM_KILLFOCUS =(NM_FIRST-8),

NM_CUSTOMDRAW =(NM_FIRST-12),

NM_HOVER =(NM_FIRST-13),

NM_NCHITTEST =(NM_FIRST-14), // uses NMMOUSE struct

NM_KEYDOWN =(NM_FIRST-15), // uses NMKEY struct

NM_RELEASEDCAPTURE =(NM_FIRST-16),

NM_SETCURSOR =(NM_FIRST-17), // uses NMMOUSE struct

NM_CHAR =(NM_FIRST-18), // uses NMCHAR struct

NM_TOOLTIPSCREATED =(NM_FIRST-19), // notify of when the tooltips window is
create

NM_LDOWN =(NM_FIRST-20),

NM_RDOWN =(NM_FIRST-21),

NM_THEMECHANGED =(NM_FIRST-22)

}

public enum DWLDefs

{

DWL_MSGRESULT =0,

DWL_DLGPROC =4,

DWL_USER =8

}

[StructLayout(LayoutKind.Sequential)]

public struct NMLISTVIEW

{

public NMHDR hdr;

public int iItem;

public int iSubItem;

public int uNewState;

public int uOldState;

public int uChanged;

public Point ptAction;

public long lParam;

}



public enum OCMDefs

{

OCM__BASE =((int)WMDefs.WM_USER + 0x1c00), //same as WM_REFLECT

OCM_COMMAND =(OCM__BASE + (int)WMDefs.WM_COMMAND),

OCM_CTLCOLORBTN =(OCM__BASE + (int)WMDefs.WM_CTLCOLORBTN),

OCM_CTLCOLOREDIT =(OCM__BASE + (int)WMDefs.WM_CTLCOLOREDIT),

OCM_CTLCOLORDLG =(OCM__BASE + (int)WMDefs.WM_CTLCOLORDLG),

OCM_CTLCOLORLISTBOX =(OCM__BASE + (int)WMDefs.WM_CTLCOLORLISTBOX),

OCM_CTLCOLORMSGBOX =(OCM__BASE + (int)WMDefs.WM_CTLCOLORMSGBOX),

OCM_CTLCOLORSCROLLBAR =(OCM__BASE + (int)WMDefs.WM_CTLCOLORSCROLLBAR),

OCM_CTLCOLORSTATIC =(OCM__BASE + (int)WMDefs.WM_CTLCOLORSTATIC),

OCM_CTLCOLOR =(OCM__BASE + (int)WMDefs.WM_CTLCOLOR),

OCM_DRAWITEM =(OCM__BASE + (int)WMDefs.WM_DRAWITEM),

OCM_MEASUREITEM =(OCM__BASE + (int)WMDefs.WM_MEASUREITEM),

OCM_DELETEITEM =(OCM__BASE + (int)WMDefs.WM_DELETEITEM),

OCM_VKEYTOITEM =(OCM__BASE + (int)WMDefs.WM_VKEYTOITEM),

OCM_CHARTOITEM =(OCM__BASE + (int)WMDefs.WM_CHARTOITEM),

OCM_COMPAREITEM =(OCM__BASE + (int)WMDefs.WM_COMPAREITEM),

OCM_HSCROLL =(OCM__BASE + (int)WMDefs.WM_HSCROLL),

OCM_VSCROLL =(OCM__BASE + (int)WMDefs.WM_VSCROLL),

OCM_PARENTNOTIFY =(OCM__BASE + (int)WMDefs.WM_PARENTNOTIFY),

OCM_NOTIFY =(OCM__BASE + (int)WMDefs.WM_NOTIFY),

}

//==================== CUSTOM DRAW
==========================================



public enum CDRFDefs : int

{

// custom draw return flags

// values under 0x00010000 are reserved for global custom draw values.

// above that are for specific controls

CDRF_DODEFAULT =0x00000000,

CDRF_NEWFONT =0x00000002,

CDRF_SKIPDEFAULT =0x00000004,

CDRF_NOTIFYPOSTPAINT =0x00000010,

CDRF_NOTIFYITEMDRAW =0x00000020,

CDRF_NOTIFYSUBITEMDRAW =0x00000020, // flags are the same, we can
distinguish by context

CDRF_NOTIFYPOSTERASE =0x00000040

}

public enum CDDSDefs

{

// drawstage flags

// values under 0x00010000 are reserved for global custom draw values.

// above that are for specific controls

CDDS_PREPAINT =0x00000001,

CDDS_POSTPAINT =0x00000002,

CDDS_PREERASE =0x00000003,

CDDS_POSTERASE =0x00000004,

// the 0x000010000 bit means it's individual item specific

CDDS_ITEM =0x00010000,

CDDS_ITEMPREPAINT =(CDDS_ITEM | CDDS_PREPAINT),

CDDS_ITEMPOSTPAINT =(CDDS_ITEM | CDDS_POSTPAINT),

CDDS_ITEMPREERASE =(CDDS_ITEM | CDDS_PREERASE),

CDDS_ITEMPOSTERASE =(CDDS_ITEM | CDDS_POSTERASE),

CDDS_SUBITEM =0x00020000,

}

public enum CDISDefs

{

// itemState flags

CDIS_SELECTED =0x0001,

CDIS_GRAYED =0x0002,

CDIS_DISABLED =0x0004,

CDIS_CHECKED =0x0008,

CDIS_FOCUS =0x0010,

CDIS_DEFAULT =0x0020,

CDIS_HOT =0x0040,

CDIS_MARKED =0x0080,

CDIS_INDETERMINATE =0x0100,

CDIS_SHOWKEYBOARDCUES =0x0200,

}

public enum AWDefs

{

AW_HOR_POSITIVE =0x00000001,

AW_HOR_NEGATIVE =0x00000002,

AW_VER_POSITIVE =0x00000004,

AW_VER_NEGATIVE =0x00000008,

AW_CENTER =0x00000010,

AW_HIDE =0x00010000,

AW_ACTIVATE =0x00020000,

AW_SLIDE =0x00040000,

AW_BLEND =0x00080000

}

public enum LWADefs

{

LWA_COLORKEY =0x00000001,

LWA_ALPHA =0x00000002

}

public enum CSDefs

{

CS_VREDRAW =0x0001,

CS_HREDRAW =0x0002,

CS_DBLCLKS =0x0008,

CS_OWNDC =0x0020,

CS_CLASSDC =0x0040,

CS_PARENTDC =0x0080,

CS_NOCLOSE =0x0200,

CS_SAVEBITS =0x0800,

CS_BYTEALIGNCLIENT =0x1000,

CS_BYTEALIGNWINDOW =0x2000,

CS_GLOBALCLASS =0x4000,

CS_IME =0x00010000,

CS_DROPSHADOW =0x00020000

}

[Flags()]

public enum SWDefs

{

SW_HIDE = 0,

SW_SHOWNORMAL = 1,

SW_NORMAL = 1,

SW_SHOWMINIMIZED = 2,

SW_SHOWMAXIMIZED = 3,

SW_MAXIMIZE = 3,

SW_SHOWNOACTIVATE = 4,

SW_SHOW = 5,

SW_MINIMIZE = 6,

SW_SHOWMINNOACTIVE = 7,

SW_SHOWNA = 8,

SW_RESTORE = 9,

SW_SHOWDEFAULT = 10,

SW_FORCEMINIMIZE = 11,

SW_MAX = 11

}

public enum RDWDefs

{

RDW_INVALIDATE =0x0001,

RDW_INTERNALPAINT =0x0002,

RDW_ERASE =0x0004,

RDW_VALIDATE =0x0008,

RDW_NOINTERNALPAINT =0x0010,

RDW_NOERASE =0x0020,

RDW_NOCHILDREN =0x0040,

RDW_ALLCHILDREN =0x0080,

RDW_UPDATENOW =0x0100,

RDW_ERASENOW =0x0200,

RDW_FRAME =0x0400,

RDW_NOFRAME =0x0800

}

public enum WADefs

{

WA_INACTIVE =0,

WA_ACTIVE =1,

WA_CLICKACTIVE =2

}



[StructLayout(LayoutKind.Sequential)]

public struct NMHDR

{

public System.IntPtr hwndFrom;

public System.IntPtr idFrom;

public int code;

}

[StructLayout(LayoutKind.Sequential)]

public struct NMCUSTOMDRAW

{

public NMHDR hdr;

public int dwDrawStage;

public IntPtr hdc;

public RECT rc;

public int dwItemSpec; // this is control specific, but it's how to specify
an item. valid only with CDDS_ITEM bit set

public int uItemState;

public int lItemlParam;

}

[StructLayout(LayoutKind.Sequential)]

public struct NMLVCUSTOMDRAW

{

public NMCUSTOMDRAW nmcd;

public COLORREF clrText;

public COLORREF clrTextBk;

public int iSubItem;

public int dwItemType;

public COLORREF clrFace;

public int iIconEffect;

public int iIconPhase;

public int iPartId;

public int iStateId;

public RECT rcText;

public int uAlign;

}



[StructLayout(LayoutKind.Sequential)]

public struct NMTTCUSTOMDRAW

{

public NMCUSTOMDRAW nmcd;

public int uDrawFlags;

}

public struct COLORREF

{

public int color;

public Color Color

{

get

{

return ColorTranslator.FromWin32(color);

}

set

{

color=ColorTranslator.ToWin32(value);

}

}

}

public struct POINT

{

public int X;

public int Y;

public Point Point

{

get

{

return new Point(X,Y);

}

}

}

public struct HDHITTESTINFO

{

public POINT pt;

public int flags;

public int iItem;

}

public struct PAINTSTRUCT

{

public IntPtr hdc;

public int fErase;

public RECT rcPaint;

public int fRestore;

public int fIncUpdate;

public long rgbReserved1;

public long rgbReserved2;

public long rgbReserved3;

public long rgbReserved4;

}

[StructLayout(LayoutKind.Sequential)]

public struct SCROLLINFO

{

public int cbSize;

public int fMask;

public int nMin;

public int nMax;

public int nPage;

public int nPos;

public int nTrackPos;

}

[StructLayout(LayoutKind.Sequential)]

public class DrawItemStruct

{

public int CtlType;

public int CtlID;

public int itemID;

public int itemAction;

public int itemState;

public IntPtr hwndItem;

public IntPtr hDC;

public RECT rcItem;

public int itemData;

}

[StructLayout(LayoutKind.Sequential)]

public struct RECT

{

public int left;

public int top;

public int right;

public int bottom;

public int Width

{

get{return right-left;}

}

public int Height

{

get{return bottom-top;}

}

}

[StructLayout(LayoutKind.Sequential)]

public struct TRACKMOUSEEVENT

{

public int cbSize;

public int dwFlags;

public IntPtr hwndTrack;

public int dwHoverTime;

}

public enum TMEDefs

{

TME_HOVER =0x00000001,

TME_LEAVE =0x00000002,

TME_NONCLIENT =0x00000010,

TME_QUERY =0x40000000,

TME_CANCEL =-2147483648

}

}
 
gladly this is not possible
I bet you program with the "hide advanced members" turned on :-P
 
Bob Powell said:
I bet you program with the "hide advanced members" turned on :-P

No, I actually don't have this option turned on, but I am not thinking in
terms of files and inserts when dealing with VB code :-).
 
Back
Top