Graphic User Interface (GUI) Functions

Aurora has a number of functions included as standard compiler and library functions which allow you to create Graphic User Interfaces (GUI) for your programs. These functions can be grouped as follows:







under construction







top of page

prev

next







struct POINT { int x; int y; } struct RECT { int left; int top; int right; int bottom; } struct NMHDR { unsigned int hwndFrom; int idFrom; int code; } class CWindow { declare CWindow(); declare _CWindow(); declare virtual Create(int l,int t,int w,int h,int style,int exstyle,string title,CWindow *parent),int; declare virtual Destroy(),int; declare GetHandle(),unsigned int; declare HandlePaint(wParam as unsigned int,lParam as unsigned int),int; declare HandleErase(wParam as unsigned int,lParam as unsigned int),int; declare virtual WndProc(unsigned int message, unsigned int wparam, unsigned int lparam),int; //message handlers declare virtual OnChar(unsigned int nChar,INT nRepCnt),int; declare virtual OnClose(),int; declare virtual OnCommand(unsigned int wparam,unsigned int lparam),int; declare virtual OnControl(int nID, int nNotifyCode, unsigned int hControl),int; declare virtual OnControlColor(unsigned int hdc,unsigned int hwnd),int; declare virtual OnCreate(),int; declare virtual OnDestroy(),int; declare virtual OnDrawItem(int nID,DRAWITEMSTRUCT lpdis),int; declare virtual OnEraseBkgnd(),int; declare virtual OnHScroll(int nCommand,int nPos,int nID),int; declare virtual OnVScroll(int nCommand,int nPos,int nID),int; declare virtual OnInitDialog(),int; declare virtual OnKeyDown(unsigned int nChar, INT nRepCnt, unsigned int nFlags),int; declare virtual OnKeyUp(unsigned int nChar, INT nRepCnt, unsigned int nFlags),int; declare virtual OnLButtonDown(int x,int y, int flags),int; declare virtual OnLButtonUp(int x,int y,int flags),int; declare virtual OnLButtonDblClk(int x,int y,int flags),int; declare virtual OnMenuInit(unsigned int hMenu),int; declare virtual OnMenuPick(int nID),int; declare virtual OnMouseMove(int x,int y,int flags),int; declare virtual OnNotify(int code,int nID,NMHDR *pnmhdr),int; declare virtual OnPaint(),int; declare virtual OnRButtonDown(int x,int y,int flags),int; declare virtual OnRButtonUp(int x,int y,int flags),int; declare virtual OnRButtonDblClk(int x,int y,int flags),int; declare virtual OnSize(int nType,int cx,int cy),int; declare virtual OnSizing(int nSide,RECT rc),int; declare virtual OnTimer(int nIDEvent),int; //graphics declare BackPen(unsigned int crColor); declare Circle(int x, int y, int r, OPT unsigned int outline=0xFFFFFFFF, OPT unsigned int fill=0xFFFFFFFF); declare DrawMode(mode as INT); declare DrawRect(int l,int t,int w,int h,OPT unsigned int outline=0xFFFFFFFF, OPT unsigned int fill=0xFFFFFFFF); declare Ellipse(int l,int t,int w,int h,OPT unsigned int outline=0xFFFFFFFF,OPT unsigned int fill=0xFFFFFFFF); declare FloodFill(int x, int y, unsigned int crColor); declare FrontPen(unsigned int crColor); declare GetHDC(),unsigned int; declare GetPixel(int x,int y),unsigned int; declare GetPosition(),POINT; declare Line(int sx,int sy,int ex,int ey,opt unsigned int clr=0xffffffffu); declare LineTo(int ex,int ey,opt unsigned int clr=0xffffffffu); declare Move(int x,int y); declare ReleaseHDC(hdc as unsigned int,OPT bRedraw=1 as INT); declare SetPixel(x as int, y as int, OPT clr=0xFFFFFFFF as unsigned int); declare SetFont(string typeface,int height,int weight,OPT int flags=0,OPT int id=0); declare SetLineStyle(style as INT,width as INT); declare SetRasterOp(mode as INT); declare SetWindowColor(clr as unsigned INT); declare WriteText(int x,int y,string text); //general methods declare AddAccelerator(unsigned byte fVirt, word key, word cmd); declare CenterWindow(); declare DrawMenuBar(); declare Enable(int bEnable); declare EnableTabs(int bEnable); declare GetCaption(),heap; declare GetClientRect(),RECT; declare GetMenu(),unsigned int; declare GetSBRange(int nBar,int nMin byref,int nMax byref); declare GetSBPos(int nBar),int; declare GetSBThumbPos(int nBar),int; declare GetTextSize(text as STRING),POINT; declare GetWindowRect(OPT id=0 as INT),RECT; declare ModifyStyle(unsigned INT add,unsigned INT remove,OPT int id=0); declare ModifyStyleEx(unsigned INT add,unsigned INT remove,OPT int id=0); declare RedrawFrame(OPT id=0 as INT); declare SetCaption(string text); declare SetCursor(int type,OPT unsigned int handle=0); declare SetFocus(OPT id = 0 as INT); declare SetIcon(unsigned int handle); declare SetMenu(unsigned int hmenu); declare SetSBRange(int nBar,int nMin,int nMax); declare SetSBPos(int nBar,int nPos); declare SetSize(int l,int t,int w,int h); declare ShowContextMenu(unsigned int hmenu,int x,int y); declare ShowWindow(nCmdShow as INT,OPT id=0 as INT); declare StartTimer(unsigned int time,opt int nIDEvent=1,opt unsigned int callback); declare StopTimer(opt int nIDEvent=1); //window variables unsigned int m_hWnd; unsigned int m_hBitmap; unsigned int m_hFont; unsigned int m_hPen; unsigned int m_hClient; POINT m_pos; int m_iBkMode; int m_iROP2; int m_nPenStyle; int m_nPenWidth; int m_cBack; int m_cWindow; int m_bAutoDraw; int m_bTabEnable; unsigned int m_hCursor; unsigned int m_hBackDC; unsigned int m_hCacheDC; int m_nCacheCount; int m_bDialog; pointer m_pDlgTemplate; pointer m_pA2DScreen; pointer m_pA2DSurface; unsigned int m_hPrintDC; } class menu { declare menu(); declare _menu(); declare Attach(unsigned int hMenu); declare AppendMenu(string item,int flags,int id); declare CheckMenuItem(int nID,int bChecked); declare CreateMenu(opt int bPopup = 0); declare Destroy(); declare Detach(),unsigned int; declare EnableMenu(int pos,int bEnable); declare EnableMenuItem(int nID,int bEnable); declare InsertMenu(unsigned int hMenu,int pos); declare LoadMenu(string *id); declare RemoveMenu(int pos,int nID); //high level creation methods declare BeginMenu(); declare BeginContextMenu(); declare MenuTitle(string name); declare MenuItem(string name,unsigned int style,int id); declare Separator(); declare EndMenu(); declare BeginPopup(string name); declare EndPopup(); //member variables unsigned int m_hMenu; unsigned int m_hMenuTemp; pointer m_pMenuTemp; int m_nSubCount; } class MDIFrameWnd : CWindow { declare virtual Create(int l,int t,int w,int h,int style,int exstyle,string title,CWindow *parent),int; declare virtual Destroy(),int; declare GetActiveChild(),pointer; } class MDIChildWnd : CWindow { declare virtual Create(int l,int t,int w,int h,int style,int exstyle,string title,CWindow *parent),int; declare virtual Destroy(),int; } class CDialog : CWindow { declare CDialog(); declare _CDialog(); declare virtual Create(int l,int t,int w,int h,int style,int exstyle,string title,CWindow *parent),int; declare AddControl(int type,string title,int l,int t,int w,int h,int style,int exstyle,int ID); declare AddControlEx(string classname,string title,int l,int t,int w,int h,int style,int exstyle,int ID); declare CloseDialog(int nReturn); declare DoModal(),int; declare ShowDialog(opt parwin=NULL as POINTER),INT; declare GetControl(int nID),pointer; } //control classes //Base class for all control classes class CControl : CWindow { declare CControl(); declare virtual SetColor(unsigned int fg,unsigned int bg); declare virtual SetText(string text); declare virtual GetText(),heap; declare virtual Create(int l,int t,int w,int h,int style,int nID,string title,CWindow *parent),int; declare virtual OnControlColor(unsigned int hdc,unsigned int hwnd),int; declare virtual OnDestroy(),int; //member variables unsigned int m_fg; unsigned int m_bg; } class CButton : CControl { declare CButton(); declare DrawButton(lpdis as DRAWITEMSTRUCT); declare SetImage(hBitmap as unsigned int); declare GetImage(),unsigned int; declare SetCheck(int bChecked); declare GetCheck(),int; declare virtual Create(int l,int t,int w,int h,int style,int nID,string title,CWindow *parent),int; declare virtual OnDestroy(),int; declare virtual OnDrawItem(int nID,DRAWITEMSTRUCT lpdis),INT; } class CEdit : CControl { declare CEdit(); declare CanUndo(),int; declare CharFromPos(POINT pos),int; declare Clear(); declare Copy(); declare Cut(); declare EmptyUndoBuffer(); declare FmtLines(int bAddEOL); declare GetFirstVisibleLine(),int; declare GetLimitText(),unsigned int; declare GetLine(int pos),heap; declare GetLineCount(),int; declare GetLeftMargin(),int; declare GetRightMargin(),int; declare GetModified(),int; declare GetRect(),RECT; declare GetSel(int start BYREF,int end BYREF); declare LineFromChar(opt int nIndex=-1),int; declare LineIndex(opt int nLine=-1),int; declare LineLength(opt int nLine=-1),int; declare LineScroll(int nLines,opt int nChars=0); declare Paste(); declare PosFromChar(unsigned int nChar),POINT; declare ReplaceSel(string text,opt int bCanUndo=0); declare SetLimitText(unsigned int nMax); declare SetMargins(int nLeft,int nRight); declare SetModified(opt int bModified=true); declare SetPasswordChar(unsigned byte ch); declare SetReadOnly(opt int bReadOnly=true); declare SetRect(RECT lpRect); declare SetSel(int nStart,int nEnd,opt int bNoScroll=false); declare Undo(); declare virtual Create(int l,int t,int w,int h,int style,int nID,string title,CWindow *parent),int; } class CStatic : CControl { declare CStatic(); declare SetImage(hBitmap as unsigned int); declare GetImage(),unsigned int; declare virtual Create(int l,int t,int w,int h,int style,int nID,string title,CWindow *parent),int; declare virtual OnDestroy(),int; } class CListBox : CControl { declare CListBox(); declare AddString(string text); declare DeleteString(int pos); declare FindString(int nStartAfter, string lpszItem),int; declare FindStringExact(int nStartAfter, string lpszItem),int; declare GetCaretIndex(),int; declare GetCount(),int; declare GetCurSel(),int; declare GetHorizontalExtent(),int; declare GetItemData(int pos),int; declare GetSel(int pos),int; declare GetSelCount(),int; declare GetSelItems(int nMaxItems, int *rgIndex ),int; declare GetItemText(int pos),heap; declare GetItemTextLength(int pos),int; declare GetTopIndex(),int; declare InsertString( int nIndex, string lpszItem ); declare ResetContent(); declare SelectString( int nStartAfter, string lpszItem ),int; declare SelItemRange( int bSelect, int nFirstItem, int nLastItem ); declare SetCaretIndex( int nIndex, opt int bScroll = TRUE ); declare SetColumnWidth( int cxWidth ); declare SetCurSel( int nSelect ); declare SetHorizontalExtent( int cxExtent ); declare SetItemData( int nIndex, unsigned int dwItemData ); declare SetSel( int nIndex, opt int bSelect = TRUE ); declare SetTopIndex( int nIndex ); declare virtual Create(int l,int t,int w,int h,int style,int nID,string title,CWindow *parent),int; } class CComboBox : CControl { declare CComboBox(); declare AddString(string text); declare DeleteString(int pos); declare FindString(int nStartAfter, string lpszItem),int; declare FindStringExact(int nStartAfter, string lpszItem),int; declare GetCount(),int; declare GetCurSel(),int; declare GetDroppedState(),int; declare GetHorizontalExtent(),int; declare GetItemData(int pos),int; declare GetItemText(int pos),heap; declare GetTopIndex(),int; declare InsertString( int nIndex, string lpszItem ); declare LimitText(int nMaxChars); declare ResetContent(); declare SelectString( int nStartAfter, string lpszItem ),int; declare SetCurSel( int nSelect ); declare SetEditSel( int nStartChar, int nEndChar ); declare SetHorizontalExtent( int cxExtent ); declare SetItemData( int nIndex, unsigned int dwItemData ); declare SetTopIndex( int nIndex ); declare ShowDropDown( opt int bShowIt = TRUE ); declare virtual Create(int l,int t,int w,int h,int style,int nID,string title,CWindow *parent),int; } class CScrollBar:CControl { declare CScrollBar(); declare GetScrollRange(int nMin byref,int nMax byref); declare GetScrollPos(),int; declare GetThumbPos(),int; declare SetScrollRange(int nMin,int nMax); declare SetScrollPos(int nPos); declare virtual Create(int l,int t,int w,int h,int style,int nID,string title,CWindow *parent),int; } class CStatusBar:CControl { declare CStatusBar(); declare CreateBar(int style,int nID,CWindow *parent),int; declare GetPaneText(int nPane),heap; declare Resize(); declare SetPanes(int nCount,int sizes[]); declare SetPaneText(int nPane,string text); } class CListView:CControl { declare CListView(); declare DeleteAllItems(); declare DeleteColumn(int nCol); declare DeleteItem(int nItem); declare EnsureVisible(int nItem,int bPartialOK); declare GetBkColor(),unsigned int; declare GetColumnText(int nCol),heap; declare GetColunmWidth(int nCol),int; declare GetItemText(int nItem,int nSubItem),heap; declare GetTopIndex(),int; declare GetCount(),int; declare GetSel(int nItem),int; declare GetSelCount(),int; declare InsertColumn( int nCol, string lpszColumnHeading, opt int nFormat = 0,opt int nWidth=-1,opt int nSubItem=-1); declare InsertItem( int nItem, string lpszItem, opt int nImage=-1 ); declare SetBkColor(unsigned int nColor); declare SetItemText(int nItem,int nSubItem,string lpszItem); declare SetColumnText(int nCol,string lpszColumnHeading,opt int nWidth = -1); declare SetColumnWidth(int nCol,int cxWidth); declare SetExtendedStyle(unsigned int exStyle); declare SetSel(int nItem); declare virtual Create(int l,int t,int w,int h,int style,int nID,string title,CWindow *parent),int; } class CRichEdit : CControl { pointer pREOLECallBack; declare CRichEdit(); declare CanUndo(),int; declare Clear(); declare Copy(); declare Cut(); declare EmptyUndoBuffer(); declare FindText(string text,int nStartPos,int nIgnoreCase),int; declare GetEventMask(),int; declare GetFirstVisibleLine(),int; declare GetLimitText(),int; declare GetLine(int nIndex),heap; declare GetLineCount(),int; declare GetModified(),int; declare GetRect(),RECT; declare GetSel(int start BYREF,int end BYREF); declare GetSelText(),heap; declare GetTextLength(),int; declare HideSelection(int bHide); declare LineFromChar(opt int nIndex=-1),int; declare LineIndex(opt int nLine=-1),int; declare LineLength(opt int nLine=-1),int; declare LineScroll(int nLines,opt int nChars=0); declare LoadFile(string sFileName,int nFormat),int; declare LoadFromString(string sText,int nFormat),int; declare Paste(); declare PasteSpecial(unsigned int nClipFormat,unsigned int dvAspect = 0,unsigned int hMF = 0); declare PosFromChar(int nChar),POINT; declare Print(opt int nMargin = 770); declare ReplaceSel(string lpszNewText,opt int bCanUndo = FALSE); declare SaveFile(string sFileName,int nFormat),int; declare SaveToString(int nFormat),heap; declare SetAlignment(unsigned int uAlign); declare SetOffset(int iOffset); declare SetDefaultColor(unsigned int uColor); declare SetDefaultFont(string sFaceName,int nHeight,int bBold,unsigned int dwStyle); declare SetEventMask(unsigned int dwEventMask); declare SetLimitText(int nMaxChars); declare SetLineWidth(int nWidth); declare SetMargins(int nLeft,int nRight); declare SetModified(opt int bModified=true); declare SetReadOnly(opt int bReadOnly=true); declare SetRect(RECT lpRect); declare SetSel(int nStart,int nEnd,opt int bNoScroll=false); declare SetSelColor(unsigned int uColor); declare SetSelFont(string sFaceName,int nHeight,int bBold,unsigned int dwStyle); declare SetWordWrap(opt int bWrap=true); declare Undo(); declare virtual Create(int l,int t,int w,int h,int style,int nID,string title,CWindow *parent),int; declare OnCreate(),int; } class CTabCtrl : CControl { declare DeleteAllTabs(); declare DeleteTab(item as INT); declare GetFocusTab(),INT; declare GetItemData(tab as INT),unsigned int; declare GetRowCount(),INT; declare GetSelectedTab(),int; declare GetTabCount(),INT; declare GetTabText(item as INT),STRING; declare HighlightTab(item as INT,bHighlight as INT); declare HitTest(x as INT,y as INT),INT; declare InsertTab(index as INT,item as STRING,OPT iImage = -1 as INT); declare SetFocusTab(item as INT); declare SetImage(tab as INT,iImage as INT); declare SetImageList(himl as unsigned int); declare SetItemData(tab as INT,value as unsigned int); declare SetMinTabSize(cx as INT); declare SetSelectedTab(item as INT); declare SetTabText(item as INT,text as STRING); declare SetTip(tab as INT,text as STRING); declare CTabCtrl(); declare virtual Create(int l,int t,int w,int h,int style,int nID,string title,CWindow *parent),int; } class CTreeView : CControl { declare CTreeView(); declare DeleteAllItems(),INT; declare DeleteItem(handle as unsigned int),INT; declare GetItemData(handle as unsigned int),unsigned int; declare GetItemText(handle as unsigned int,strText as STRING,cchTextMax as unsigned int),unsigned int; declare GetSelectedItem(),unsigned int; declare InsertItem(strText as STRING,parent as unsigned int),unsigned int; declare SelectItem(handle as unsigned int),INT; declare SetItemData(handle as unsigned int,nData as unsigned int),unsigned int; declare SetItemText(handle as unsigned int,strText as STRING),unsigned int; declare virtual Create(int l,int t,int w,int h,int style,int nID,string title,CWindow *parent),int; } //functions declare extern CLOSEPRINTER(unsigned int hPrinter); declare extern ColorRequest(window *win,OPT unsigned int initcolor=0xFFFFFF),unsigned int; declare extern FontRequest(window win,int vSize BYREF,int vWeight BYREF,unsigned int vFlags BYREF,unsigned int vColor BYREF,OPT string name),HEAP; declare extern MessageBox(window *win,string text,string caption,OPT unsigned int flags),int; declare extern OpenPrinter(STRING name,STRING title,STRING mode),unsigned int; declare extern PrtDialog(window *win,int vStart BYREF,int vEnd BYREF,int vCopies BYREF,int vCollate BYREF),STRING; declare extern WAIT(OPT int nosleep=0); declare extern WRITEPRINTER(unsigned int hPrinter,string sData); declare extern RGB(int r,int g,int b),unsigned int; //SetCursor styles #define CS_WAIT 1 #define CS_ARROW 2 #define CS_CUSTOM 3 #define CS_NONE 4 //showwindow constants #define SWHIDE 0 #define SWSHOW 5 #define SWRESTORE 9 #define SWMINIMIZED 2 #define SWMAXIMIZED 3 //SetLineStyle constants #define LSSOLID 0x0 #define LSDASH 0x1 #define LSDOT 0x2 #define LSDASHDOT 0x3 #define LSDASHDOTDOT 0x4 #define LSINSIDE 0x6 //drawmode constants #define TRANSPARENT 0x1 #define OPAQUE 0x2 //SetFont constants #define SFITALIC 0x01 #define SFUNDERLINE 0x10 #define SFSTRIKEOUT 0x20 //SetFont character sets (or'ed in with flags or dwStyle) #define ANSI_CHARSET 0 #define DEFAULT_CHARSET 0x00010000 #define SYMBOL_CHARSET 0x00020000 #define SHIFTJIS_CHARSET 0x00800000 #define HANGEUL_CHARSET 0x00810000 #define GB2312_CHARSET 0x00860000 #define CHINESEBIG5_CHARSET 0x00880000 #define OEM_CHARSET 0x00FF0000 #define JOHAB_CHARSET 0x00820000 #define HEBREW_CHARSET 0x00B10000 #define ARABIC_CHARSET 0x00B20000 #define GREEK_CHARSET 0x00A10000 #define TURKISH_CHARSET 0x00A20000 #define VIETNAMESE_CHARSET 0x00A30000 #define THAI_CHARSET 0x00DE0000 #define EASTEUROPE_CHARSET 0x00EE0000 #define RUSSIAN_CHARSET 0x00CC0000 #define MAC_CHARSET 0x004D0000 #define BALTIC_CHARSET 0x00BA0000 //control types #define CTBUTTON 1 #define CTDEFBUTTON 0x1001 #define CTCHECKBOX 2 #define CTRADIOBUTTON 3 #define CTEDIT 4 #define CTLISTBOX 5 #define CTCOMBOBOX 6 #define CTSTATIC 7 #define CTSCROLLBAR 8 #define CTGROUPBOX 9 #define CTRICHEDIT 10 #define CTLISTVIEW 11 #define CTSTATUS 12 #define CTTREEVIEW 14 #define CTTABCTRL 15 #define CTSLIDER 16 #define CTCUSTOM 99 //button control styles #define ABS_DEFAULT 0x01 #define ABS_BITMAP 0x80 #define ABS_CHECKBOX 0x03 #define ABS_RADIOBUTTON 0x09 #define ABS_GROUPBOX 0x07 #define ABS_OWNERDRAW 0x0B #define ABS_MULTLINE 0x2000 #define ABS_FLAT 0x8000 //edit control styles #define AES_LEFT 0x0 #define AES_RIGHT 0x2 #define AES_MULTILINE 0x4 #define AES_PASSWORD 0x20 #define AES_CENTER 0x1 #define AES_READONLY 0x800 #define AES_AUTOHSCROLL 0x80 #define AES_AUTOVSCROLL 0x40 #define AES_WANTRETURN 0x1000 #define AES_NUMBER 0x2000 //edit control notifications #define ENSETFOCUS 0x100 #define ENKILLFOCUS 0x200 #define ENCHANGE 0x300 #define ENUPDATE 0x400 #define ENERRSPACE 0x500 #define ENMAXTEXT 0x501 #define ENHSCROLL 0x601 #define ENVSCROLL 0x602 //static control styles #define ASS_BITMAP 0xE #define ASS_MULTILINE 0x1 #define ASS_SIMPLE 0xB //listbox control styles #define ALBS_NOTIFY 0x1 #define ALBS_SORT 0x2 #define ALBS_NOREDRAW 0x4 #define ALBS_MULTIPLESEL 0x8 #define ALBS_OWNERDRAWFIXED 0x10 #define ALBS_OWNERDRAWVARIABLE 0x20 #define ALBS_HASSTRINGS 0x40 #define ALBS_USETABSTOPS 0x80 #define ALBS_NOINTEGRALHEIGHT 0x100 #define ALBS_MULTICOLUMN 0x200 #define ALBS_WANTKEYBOARDINPUT 0x400 #define ALBS_EXTENDEDSEL 0x800 #define ALBS_DISABLENOSCROLL 0x1000 #define ALBS_NODATA 0x2000 #define ALBS_STANDARD 0xA00003 //listbox notification messages #define LBNERRSPACE (-2) #define LBNSELCHANGE 1 #define LBNDBLCLK 2 #define LBNSELCANCEL 3 #define LBNSETFOCUS 4 #define LBNKILLFOCUS 5 //combobox control styles #define ACBS_SIMPLE 0x1 #define ACBS_DROPDOWN 0x2 #define ACBS_DROPDOWNLIST 0x3 #define ACBS_OWNERDRAWFIXED 0x10 #define ACBS_OWNERDRAWVARIABLE 0x20 #define ACBS_AUTOHSCROLL 0x40 #define ACBS_OEMCONVERT 0x80 #define ACBS_SORT 0x100 #define ACBS_HASSTRINGS 0x200 #define ACBS_NOINTEGRALHEIGHT 0x400 #define ACBS_DISABLENOSCROLL 0x800 //combobox notification messages #define CBNERRSPACE (-1) #define CBNSELCHANGE 1 #define CBNDBLCLK 2 #define CBNSETFOCUS 3 #define CBNKILLFOCUS 4 #define CBNEDITCHANGE 5 #define CBNEDITUPDATE 6 #define CBNDROPDOWN 7 #define CBNCLOSEUP 8 #define CBNSELENDOK 9 #define CBNSELENDCANCEL 10 //scrollbar styles #define ASBS_HORIZ 0 #define ASBS_VERT 1 #define ASBS_TOPALIGN 0x2 #define ASBS_LEFTALIGN 0x2 #define ASBS_BOTTOMALIGN 0x4 #define ASBS_RIGHTALIGN 0x4 #define ASBS_SIZEBOXTOPLEFTALIGN 0x2 #define ASBS_SIZEBOXBOTTOMRIGHTALIGN 0x4 #define ASBS_SIZEBOX 0x8 //scrollbar commands #define SBLINEUP 0 #define SBLINELEFT 0 #define SBLINEDOWN 1 #define SBLINERIGHT 1 #define SBPAGEUP 2 #define SBPAGELEFT 2 #define SBPAGEDOWN 3 #define SBPAGERIGHT 3 #define SBTHUMBPOSITION 4 #define SBTHUMBTRACK 5 #define SBTOP 6 #define SBLEFT 6 #define SBBOTTOM 7 #define SBRIGHT 7 #define SBENDSCROLL 8 //id's for scrollbars in the window #define SBHORZ 0 #define SBVERT 1 //listview control styles #define ALVS_ALIGNLEFT 0x800 #define ALVS_ALIGNTOP 0x0 #define ALVS_AUTOARRANGE 0x100 #define ALVS_EDITLABELS 0x200 #define ALVS_ICON 0x0 #define ALVS_LIST 0x3 #define ALVS_NOCOLUMNHEADER 0x4000 #define ALVS_NOLABELWRAP 0x80 #define ALVS_NOSCROLL 0x2000 #define ALVS_NOSORTHEADER 0x8000 #define ALVS_REPORT 0x1 #define ALVS_SHOWSELALWAYS 0x8 #define ALVS_SINGLESEL 0x4 #define ALVS_SMALLICON 0x2 #define ALVS_SORTASCENDING 0x10 #define ALVS_SORTDESCENDING 0x20 #define ALVS_EX_FULLROWSELECT 0x20 #define ALVS_EX_GRIDLINES 1 #define ALVS_EX_FLATSB 0x100 #define ALVS_EX_LABELTIP 0x4000 //listview notification messages #define LVNCOLUMNCLICK 0xFFFFFF94 #define LVNKEYDOWN 0xFFFFFF65 #define LVNBEGINLABELEDIT 0xFFFFFF97 #define LVNENDLABELEDIT 0xFFFFFF96 #define LVNITEMCHANGED 0xFFFFFF9B #define LVNITEMCHANGING 0xFFFFFF9C #define LVNINSERTITEM 0xFFFFFF9A #define LVNDELETEITEM 0xFFFFFF99 //Tab control styles #define ATCS_SCROLLOPPOSITE 0x0001 /* assumes multiline tab*/ #define ATCS_BOTTOM 0x0002 #define ATCS_RIGHT 0x0002 #define ATCS_MULTISELECT 0x0004 /* allow multi-select in button mode*/ #define ATCS_FLATBUTTONS 0x0008 #define ATCS_FORCEICONLEFT 0x0010 #define ATCS_FORCELABELLEFT 0x0020 #define ATCS_HOTTRACK 0x0040 #define ATCS_VERTICAL 0x0080 #define ATCS_TABS 0x0000 #define ATCS_BUTTONS 0x0100 #define ATCS_SINGLELINE 0x0000 #define ATCS_MULTILINE 0x0200 #define ATCS_RIGHTJUSTIFY 0x0000 #define ATCS_FIXEDWIDTH 0x0400 #define ATCS_RAGGEDRIGHT 0x0800 #define ATCS_FOCUSONBUTTONDOWN 0x1000 #define ATCS_OWNERDRAWFIXED 0x2000 #define ATCS_TOOLTIPS 0x4000 #define ATCS_FOCUSNEVER 0x8000 //EX styles for use with TCM_SETEXTENDEDSTYLE #define ATCS_EX_FLATSEPARATORS 0x00000001 #define ATCS_EX_REGISTERDROP 0x00000002 //Tab control notification messages #define TCNFIRST (0-550) #define TCNSELCHANGE 0xFFFFFDD9 #define TCNSELCHANGING 0xFFFFFDD8 #define TCNKEYDOWN 0xFFFFFDDA #define TCNGETOBJECT 0xFFFFFDD7 struct NMTCKEYDOWN { NMHDR hdr; WORD wVKey; unsigned int flags; } //TreeView styles #define ATVS_HASBUTTONS 0x0001 #define ATVS_HASLINES 0x0002 #define ATVS_LINESATROOT 0x0004 #define ATVS_EDITLABELS 0x0008 #define ATVS_DISABLEDRAGDROP 0x0010 #define ATVS_SHOWSELALWAYS 0x0020 #define ATVS_RTLREADING 0x0040 #define ATVS_NOTOOLTIPS 0x0080 #define ATVS_CHECKBOXES 0x0100 #define ATVS_TRACKSELECT 0x0200 #define ATVS_SINGLEEXPAND 0x0400 #define ATVS_INFOTIP 0x0800 #define ATVS_FULLROWSELECT 0x1000 #define ATVS_NOSCROLL 0x2000 #define ATVS_NONEVENHEIGHT 0x4000 //TreeView notification messages #define TVNFIRST (0-400) // treeview #define TVNSELCHANGINGA (TVNFIRST-1) #define TVNSELCHANGINGW (TVNFIRST-50) #define TVNSELCHANGEDA (TVNFIRST-2) #define TVNSELCHANGEDW (TVNFIRST-51) #define TVNGETDISPINFOA (TVNFIRST-3) #define TVNGETDISPINFOW (TVNFIRST-52) #define TVNSETDISPINFOA (TVNFIRST-4) #define TVNSETDISPINFOW (TVNFIRST-53) #define TVNITEMEXPANDINGA (TVNFIRST-5) #define TVNITEMEXPANDINGW (TVNFIRST-54) #define TVNITEMEXPANDEDA (TVNFIRST-6) #define TVNITEMEXPANDEDW (TVNFIRST-55) #define TVNBEGINDRAGA (TVNFIRST-7) #define TVNBEGINDRAGW (TVNFIRST-56) #define TVNBEGINRDRAGA (TVNFIRST-8) #define TVNBEGINRDRAGW (TVNFIRST-57) #define TVNDELETEITEMA (TVNFIRST-9) #define TVNDELETEITEMW (TVNFIRST-58) #define TVNBEGINLABELEDITA (TVNFIRST-10) #define TVNBEGINLABELEDITW (TVNFIRST-59) #define TVNENDLABELEDITA (TVNFIRST-11) #define TVNENDLABELEDITW (TVNFIRST-60) #define TVNKEYDOWN (TVNFIRST-12) #define TVNGETINFOTIPA (TVNFIRST-13) #define TVNGETINFOTIPW (TVNFIRST-14) #define TVNSINGLEEXPAND (TVNFIRST-15) //constants for ADDACCELERATOR #define FALT 0x10 #define FCONTROL 0x8 #define FNOINVERT 0x2 #define FSHIFT 0x4 #define FVIRTKEY 1 //SetRasterOp constants #define RMBLACK 0x1 #define RMWHITE 0x10 #define RMNOP 0xB #define RMNOT 0x6 #define RMCOPYPEN 0xD #define RMNOTCOPYPEN 0x4 #define RMMERGEPENNOT 0xE #define RMMASKPENNOT 0x5 #define RMMERGENOTPEN 0xC #define RMMASKNOTPEN 0x3 #define RMMERGEPEN 0xF #define RMNOTMERGEPEN 0x2 #define RMMASKPEN 0x9 #define RMNOTMASKPEN 0x8 #define RMXORPEN 0x7 #define RMNOTXORPEN 0xA //Aurora specific window styles #define AWS_OVERLAPPED 0x0 #define AWS_AUTODRAW 0x10 #define AWS_POPUP 0x80000000 #define AWS_CHILD 0x40000000 #define AWS_MINIMIZE 0x20000000 #define AWS_VISIBLE 0x10000000 #define AWS_DISABLED 0x8000000 #define AWS_CLIPSIBLINGS 0x4000000 #define AWS_CLIPCHILDREN 0x2000000 #define AWS_MAXIMIZE 0x1000000 #define AWS_CAPTION 0xC00000 //AWS_BORDER | AWS_DLGFRAME #define AWS_BORDER 0x800000 #define AWS_DLGFRAME 0x400000 #define AWS_VSCROLL 0x200000 #define AWS_HSCROLL 0x100000 #define AWS_SYSMENU 0x80000 #define AWS_THICKFRAME 0x40000 #define AWS_GROUP 0x20000 #define AWS_TABSTOP 0x10000 #define AWS_MINIMIZEBOX 0x20000 #define AWS_MAXIMIZEBOX 0x10000 #define AWS_TILED AWS_OVERLAPPED #define AWS_ICONIC AWS_MINIMIZE #define AWS_SIZE AWS_THICKFRAME #define AWS_OVERLAPPEDWINDOW (AWS_OVERLAPPED | AWS_CAPTION | AWS_SYSMENU | AWS_THICKFRAME | AWS_MINIMIZEBOX | AWS_MAXIMIZEBOX) #define AWS_TILEDWINDOW AWS_OVERLAPPEDWINDOW #define AWS_POPUPWINDOW (AWS_POPUP | AWS_BORDER | AWS_SYSMENU) #define AWS_CHILDWINDOW (AWS_CHILD) #define AWS_USEDEFAULT 0x80000000 //Extended Window Styles (windows only) #define AWS_EX_DLGMODALFRAME 0x1 #define AWS_EX_NOPARENTNOTIFY 0x4 #define AWS_EX_TOPMOST 0x8 #define AWS_EX_ACCEPTFILES 0x10 #define AWS_EX_TRANSPARENT 0x20 #define AWS_EX_CLIENTEDGE 0x200 #define AWS_EX_TOOLWINDOW 0x80 //constants used by menus #define AMF_SEPARATOR 0x00000800 #define AMF_STRING 0x00000000 #define AMF_POPUP 0x00000010 #define AMF_BYPOSITION 0x00000400 #define AMF_CHECKED 0x00000008 #define AMF_ENABLED 0x00000000 #define AMF_DISABLED 0x00000002 #define AMF_GRAYED 0x00000001 #define AMF_BYCOMMAND 0x00000000