// Edit control styles
#define STYLE_NOSPLITT			001h
#define STYLE_NOLINENUMBER		002h
#define STYLE_NOCOLLAPSE		004h
#define STYLE_NOHSCROLL			008h
#define STYLE_NOVSCROLL			010h
#define STYLE_NOHILITE			020h
#define STYLE_NOSIZEGRIP		040h
#define STYLE_NODBLCLICK		080h
#define STYLE_READONLY			100h
#define STYLE_NODIVIDERLINE		200h
#define STYLE_NOBACKBUFFER		400h

// Edit control messages
#define REM_BASE			WM_USER+1000
#define REM_SETHILITEWORDS		REM_BASE+0		//wParam=Color, lParam=lpszWords
#define REM_SETFONT			REM_BASE+1		//wParam=0, lParam=lpRAFONT
#define REM_GETFONT			REM_BASE+2		//wParam=0, lParam=lpRAFONT
#define REM_SETCOLOR			REM_BASE+3		//wParam=0, lParam=lpRACOLOR
#define REM_GETCOLOR			REM_BASE+4		//wParam=0, lParam=lpRACOLOR
#define REM_SETHILITELINE		REM_BASE+5		//wParam=Line, lParam=Color
#define REM_GETHILITELINE		REM_BASE+6		//wParam=Line, lParam=0
#define REM_SETBOOKMARK			REM_BASE+7		//wParam=Line, lParam=Type
#define REM_GETBOOKMARK			REM_BASE+8		//wParam=Line, lParam=0
#define REM_CLRBOOKMARKS		REM_BASE+9		//wParam=0, lParam=Type
#define REM_NXTBOOKMARK			REM_BASE+10		//wParam=Line, lParam=Type
#define REM_PRVBOOKMARK			REM_BASE+11		//wParam=Line, lParam=Type
#define REM_FINDBOOKMARK		REM_BASE+12		//wParam=BmID, lParam=0
#define REM_SETBLOCKS			REM_BASE+13		//wParam=0, lParam=lpRABLOCKDEF
#define REM_ISLINE			REM_BASE+14		//wParam=Line, lParam=lpszDef
#define REM_GETWORD			REM_BASE+15		//wParam=BuffSize, lParam=lpBuff
#define REM_COLLAPSE			REM_BASE+16		//wParam=Line, lParam=lpRABLOCKDEF
#define REM_COLLAPSEALL			REM_BASE+17		//wParam=0, lParam=lpRABLOCKDEF
#define REM_EXPAND			REM_BASE+18		//wParam=Line, lParam=lpRABLOCKDEF
#define REM_EXPANDALL			REM_BASE+19		//wParam=0, lParam=lpRABLOCKDEF
#define REM_LOCKLINE			REM_BASE+20		//wParam=Line, lParam=TRUE/FALSE
#define REM_ISLINELOCKED		REM_BASE+21		//wParam=Line, lParam=0
#define REM_HIDELINE			REM_BASE+22		//wParam=Line, lParam=TRUE/FALSE
#define REM_ISLINEHIDDEN		REM_BASE+23		//wParam=Line, lParam=0
#define REM_AUTOINDENT			REM_BASE+24		//wParam=0, lParam=TRUE/FALSE
#define REM_TABWIDTH			REM_BASE+25		//wParam=nChars, lParam=TRUE/FALSE (Expand tabs)
#define REM_SELBARWIDTH			REM_BASE+26		//wParam=nWidth, lParam=0
#define REM_LINENUMBERWIDTH		REM_BASE+27		//wParam=nWidth, lParam=0
#define REM_MOUSEWHEEL			REM_BASE+28		//wParam=nLines, lParam=0
#define REM_SUBCLASS			REM_BASE+29		//wParam=0, lParam=lpWndProc
#define REM_SETSPLIT			REM_BASE+30		//wParam=nSplit, lParam=0
#define REM_GETSPLIT			REM_BASE+31		//wParam=0, lParam=0
#define REM_VCENTER			REM_BASE+32		//wParam=0, lParam=0
#define REM_REPAINT			REM_BASE+33		//wParam=0, lParam=0
#define REM_BMCALLBACK			REM_BASE+34		//wParam=0, lParam=lpBmProc
#define REM_READONLY			REM_BASE+35		//wParam=0, lParam=TRUE/FALSE
#define REM_INVALIDATELINE		REM_BASE+36		//wParam=Line, lParam=0
#define REM_SETPAGESIZE			REM_BASE+37		//wParam=nLines, lParam=0
#define REM_GETPAGESIZE			REM_BASE+38		//wParam=0, lParam=0
#define REM_GETCHARTAB			REM_BASE+39		//wParam=nChar, lParam=0
#define REM_SETCHARTAB			REM_BASE+40		//wParam=nChar, lParam=nValue
#define REM_SETCOMMENTBLOCKS	        REM_BASE+41		//wParam=lpStart, lParam=lpEnd
#define REM_SETWORDGROUP		REM_BASE+42		//wParam=0, lParam=nGroup (0-15)
#define REM_GETWORDGROUP		REM_BASE+43		//wParam=0, lParam=0
#define REM_SETBMID			REM_BASE+44		//wParam=nLines, lParam=nBmID
#define REM_GETBMID			REM_BASE+45		//wParam=nLines, lParam=0
#define REM_ISCHARPOS			REM_BASE+46		//wParam=CP, lParam=0, returns 1 if comment block, 2 if comment, 3 if string
#define REM_HIDELINES			REM_BASE+47		//wParam=nLine, lParam=nLines
#define REM_SETDIVIDERLINE		REM_BASE+48		//wParam=nLine, lParam=TRUE/FALSE
#define REM_ISINBLOCK			REM_BASE+49		//wParam=nLine, lParam=lpRABLOCKDEF


#define EM_STREAMIN                     WM_USER + 73
#define EM_STREAMOUT                    WM_USER + 74
#define SF_TEXT                         1
#define SEL_OBJECT                      2

#define BD_NONESTING			1				//Set to true for non nested blocks
#define BD_DIVIDERLINE			2				//Draws a divider line
#define BD_INCLUDELAST			4				//lpszEnd line is also collapsed

struct CHARRANGE {LONG cpMin; LONG cpMax;};

struct _hRAEditFont {dword hFont;dword hIFont;dword hLnrFont;};
struct _RABLOCKDEF {dword lpszStart;dword lpszEnd;dword lpszNot1;dword lpszNot2;dword flag;};
struct _EDITSTREAM {dword dwCookie;dword dwError;dword pfnCallback;};
struct _RACOLOR { 
	dword bckcol; 		//Back color
	dword txtcol;		//Text color
	dword selbckcol;	//Sel back color
	dword seltxtcol;	//Sel text color
	dword cmntcol;		//Comment color
	dword strcol;		//String color
	dword oprcol;		//Operator color
	dword hicol1;		//Line hilite 1
	dword hicol2;		//Line hilite 2
	dword hicol3;		//Line hilite 3
	dword selbarbck;	//Selection bar
	dword selbarpen;	//Selection bar pen
	dword lnrcol;		//Line numbers color
};
struct _RASELCHANGE {
	NMHDR nmhdr;
	CHARRANGE chrg;
	word seltyp;		//SEL_TEXT or SEL_OBJECT
	dword line;		//Line number
	dword cpLine;		//Character position of first character
	dword lpLine;		//Pointer to line
	dword nlines;		//Total number of lines
	dword nhidden;		//Total number of hidden lines
	dword fchanged;		//TRUE if changed since last
	dword npage;		//Page number
	dword nWordGroup;	//Hilite word group
};
