#define	IDC_TBB_NEW		50
#define	IDC_TBB_OPEN	51
#define	IDC_TBB_SAVE	52
#define	IDC_TBB_CUT		53
#define	IDC_TBB_COPY	54
#define	IDC_TBB_PASTE	55
#define	IDC_TBB_UNDO	56
#define	IDC_TBB_REDO	57
#define	IDC_TBB_FIND	58
#define	IDC_TBB_REPLACE	59
#define	IDC_TBB_PRINT	60
#define	IDC_TBB_COMPILE	61
#define	IDC_TBB_RUN		62
#define	IDC_TBB_OUTPUT	63

dword	hToolBar;
#define	NUMTBBUT	18
TBBUTTON	tbb[NUMTBBUT] = {STD_FILENEW,IDC_TBB_NEW,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,
				STD_FILEOPEN,IDC_TBB_OPEN,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,
				STD_FILESAVE,IDC_TBB_SAVE,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,
				0,0,0,TBSTYLE_SEP,0,0,
				STD_CUT,IDC_TBB_CUT,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,
				STD_COPY,IDC_TBB_COPY,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,
				STD_PASTE,IDC_TBB_PASTE,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,
				3,IDC_TBB_UNDO,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,
				4,IDC_TBB_REDO,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,
				0,0,0,TBSTYLE_SEP,0,0,
				9,IDC_TBB_FIND,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,
				10,IDC_TBB_REPLACE,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,
				0,0,0,TBSTYLE_SEP,0,0,
				20,IDC_TBB_PRINT,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,
				0,0,0,TBSTYLE_SEP,0,0,
				13,IDC_TBB_COMPILE,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,
				14,IDC_TBB_RUN,TBSTATE_ENABLED,TBSTYLE_BUTTON,0,0,
				21,IDC_TBB_OUTPUT,TBSTATE_ENABLED,TBSTYLE_CHECK,0,0};


:void Do_ToolBar(dword hwnd)
{
	TBADDBITMAP	Tba;

//	hToolBar = CreateWindowEx(0,TOOLBARCLASSNAME,NULL,WS_CHILD | WS_VISIBLE | TBSTYLE_FLAT | TBSTYLE_TOOLTIPS,
//						0, 0, 0, 0, hwnd, NULL, hInstance, NULL);
	hToolBar = CreateToolbarEx(hwnd,WS_CHILD | WS_VISIBLE | TBSTYLE_FLAT | TBSTYLE_TOOLTIPS,
						300,1,0,0,#tbb,0,16,16,0,0,sizeof (TBBUTTON));
	
	SendMessage(hToolBar, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);
		
	Tba.hInst =	hInstance;
	Tba.nID	= IDC_TBR;

	SendMessage(hToolBar,TB_ADDBITMAP,1,#Tba);
	SendMessage(hToolBar, TB_ADDBUTTONS, NUMTBBUT, #tbb);
}
:dword	ToolTips(dword id)
{
	SWITCH	(id)
	{
	CASE IDC_TBB_NEW:
		RETURN "Create New File";
	CASE IDC_TBB_OPEN:
		RETURN "Open File";
	case IDC_TBB_SAVE:
		RETURN "Save File";
	case IDC_TBB_CUT:
		RETURN "Cut";
	case IDC_TBB_COPY:
		RETURN "Copy";
	case IDC_TBB_PASTE:
		RETURN "Paste";
	case IDC_TBB_UNDO:
		RETURN "Undo";
	case IDC_TBB_REDO:
		RETURN "Redo";
	case IDC_TBB_FIND:
		RETURN "Find";
	case IDC_TBB_REPLACE:
		RETURN "Replace";
	case IDC_TBB_PRINT:
		RETURN "Print";
	case IDC_TBB_COMPILE:
		RETURN "Compile";
	case IDC_TBB_RUN:
		RETURN "Run";
	case IDC_TBB_OUTPUT:
		RETURN "View Output";
	}
}