commctrl.h
资源名称:VCMenu.zip [点击查看]
上传用户:whjcdz88
上传日期:2007-01-02
资源大小:350k
文件大小:181k
源码类别:
工具条
开发平台:
Visual C++
- #define LVCOLUMNW LV_COLUMNW
- #endif
- #define LV_COLUMN LVCOLUMN
- typedef struct tagLVCOLUMNA
- {
- UINT mask;
- int fmt;
- int cx;
- LPSTR pszText;
- int cchTextMax;
- int iSubItem;
- #if (_WIN32_IE >= 0x0300)
- int iImage;
- int iOrder;
- #endif
- } LVCOLUMNA, FAR* LPLVCOLUMNA;
- typedef struct tagLVCOLUMNW
- {
- UINT mask;
- int fmt;
- int cx;
- LPWSTR pszText;
- int cchTextMax;
- int iSubItem;
- #if (_WIN32_IE >= 0x0300)
- int iImage;
- int iOrder;
- #endif
- } LVCOLUMNW, FAR* LPLVCOLUMNW;
- #ifdef UNICODE
- #define LVCOLUMN LVCOLUMNW
- #define LPLVCOLUMN LPLVCOLUMNW
- #else
- #define LVCOLUMN LVCOLUMNA
- #define LPLVCOLUMN LPLVCOLUMNA
- #endif
- #define LVCF_FMT 0x0001
- #define LVCF_WIDTH 0x0002
- #define LVCF_TEXT 0x0004
- #define LVCF_SUBITEM 0x0008
- #if (_WIN32_IE >= 0x0300)
- #define LVCF_IMAGE 0x0010
- #define LVCF_ORDER 0x0020
- #endif
- #define LVCFMT_LEFT 0x0000
- #define LVCFMT_RIGHT 0x0001
- #define LVCFMT_CENTER 0x0002
- #define LVCFMT_JUSTIFYMASK 0x0003
- #if (_WIN32_IE >= 0x0300)
- #define LVCFMT_IMAGE 0x0800
- #define LVCFMT_BITMAP_ON_RIGHT 0x1000
- #define LVCFMT_COL_HAS_IMAGES 0x8000
- #endif
- #define LVM_GETCOLUMNA (LVM_FIRST + 25)
- #define LVM_GETCOLUMNW (LVM_FIRST + 95)
- #ifdef UNICODE
- #define LVM_GETCOLUMN LVM_GETCOLUMNW
- #else
- #define LVM_GETCOLUMN LVM_GETCOLUMNA
- #endif
- #define ListView_GetColumn(hwnd, iCol, pcol)
- (BOOL)SNDMSG((hwnd), LVM_GETCOLUMN, (WPARAM)(int)(iCol), (LPARAM)(LV_COLUMN FAR*)(pcol))
- #define LVM_SETCOLUMNA (LVM_FIRST + 26)
- #define LVM_SETCOLUMNW (LVM_FIRST + 96)
- #ifdef UNICODE
- #define LVM_SETCOLUMN LVM_SETCOLUMNW
- #else
- #define LVM_SETCOLUMN LVM_SETCOLUMNA
- #endif
- #define ListView_SetColumn(hwnd, iCol, pcol)
- (BOOL)SNDMSG((hwnd), LVM_SETCOLUMN, (WPARAM)(int)(iCol), (LPARAM)(const LV_COLUMN FAR*)(pcol))
- #define LVM_INSERTCOLUMNA (LVM_FIRST + 27)
- #define LVM_INSERTCOLUMNW (LVM_FIRST + 97)
- #ifdef UNICODE
- # define LVM_INSERTCOLUMN LVM_INSERTCOLUMNW
- #else
- # define LVM_INSERTCOLUMN LVM_INSERTCOLUMNA
- #endif
- #define ListView_InsertColumn(hwnd, iCol, pcol)
- (int)SNDMSG((hwnd), LVM_INSERTCOLUMN, (WPARAM)(int)(iCol), (LPARAM)(const LV_COLUMN FAR*)(pcol))
- #define LVM_DELETECOLUMN (LVM_FIRST + 28)
- #define ListView_DeleteColumn(hwnd, iCol)
- (BOOL)SNDMSG((hwnd), LVM_DELETECOLUMN, (WPARAM)(int)(iCol), 0)
- #define LVM_GETCOLUMNWIDTH (LVM_FIRST + 29)
- #define ListView_GetColumnWidth(hwnd, iCol)
- (int)SNDMSG((hwnd), LVM_GETCOLUMNWIDTH, (WPARAM)(int)(iCol), 0)
- #define LVSCW_AUTOSIZE -1
- #define LVSCW_AUTOSIZE_USEHEADER -2
- #define LVM_SETCOLUMNWIDTH (LVM_FIRST + 30)
- #define ListView_SetColumnWidth(hwnd, iCol, cx)
- (BOOL)SNDMSG((hwnd), LVM_SETCOLUMNWIDTH, (WPARAM)(int)(iCol), MAKELPARAM((cx), 0))
- #if (_WIN32_IE >= 0x0300)
- #define LVM_GETHEADER (LVM_FIRST + 31)
- #define ListView_GetHeader(hwnd)
- (HWND)SNDMSG((hwnd), LVM_GETHEADER, 0, 0L)
- #endif
- #define LVM_CREATEDRAGIMAGE (LVM_FIRST + 33)
- #define ListView_CreateDragImage(hwnd, i, lpptUpLeft)
- (HIMAGELIST)SNDMSG((hwnd), LVM_CREATEDRAGIMAGE, (WPARAM)(int)(i), (LPARAM)(LPPOINT)(lpptUpLeft))
- #define LVM_GETVIEWRECT (LVM_FIRST + 34)
- #define ListView_GetViewRect(hwnd, prc)
- (BOOL)SNDMSG((hwnd), LVM_GETVIEWRECT, 0, (LPARAM)(RECT FAR*)(prc))
- #define LVM_GETTEXTCOLOR (LVM_FIRST + 35)
- #define ListView_GetTextColor(hwnd)
- (COLORREF)SNDMSG((hwnd), LVM_GETTEXTCOLOR, 0, 0L)
- #define LVM_SETTEXTCOLOR (LVM_FIRST + 36)
- #define ListView_SetTextColor(hwnd, clrText)
- (BOOL)SNDMSG((hwnd), LVM_SETTEXTCOLOR, 0, (LPARAM)(COLORREF)(clrText))
- #define LVM_GETTEXTBKCOLOR (LVM_FIRST + 37)
- #define ListView_GetTextBkColor(hwnd)
- (COLORREF)SNDMSG((hwnd), LVM_GETTEXTBKCOLOR, 0, 0L)
- #define LVM_SETTEXTBKCOLOR (LVM_FIRST + 38)
- #define ListView_SetTextBkColor(hwnd, clrTextBk)
- (BOOL)SNDMSG((hwnd), LVM_SETTEXTBKCOLOR, 0, (LPARAM)(COLORREF)(clrTextBk))
- #define LVM_GETTOPINDEX (LVM_FIRST + 39)
- #define ListView_GetTopIndex(hwndLV)
- (int)SNDMSG((hwndLV), LVM_GETTOPINDEX, 0, 0)
- #define LVM_GETCOUNTPERPAGE (LVM_FIRST + 40)
- #define ListView_GetCountPerPage(hwndLV)
- (int)SNDMSG((hwndLV), LVM_GETCOUNTPERPAGE, 0, 0)
- #define LVM_GETORIGIN (LVM_FIRST + 41)
- #define ListView_GetOrigin(hwndLV, ppt)
- (BOOL)SNDMSG((hwndLV), LVM_GETORIGIN, (WPARAM)0, (LPARAM)(POINT FAR*)(ppt))
- #define LVM_UPDATE (LVM_FIRST + 42)
- #define ListView_Update(hwndLV, i)
- (BOOL)SNDMSG((hwndLV), LVM_UPDATE, (WPARAM)i, 0L)
- #define LVM_SETITEMSTATE (LVM_FIRST + 43)
- #define ListView_SetItemState(hwndLV, i, data, mask)
- { LV_ITEM _ms_lvi;
- _ms_lvi.stateMask = mask;
- _ms_lvi.state = data;
- SNDMSG((hwndLV), LVM_SETITEMSTATE, (WPARAM)i, (LPARAM)(LV_ITEM FAR *)&_ms_lvi);
- }
- #define LVM_GETITEMSTATE (LVM_FIRST + 44)
- #define ListView_GetItemState(hwndLV, i, mask)
- (UINT)SNDMSG((hwndLV), LVM_GETITEMSTATE, (WPARAM)i, (LPARAM)mask)
- #if (_WIN32_IE >= 0x0300)
- #define ListView_GetCheckState(hwndLV, i)
- ((((UINT)(SNDMSG((hwndLV), LVM_GETITEMSTATE, (WPARAM)i, LVIS_STATEIMAGEMASK))) >> 12) -1)
- #endif
- #define LVM_GETITEMTEXTA (LVM_FIRST + 45)
- #define LVM_GETITEMTEXTW (LVM_FIRST + 115)
- #ifdef UNICODE
- #define LVM_GETITEMTEXT LVM_GETITEMTEXTW
- #else
- #define LVM_GETITEMTEXT LVM_GETITEMTEXTA
- #endif
- #define ListView_GetItemText(hwndLV, i, iSubItem_, pszText_, cchTextMax_)
- { LV_ITEM _ms_lvi;
- _ms_lvi.iSubItem = iSubItem_;
- _ms_lvi.cchTextMax = cchTextMax_;
- _ms_lvi.pszText = pszText_;
- SNDMSG((hwndLV), LVM_GETITEMTEXT, (WPARAM)i, (LPARAM)(LV_ITEM FAR *)&_ms_lvi);
- }
- #define LVM_SETITEMTEXTA (LVM_FIRST + 46)
- #define LVM_SETITEMTEXTW (LVM_FIRST + 116)
- #ifdef UNICODE
- #define LVM_SETITEMTEXT LVM_SETITEMTEXTW
- #else
- #define LVM_SETITEMTEXT LVM_SETITEMTEXTA
- #endif
- #define ListView_SetItemText(hwndLV, i, iSubItem_, pszText_)
- { LV_ITEM _ms_lvi;
- _ms_lvi.iSubItem = iSubItem_;
- _ms_lvi.pszText = pszText_;
- SNDMSG((hwndLV), LVM_SETITEMTEXT, (WPARAM)i, (LPARAM)(LV_ITEM FAR *)&_ms_lvi);
- }
- #if (_WIN32_IE >= 0x0300)
- // these flags only apply to LVS_OWNERDATA listviews in report or list mode
- #define LVSICF_NOINVALIDATEALL 0x00000001
- #define LVSICF_NOSCROLL 0x00000002
- #endif
- #define LVM_SETITEMCOUNT (LVM_FIRST + 47)
- #define ListView_SetItemCount(hwndLV, cItems)
- SNDMSG((hwndLV), LVM_SETITEMCOUNT, (WPARAM)cItems, 0)
- #if (_WIN32_IE >= 0x0300)
- #define ListView_SetItemCountEx(hwndLV, cItems, dwFlags)
- SNDMSG((hwndLV), LVM_SETITEMCOUNT, (WPARAM)cItems, (LPARAM)dwFlags)
- #endif
- typedef int (CALLBACK *PFNLVCOMPARE)(LPARAM, LPARAM, LPARAM);
- #define LVM_SORTITEMS (LVM_FIRST + 48)
- #define ListView_SortItems(hwndLV, _pfnCompare, _lPrm)
- (BOOL)SNDMSG((hwndLV), LVM_SORTITEMS, (WPARAM)(LPARAM)_lPrm,
- (LPARAM)(PFNLVCOMPARE)_pfnCompare)
- #define LVM_SETITEMPOSITION32 (LVM_FIRST + 49)
- #define ListView_SetItemPosition32(hwndLV, i, x, y)
- { POINT ptNewPos = {x,y};
- SNDMSG((hwndLV), LVM_SETITEMPOSITION32, (WPARAM)(int)(i), (LPARAM)&ptNewPos);
- }
- #define LVM_GETSELECTEDCOUNT (LVM_FIRST + 50)
- #define ListView_GetSelectedCount(hwndLV)
- (UINT)SNDMSG((hwndLV), LVM_GETSELECTEDCOUNT, 0, 0L)
- #define LVM_GETITEMSPACING (LVM_FIRST + 51)
- #define ListView_GetItemSpacing(hwndLV, fSmall)
- (DWORD)SNDMSG((hwndLV), LVM_GETITEMSPACING, fSmall, 0L)
- #define LVM_GETISEARCHSTRINGA (LVM_FIRST + 52)
- #define LVM_GETISEARCHSTRINGW (LVM_FIRST + 117)
- #ifdef UNICODE
- #define LVM_GETISEARCHSTRING LVM_GETISEARCHSTRINGW
- #else
- #define LVM_GETISEARCHSTRING LVM_GETISEARCHSTRINGA
- #endif
- #define ListView_GetISearchString(hwndLV, lpsz)
- (BOOL)SNDMSG((hwndLV), LVM_GETISEARCHSTRING, 0, (LPARAM)(LPTSTR)lpsz)
- #if (_WIN32_IE >= 0x0300)
- #define LVM_SETICONSPACING (LVM_FIRST + 53)
- // -1 for cx and cy means we'll use the default (system settings)
- // 0 for cx or cy means use the current setting (allows you to change just one param)
- #define ListView_SetIconSpacing(hwndLV, cx, cy)
- (DWORD)SNDMSG((hwndLV), LVM_SETICONSPACING, 0, MAKELONG(cx,cy))
- #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST + 54) // optional wParam == mask
- #define ListView_SetExtendedListViewStyle(hwndLV, dw)
- (DWORD)SNDMSG((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dw)
- #if (_WIN32_IE >= 0x0400)
- #define ListView_SetExtendedListViewStyleEx(hwndLV, dwMask, dw)
- (DWORD)SNDMSG((hwndLV), LVM_SETEXTENDEDLISTVIEWSTYLE, dwMask, dw)
- #endif
- #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST + 55)
- #define ListView_GetExtendedListViewStyle(hwndLV)
- (DWORD)SNDMSG((hwndLV), LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0)
- #define LVS_EX_GRIDLINES 0x00000001
- #define LVS_EX_SUBITEMIMAGES 0x00000002
- #define LVS_EX_CHECKBOXES 0x00000004
- #define LVS_EX_TRACKSELECT 0x00000008
- #define LVS_EX_HEADERDRAGDROP 0x00000010
- #define LVS_EX_FULLROWSELECT 0x00000020 // applies to report mode only
- #define LVS_EX_ONECLICKACTIVATE 0x00000040
- #define LVS_EX_TWOCLICKACTIVATE 0x00000080
- #if (_WIN32_IE >= 0x0400)
- #define LVS_EX_FLATSB 0x00000100 // cannot be cleared
- #define LVS_EX_REGIONAL 0x00000200
- #define LVS_EX_INFOTIP 0x00000400 // listview does InfoTips for you
- #endif
- #define LVM_GETSUBITEMRECT (LVM_FIRST + 56)
- #define ListView_GetSubItemRect(hwnd, iItem, iSubItem, code, prc)
- (BOOL)SNDMSG((hwnd), LVM_GETSUBITEMRECT, (WPARAM)(int)(iItem),
- ((prc) ? ((((LPRECT)(prc))->top = iSubItem), (((LPRECT)(prc))->left = code), (LPARAM)(prc)) : (LPARAM)(LPRECT)NULL))
- #define LVM_SUBITEMHITTEST (LVM_FIRST + 57)
- #define ListView_SubItemHitTest(hwnd, plvhti)
- (int)SNDMSG((hwnd), LVM_SUBITEMHITTEST, 0, (LPARAM)(LPLVHITTESTINFO)(plvhti))
- #define LVM_SETCOLUMNORDERARRAY (LVM_FIRST + 58)
- #define ListView_SetColumnOrderArray(hwnd, iCount, pi)
- (BOOL)SNDMSG((hwnd), LVM_SETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
- #define LVM_GETCOLUMNORDERARRAY (LVM_FIRST + 59)
- #define ListView_GetColumnOrderArray(hwnd, iCount, pi)
- (BOOL)SNDMSG((hwnd), LVM_GETCOLUMNORDERARRAY, (WPARAM)iCount, (LPARAM)(LPINT)pi)
- #define LVM_SETHOTITEM (LVM_FIRST + 60)
- #define ListView_SetHotItem(hwnd, i)
- (int)SNDMSG((hwnd), LVM_SETHOTITEM, (WPARAM)i, 0)
- #define LVM_GETHOTITEM (LVM_FIRST + 61)
- #define ListView_GetHotItem(hwnd)
- (int)SNDMSG((hwnd), LVM_GETHOTITEM, 0, 0)
- #define LVM_SETHOTCURSOR (LVM_FIRST + 62)
- #define ListView_SetHotCursor(hwnd, hcur)
- (HCURSOR)SNDMSG((hwnd), LVM_SETHOTCURSOR, 0, (LPARAM)hcur)
- #define LVM_GETHOTCURSOR (LVM_FIRST + 63)
- #define ListView_GetHotCursor(hwnd)
- (HCURSOR)SNDMSG((hwnd), LVM_GETHOTCURSOR, 0, 0)
- #define LVM_APPROXIMATEVIEWRECT (LVM_FIRST + 64)
- #define ListView_ApproximateViewRect(hwnd, iWidth, iHeight, iCount)
- (DWORD)SNDMSG((hwnd), LVM_APPROXIMATEVIEWRECT, iCount, MAKELPARAM(iWidth, iHeight))
- #endif // _WIN32_IE >= 0x0300
- #if (_WIN32_IE >= 0x0400)
- #define LVM_SETWORKAREAS (LVM_FIRST + 65)
- #define ListView_SetWorkAreas(hwnd, nWorkAreas, prc)
- (BOOL)SNDMSG((hwnd), LVM_SETWORKAREAS, (WPARAM)(int)nWorkAreas, (LPARAM)(RECT FAR*)(prc))
- #define LVM_GETWORKAREAS (LVM_FIRST + 70)
- #define ListView_GetWorkAreas(hwnd, nWorkAreas, prc)
- (BOOL)SNDMSG((hwnd), LVM_GETWORKAREAS, (WPARAM)(int)nWorkAreas, (LPARAM)(RECT FAR*)(prc))
- #define LVM_GETNUMBEROFWORKAREAS (LVM_FIRST + 73)
- #define ListView_GetNumberOfWorkAreas(hwnd, pnWorkAreas)
- (BOOL)SNDMSG((hwnd), LVM_GETNUMBEROFWORKAREAS, 0, (LPARAM)(UINT *)(pnWorkAreas))
- #define LVM_GETSELECTIONMARK (LVM_FIRST + 66)
- #define ListView_GetSelectionMark(hwnd)
- (int)SNDMSG((hwnd), LVM_GETSELECTIONMARK, 0, 0)
- #define LVM_SETSELECTIONMARK (LVM_FIRST + 67)
- #define ListView_SetSelectionMark(hwnd, i)
- (int)SNDMSG((hwnd), LVM_SETSELECTIONMARK, 0, (LPARAM)i)
- #define LVM_SETHOVERTIME (LVM_FIRST + 71)
- #define ListView_SetHoverTime(hwndLV, dwHoverTimeMs)
- (DWORD)SendMessage((hwndLV), LVM_SETHOVERTIME, 0, dwHoverTimeMs)
- #define LVM_GETHOVERTIME (LVM_FIRST + 72)
- #define ListView_GetHoverTime(hwndLV)
- (DWORD)SendMessage((hwndLV), LVM_GETHOVERTIME, 0, 0)
- typedef struct tagLVBKIMAGEA
- {
- ULONG ulFlags; // LVBKIF_*
- HBITMAP hbm;
- LPSTR pszImage;
- UINT cchImageMax;
- int xOffsetPercent;
- int yOffsetPercent;
- } LVBKIMAGEA, FAR *LPLVBKIMAGEA;
- typedef struct tagLVBKIMAGEW
- {
- ULONG ulFlags; // LVBKIF_*
- HBITMAP hbm;
- LPWSTR pszImage;
- UINT cchImageMax;
- int xOffsetPercent;
- int yOffsetPercent;
- } LVBKIMAGEW, FAR *LPLVBKIMAGEW;
- #define LVBKIF_SOURCE_NONE 0x00000000
- #define LVBKIF_SOURCE_HBITMAP 0x00000001
- #define LVBKIF_SOURCE_URL 0x00000002
- #define LVBKIF_SOURCE_MASK 0x00000003
- #define LVBKIF_STYLE_NORMAL 0x00000000
- #define LVBKIF_STYLE_TILE 0x00000010
- #define LVBKIF_STYLE_MASK 0x00000010
- #define LVM_SETBKIMAGEA (LVM_FIRST + 68)
- #define LVM_SETBKIMAGEW (LVM_FIRST + 138)
- #define LVM_GETBKIMAGEA (LVM_FIRST + 69)
- #define LVM_GETBKIMAGEW (LVM_FIRST + 139)
- #ifdef UNICODE
- #define LVBKIMAGE LVBKIMAGEW
- #define LPLVBKIMAGE LPLVBKIMAGEW
- #define LVM_SETBKIMAGE LVM_SETBKIMAGEW
- #define LVM_GETBKIMAGE LVM_GETBKIMAGEW
- #else
- #define LVBKIMAGE LVBKIMAGEA
- #define LPLVBKIMAGE LPLVBKIMAGEA
- #define LVM_SETBKIMAGE LVM_SETBKIMAGEA
- #define LVM_GETBKIMAGE LVM_GETBKIMAGEA
- #endif
- #define ListView_SetBkImage(hwnd, plvbki)
- (BOOL)SNDMSG((hwnd), LVM_SETBKIMAGE, 0, (LPARAM)plvbki)
- #define ListView_GetBkImage(hwnd, plvbki)
- (BOOL)SNDMSG((hwnd), LVM_GETBKIMAGE, 0, (LPARAM)plvbki)
- #endif // _WIN32_IE >= 0x0400
- #if (_WIN32_IE >= 0x0300)
- #define LPNM_LISTVIEW LPNMLISTVIEW
- #define NM_LISTVIEW NMLISTVIEW
- #else
- #define tagNMLISTVIEW _NM_LISTVIEW
- #define NMLISTVIEW NM_LISTVIEW
- #define LPNMLISTVIEW LPNM_LISTVIEW
- #endif
- typedef struct tagNMLISTVIEW
- {
- NMHDR hdr;
- int iItem;
- int iSubItem;
- UINT uNewState;
- UINT uOldState;
- UINT uChanged;
- POINT ptAction;
- LPARAM lParam;
- } NMLISTVIEW, FAR *LPNMLISTVIEW;
- #if (_WIN32_IE >= 0x0300)
- typedef struct tagNMLVCUSTOMDRAW
- {
- NMCUSTOMDRAW nmcd;
- COLORREF clrText;
- COLORREF clrTextBk;
- #if (_WIN32_IE >= 0x0400)
- int iSubItem;
- #endif
- } NMLVCUSTOMDRAW, *LPNMLVCUSTOMDRAW;
- typedef struct tagNMLVCACHEHINT
- {
- NMHDR hdr;
- int iFrom;
- int iTo;
- } NMLVCACHEHINT, FAR *LPNMLVCACHEHINT;
- #define LPNM_CACHEHINT LPNMLVCACHEHINT
- #define PNM_CACHEHINT LPNMLVCACHEHINT
- #define NM_CACHEHINT NMLVCACHEHINT
- typedef struct tagNMLVFINDITEM
- {
- NMHDR hdr;
- int iStart;
- LVFINDINFO lvfi;
- } NMLVFINDITEM, FAR *LPNMLVFINDITEM;
- #define PNM_FINDITEM LPNMLVFINDITEM
- #define LPNM_FINDITEM LPNMLVFINDITEM
- #define NM_FINDITEM NMLVFINDITEM
- typedef struct tagNMLVODSTATECHANGE
- {
- NMHDR hdr;
- int iFrom;
- int iTo;
- UINT uNewState;
- UINT uOldState;
- } NMLVODSTATECHANGE, FAR *LPNMLVODSTATECHANGE;
- #define PNM_ODSTATECHANGE LPNMLVODSTATECHANGE
- #define LPNM_ODSTATECHANGE LPNMLVODSTATECHANGE
- #define NM_ODSTATECHANGE NMLVODSTATECHANGE
- #endif // _WIN32_IE >= 0x0300
- #define LVN_ITEMCHANGING (LVN_FIRST-0)
- #define LVN_ITEMCHANGED (LVN_FIRST-1)
- #define LVN_INSERTITEM (LVN_FIRST-2)
- #define LVN_DELETEITEM (LVN_FIRST-3)
- #define LVN_DELETEALLITEMS (LVN_FIRST-4)
- #define LVN_BEGINLABELEDITA (LVN_FIRST-5)
- #define LVN_BEGINLABELEDITW (LVN_FIRST-75)
- #define LVN_ENDLABELEDITA (LVN_FIRST-6)
- #define LVN_ENDLABELEDITW (LVN_FIRST-76)
- #define LVN_COLUMNCLICK (LVN_FIRST-8)
- #define LVN_BEGINDRAG (LVN_FIRST-9)
- #define LVN_BEGINRDRAG (LVN_FIRST-11)
- #if (_WIN32_IE >= 0x0300)
- #define LVN_ODCACHEHINT (LVN_FIRST-13)
- #define LVN_ODFINDITEMA (LVN_FIRST-52)
- #define LVN_ODFINDITEMW (LVN_FIRST-79)
- #define LVN_ITEMACTIVATE (LVN_FIRST-14)
- #define LVN_ODSTATECHANGED (LVN_FIRST-15)
- #ifdef UNICODE
- #define LVN_ODFINDITEM LVN_ODFINDITEMW
- #else
- #define LVN_ODFINDITEM LVN_ODFINDITEMA
- #endif
- #endif // _WIN32_IE >= 0x0300
- #if (_WIN32_IE >= 0x0400)
- #define LVN_HOTTRACK (LVN_FIRST-21)
- #endif
- #define LVN_GETDISPINFOA (LVN_FIRST-50)
- #define LVN_GETDISPINFOW (LVN_FIRST-77)
- #define LVN_SETDISPINFOA (LVN_FIRST-51)
- #define LVN_SETDISPINFOW (LVN_FIRST-78)
- #ifdef UNICODE
- #define LVN_BEGINLABELEDIT LVN_BEGINLABELEDITW
- #define LVN_ENDLABELEDIT LVN_ENDLABELEDITW
- #define LVN_GETDISPINFO LVN_GETDISPINFOW
- #define LVN_SETDISPINFO LVN_SETDISPINFOW
- #else
- #define LVN_BEGINLABELEDIT LVN_BEGINLABELEDITA
- #define LVN_ENDLABELEDIT LVN_ENDLABELEDITA
- #define LVN_GETDISPINFO LVN_GETDISPINFOA
- #define LVN_SETDISPINFO LVN_SETDISPINFOA
- #endif
- #define LVIF_DI_SETITEM 0x1000
- #if (_WIN32_IE >= 0x0300)
- #define LV_DISPINFOA NMLVDISPINFOA
- #define LV_DISPINFOW NMLVDISPINFOW
- #else
- #define tagLVDISPINFO _LV_DISPINFO
- #define NMLVDISPINFOA LV_DISPINFOA
- #define tagLVDISPINFOW _LV_DISPINFOW
- #define NMLVDISPINFOW LV_DISPINFOW
- #endif
- #define LV_DISPINFO NMLVDISPINFO
- typedef struct tagLVDISPINFO {
- NMHDR hdr;
- LVITEMA item;
- } NMLVDISPINFOA, FAR *LPNMLVDISPINFOA;
- typedef struct tagLVDISPINFOW {
- NMHDR hdr;
- LVITEMW item;
- } NMLVDISPINFOW, FAR * LPNMLVDISPINFOW;
- #ifdef UNICODE
- #define NMLVDISPINFO NMLVDISPINFOW
- #else
- #define NMLVDISPINFO NMLVDISPINFOA
- #endif
- #define LVN_KEYDOWN (LVN_FIRST-55)
- #if (_WIN32_IE >= 0x0300)
- #define LV_KEYDOWN NMLVKEYDOWN
- #else
- #define tagLVKEYDOWN _LV_KEYDOWN
- #define NMLVKEYDOWN LV_KEYDOWN
- #endif
- typedef struct tagLVKEYDOWN
- {
- NMHDR hdr;
- WORD wVKey;
- UINT flags;
- } NMLVKEYDOWN, FAR *LPNMLVKEYDOWN;
- #if (_WIN32_IE >= 0x0300)
- #define LVN_MARQUEEBEGIN (LVN_FIRST-56)
- #endif
- #if (_WIN32_IE >= 0x0400)
- typedef struct tagNMLVGETINFOTIPA
- {
- NMHDR hdr;
- DWORD dwFlags;
- LPSTR pszText;
- int cchTextMax;
- int iItem;
- int iSubItem;
- LPARAM lParam;
- } NMLVGETINFOTIPA, *LPNMLVGETINFOTIPA;
- typedef struct tagNMLVGETINFOTIPW
- {
- NMHDR hdr;
- DWORD dwFlags;
- LPWSTR pszText;
- int cchTextMax;
- int iItem;
- int iSubItem;
- LPARAM lParam;
- } NMLVGETINFOTIPW, *LPNMLVGETINFOTIPW;
- // NMLVGETINFOTIPA.dwFlag values
- #define LVGIT_UNFOLDED 0x0001
- #define LVN_GETINFOTIPA (LVN_FIRST-57)
- #define LVN_GETINFOTIPW (LVN_FIRST-58)
- #ifdef UNICODE
- #define LVN_GETINFOTIP LVN_GETINFOTIPW
- #define NMLVGETINFOTIP NMLVGETINFOTIPW
- #define LPNMLVGETINFOTIP LPNMLVGETINFOTIPW
- #else
- #define LVN_GETINFOTIP LVN_GETINFOTIPA
- #define NMLVGETINFOTIP NMLVGETINFOTIPA
- #define LPNMLVGETINFOTIP LPNMLVGETINFOTIPA
- #endif
- #endif // _WIN32_IE >= 0x0400
- #endif // NOLISTVIEW
- //====== TREEVIEW CONTROL =====================================================
- #ifndef NOTREEVIEW
- #ifdef _WIN32
- #define WC_TREEVIEWA "SysTreeView32"
- #define WC_TREEVIEWW L"SysTreeView32"
- #ifdef UNICODE
- #define WC_TREEVIEW WC_TREEVIEWW
- #else
- #define WC_TREEVIEW WC_TREEVIEWA
- #endif
- #else
- #define WC_TREEVIEW "SysTreeView"
- #endif
- // begin_r_commctrl
- #define TVS_HASBUTTONS 0x0001
- #define TVS_HASLINES 0x0002
- #define TVS_LINESATROOT 0x0004
- #define TVS_EDITLABELS 0x0008
- #define TVS_DISABLEDRAGDROP 0x0010
- #define TVS_SHOWSELALWAYS 0x0020
- #if (_WIN32_IE >= 0x0300)
- #define TVS_RTLREADING 0x0040
- #define TVS_NOTOOLTIPS 0x0080
- #define TVS_CHECKBOXES 0x0100
- #define TVS_TRACKSELECT 0x0200
- #if (_WIN32_IE >= 0x0400)
- #define TVS_SINGLEEXPAND 0x0400
- #define TVS_INFOTIP 0x0800
- #define TVS_FULLROWSELECT 0x1000
- #define TVS_NOSCROLL 0x2000
- #endif
- #endif
- // end_r_commctrl
- typedef struct _TREEITEM FAR* HTREEITEM;
- #define TVIF_TEXT 0x0001
- #define TVIF_IMAGE 0x0002
- #define TVIF_PARAM 0x0004
- #define TVIF_STATE 0x0008
- #define TVIF_HANDLE 0x0010
- #define TVIF_SELECTEDIMAGE 0x0020
- #define TVIF_CHILDREN 0x0040
- #if (_WIN32_IE >= 0x0400)
- #define TVIF_INTEGRAL 0x0080
- #endif
- #define TVIS_SELECTED 0x0002
- #define TVIS_CUT 0x0004
- #define TVIS_DROPHILITED 0x0008
- #define TVIS_BOLD 0x0010
- #define TVIS_EXPANDED 0x0020
- #define TVIS_EXPANDEDONCE 0x0040
- #if (_WIN32_IE >= 0x0300)
- #define TVIS_EXPANDPARTIAL 0x0080
- #endif
- #define TVIS_OVERLAYMASK 0x0F00
- #define TVIS_STATEIMAGEMASK 0xF000
- #define TVIS_USERMASK 0xF000
- #define I_CHILDRENCALLBACK (-1)
- #if (_WIN32_IE >= 0x0300)
- #define LPTV_ITEMW LPTVITEMW
- #define LPTV_ITEMA LPTVITEMA
- #define TV_ITEMW TVITEMW
- #define TV_ITEMA TVITEMA
- #else
- #define tagTVITEMA _TV_ITEMA
- #define TVITEMA TV_ITEMA
- #define LPTVITEMA LPTV_ITEMA
- #define tagTVITEMW _TV_ITEMW
- #define TVITEMW TV_ITEMW
- #define LPTVITEMW LPTV_ITEMW
- #endif
- #define LPTV_ITEM LPTVITEM
- #define TV_ITEM TVITEM
- typedef struct tagTVITEMA {
- UINT mask;
- HTREEITEM hItem;
- UINT state;
- UINT stateMask;
- LPSTR pszText;
- int cchTextMax;
- int iImage;
- int iSelectedImage;
- int cChildren;
- LPARAM lParam;
- } TVITEMA, FAR *LPTVITEMA;
- typedef struct tagTVITEMW {
- UINT mask;
- HTREEITEM hItem;
- UINT state;
- UINT stateMask;
- LPWSTR pszText;
- int cchTextMax;
- int iImage;
- int iSelectedImage;
- int cChildren;
- LPARAM lParam;
- } TVITEMW, FAR *LPTVITEMW;
- #if (_WIN32_IE >= 0x0400)
- // only used for Get and Set messages. no notifies
- typedef struct tagTVITEMEXA {
- UINT mask;
- HTREEITEM hItem;
- UINT state;
- UINT stateMask;
- LPSTR pszText;
- int cchTextMax;
- int iImage;
- int iSelectedImage;
- int cChildren;
- LPARAM lParam;
- int iIntegral;
- } TVITEMEXA, FAR *LPTVITEMEXA;
- // only used for Get and Set messages. no notifies
- typedef struct tagTVITEMEXW {
- UINT mask;
- HTREEITEM hItem;
- UINT state;
- UINT stateMask;
- LPWSTR pszText;
- int cchTextMax;
- int iImage;
- int iSelectedImage;
- int cChildren;
- LPARAM lParam;
- int iIntegral;
- } TVITEMEXW, FAR *LPTVITEMEXW;
- #ifdef UNICODE
- typedef TVITEMEXW TVITEMEX;
- typedef LPTVITEMEXW LPTVITEMEX;
- #else
- typedef TVITEMEXA TVITEMEX;
- typedef LPTVITEMEXA LPTVITEMEX;
- #endif // UNICODE
- #endif
- #ifdef UNICODE
- #define TVITEM TVITEMW
- #define LPTVITEM LPTVITEMW
- #else
- #define TVITEM TVITEMA
- #define LPTVITEM LPTVITEMA
- #endif
- #define TVI_ROOT ((HTREEITEM)0xFFFF0000)
- #define TVI_FIRST ((HTREEITEM)0xFFFF0001)
- #define TVI_LAST ((HTREEITEM)0xFFFF0002)
- #define TVI_SORT ((HTREEITEM)0xFFFF0003)
- #if (_WIN32_IE >= 0x0300)
- #define LPTV_INSERTSTRUCTA LPTVINSERTSTRUCTA
- #define LPTV_INSERTSTRUCTW LPTVINSERTSTRUCTW
- #define TV_INSERTSTRUCTA TVINSERTSTRUCTA
- #define TV_INSERTSTRUCTW TVINSERTSTRUCTW
- #else
- #define tagTVINSERTSTRUCTA _TV_INSERTSTRUCTA
- #define TVINSERTSTRUCTA TV_INSERTSTRUCTA
- #define LPTVINSERTSTRUCTA LPTV_INSERTSTRUCTA
- #define tagTVINSERTSTRUCTW _TV_INSERTSTRUCTW
- #define TVINSERTSTRUCTW TV_INSERTSTRUCTW
- #define LPTVINSERTSTRUCTW LPTV_INSERTSTRUCTW
- #endif
- #define TV_INSERTSTRUCT TVINSERTSTRUCT
- #define LPTV_INSERTSTRUCT LPTVINSERTSTRUCT
- typedef struct tagTVINSERTSTRUCTA {
- HTREEITEM hParent;
- HTREEITEM hInsertAfter;
- #if (_WIN32_IE >= 0x0400)
- union
- {
- TVITEMEXA itemex;
- TV_ITEMA item;
- } DUMMYUNIONNAME;
- #else
- TV_ITEMA item;
- #endif
- } TVINSERTSTRUCTA, FAR *LPTVINSERTSTRUCTA;
- typedef struct tagTVINSERTSTRUCTW {
- HTREEITEM hParent;
- HTREEITEM hInsertAfter;
- #if (_WIN32_IE >= 0x0400)
- union
- {
- TVITEMEXW itemex;
- TV_ITEMW item;
- } DUMMYUNIONNAME;
- #else
- TV_ITEMW item;
- #endif
- } TVINSERTSTRUCTW, FAR *LPTVINSERTSTRUCTW;
- #ifdef UNICODE
- #define TVINSERTSTRUCT TVINSERTSTRUCTW
- #define LPTVINSERTSTRUCT LPTVINSERTSTRUCTW
- #else
- #define TVINSERTSTRUCT TVINSERTSTRUCTA
- #define LPTVINSERTSTRUCT LPTVINSERTSTRUCTA
- #endif
- #define TVM_INSERTITEMA (TV_FIRST + 0)
- #define TVM_INSERTITEMW (TV_FIRST + 50)
- #ifdef UNICODE
- #define TVM_INSERTITEM TVM_INSERTITEMW
- #else
- #define TVM_INSERTITEM TVM_INSERTITEMA
- #endif
- #define TreeView_InsertItem(hwnd, lpis)
- (HTREEITEM)SNDMSG((hwnd), TVM_INSERTITEM, 0, (LPARAM)(LPTV_INSERTSTRUCT)(lpis))
- #define TVM_DELETEITEM (TV_FIRST + 1)
- #define TreeView_DeleteItem(hwnd, hitem)
- (BOOL)SNDMSG((hwnd), TVM_DELETEITEM, 0, (LPARAM)(HTREEITEM)(hitem))
- #define TreeView_DeleteAllItems(hwnd)
- (BOOL)SNDMSG((hwnd), TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT)
- #define TVM_EXPAND (TV_FIRST + 2)
- #define TreeView_Expand(hwnd, hitem, code)
- (BOOL)SNDMSG((hwnd), TVM_EXPAND, (WPARAM)code, (LPARAM)(HTREEITEM)(hitem))
- #define TVE_COLLAPSE 0x0001
- #define TVE_EXPAND 0x0002
- #define TVE_TOGGLE 0x0003
- #if (_WIN32_IE >= 0x0300)
- #define TVE_EXPANDPARTIAL 0x4000
- #endif
- #define TVE_COLLAPSERESET 0x8000
- #define TVM_GETITEMRECT (TV_FIRST + 4)
- #define TreeView_GetItemRect(hwnd, hitem, prc, code)
- (*(HTREEITEM FAR *)prc = (hitem), (BOOL)SNDMSG((hwnd), TVM_GETITEMRECT, (WPARAM)(code), (LPARAM)(RECT FAR*)(prc)))
- #define TVM_GETCOUNT (TV_FIRST + 5)
- #define TreeView_GetCount(hwnd)
- (UINT)SNDMSG((hwnd), TVM_GETCOUNT, 0, 0)
- #define TVM_GETINDENT (TV_FIRST + 6)
- #define TreeView_GetIndent(hwnd)
- (UINT)SNDMSG((hwnd), TVM_GETINDENT, 0, 0)
- #define TVM_SETINDENT (TV_FIRST + 7)
- #define TreeView_SetIndent(hwnd, indent)
- (BOOL)SNDMSG((hwnd), TVM_SETINDENT, (WPARAM)indent, 0)
- #define TVM_GETIMAGELIST (TV_FIRST + 8)
- #define TreeView_GetImageList(hwnd, iImage)
- (HIMAGELIST)SNDMSG((hwnd), TVM_GETIMAGELIST, iImage, 0)
- #define TVSIL_NORMAL 0
- #define TVSIL_STATE 2
- #define TVM_SETIMAGELIST (TV_FIRST + 9)
- #define TreeView_SetImageList(hwnd, himl, iImage)
- (HIMAGELIST)SNDMSG((hwnd), TVM_SETIMAGELIST, iImage, (LPARAM)(UINT)(HIMAGELIST)(himl))
- #define TVM_GETNEXTITEM (TV_FIRST + 10)
- #define TreeView_GetNextItem(hwnd, hitem, code)
- (HTREEITEM)SNDMSG((hwnd), TVM_GETNEXTITEM, (WPARAM)code, (LPARAM)(HTREEITEM)(hitem))
- #define TVGN_ROOT 0x0000
- #define TVGN_NEXT 0x0001
- #define TVGN_PREVIOUS 0x0002
- #define TVGN_PARENT 0x0003
- #define TVGN_CHILD 0x0004
- #define TVGN_FIRSTVISIBLE 0x0005
- #define TVGN_NEXTVISIBLE 0x0006
- #define TVGN_PREVIOUSVISIBLE 0x0007
- #define TVGN_DROPHILITE 0x0008
- #define TVGN_CARET 0x0009
- #if (_WIN32_IE >= 0x0400)
- #define TVGN_LASTVISIBLE 0x000A
- #endif // _WIN32_IE >= 0x0400
- #define TreeView_GetChild(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_CHILD)
- #define TreeView_GetNextSibling(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_NEXT)
- #define TreeView_GetPrevSibling(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_PREVIOUS)
- #define TreeView_GetParent(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_PARENT)
- #define TreeView_GetFirstVisible(hwnd) TreeView_GetNextItem(hwnd, NULL, TVGN_FIRSTVISIBLE)
- #define TreeView_GetNextVisible(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_NEXTVISIBLE)
- #define TreeView_GetPrevVisible(hwnd, hitem) TreeView_GetNextItem(hwnd, hitem, TVGN_PREVIOUSVISIBLE)
- #define TreeView_GetSelection(hwnd) TreeView_GetNextItem(hwnd, NULL, TVGN_CARET)
- #define TreeView_GetDropHilight(hwnd) TreeView_GetNextItem(hwnd, NULL, TVGN_DROPHILITE)
- #define TreeView_GetRoot(hwnd) TreeView_GetNextItem(hwnd, NULL, TVGN_ROOT)
- #if (_WIN32_IE >= 0x0400)
- #define TreeView_GetLastVisible(hwnd) TreeView_GetNextItem(hwnd, NULL, TVGN_LASTVISIBLE)
- #endif // _WIN32_IE >= 0x0400
- #define TVM_SELECTITEM (TV_FIRST + 11)
- #define TreeView_Select(hwnd, hitem, code)
- (BOOL)SNDMSG((hwnd), TVM_SELECTITEM, (WPARAM)code, (LPARAM)(HTREEITEM)(hitem))
- #define TreeView_SelectItem(hwnd, hitem) TreeView_Select(hwnd, hitem, TVGN_CARET)
- #define TreeView_SelectDropTarget(hwnd, hitem) TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
- #define TreeView_SelectSetFirstVisible(hwnd, hitem) TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
- #define TVM_GETITEMA (TV_FIRST + 12)
- #define TVM_GETITEMW (TV_FIRST + 62)
- #ifdef UNICODE
- #define TVM_GETITEM TVM_GETITEMW
- #else
- #define TVM_GETITEM TVM_GETITEMA
- #endif
- #define TreeView_GetItem(hwnd, pitem)
- (BOOL)SNDMSG((hwnd), TVM_GETITEM, 0, (LPARAM)(TV_ITEM FAR*)(pitem))
- #define TVM_SETITEMA (TV_FIRST + 13)
- #define TVM_SETITEMW (TV_FIRST + 63)
- #ifdef UNICODE
- #define TVM_SETITEM TVM_SETITEMW
- #else
- #define TVM_SETITEM TVM_SETITEMA
- #endif
- #define TreeView_SetItem(hwnd, pitem)
- (BOOL)SNDMSG((hwnd), TVM_SETITEM, 0, (LPARAM)(const TV_ITEM FAR*)(pitem))
- #define TVM_EDITLABELA (TV_FIRST + 14)
- #define TVM_EDITLABELW (TV_FIRST + 65)
- #ifdef UNICODE
- #define TVM_EDITLABEL TVM_EDITLABELW
- #else
- #define TVM_EDITLABEL TVM_EDITLABELA
- #endif
- #define TreeView_EditLabel(hwnd, hitem)
- (HWND)SNDMSG((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
- #define TVM_GETEDITCONTROL (TV_FIRST + 15)
- #define TreeView_GetEditControl(hwnd)
- (HWND)SNDMSG((hwnd), TVM_GETEDITCONTROL, 0, 0)
- #define TVM_GETVISIBLECOUNT (TV_FIRST + 16)
- #define TreeView_GetVisibleCount(hwnd)
- (UINT)SNDMSG((hwnd), TVM_GETVISIBLECOUNT, 0, 0)
- #define TVM_HITTEST (TV_FIRST + 17)
- #define TreeView_HitTest(hwnd, lpht)
- (HTREEITEM)SNDMSG((hwnd), TVM_HITTEST, 0, (LPARAM)(LPTV_HITTESTINFO)(lpht))
- #if (_WIN32_IE >= 0x0300)
- #define LPTV_HITTESTINFO LPTVHITTESTINFO
- #define TV_HITTESTINFO TVHITTESTINFO
- #else
- #define tagTVHITTESTINFO _TV_HITTESTINFO
- #define TVHITTESTINFO TV_HITTESTINFO
- #define LPTVHITTESTINFO LPTV_HITTESTINFO
- #endif
- typedef struct tagTVHITTESTINFO {
- POINT pt;
- UINT flags;
- HTREEITEM hItem;
- } TVHITTESTINFO, FAR *LPTVHITTESTINFO;
- #define TVHT_NOWHERE 0x0001
- #define TVHT_ONITEMICON 0x0002
- #define TVHT_ONITEMLABEL 0x0004
- #define TVHT_ONITEM (TVHT_ONITEMICON | TVHT_ONITEMLABEL | TVHT_ONITEMSTATEICON)
- #define TVHT_ONITEMINDENT 0x0008
- #define TVHT_ONITEMBUTTON 0x0010
- #define TVHT_ONITEMRIGHT 0x0020
- #define TVHT_ONITEMSTATEICON 0x0040
- #define TVHT_ABOVE 0x0100
- #define TVHT_BELOW 0x0200
- #define TVHT_TORIGHT 0x0400
- #define TVHT_TOLEFT 0x0800
- #define TVM_CREATEDRAGIMAGE (TV_FIRST + 18)
- #define TreeView_CreateDragImage(hwnd, hitem)
- (HIMAGELIST)SNDMSG((hwnd), TVM_CREATEDRAGIMAGE, 0, (LPARAM)(HTREEITEM)(hitem))
- #define TVM_SORTCHILDREN (TV_FIRST + 19)
- #define TreeView_SortChildren(hwnd, hitem, recurse)
- (BOOL)SNDMSG((hwnd), TVM_SORTCHILDREN, (WPARAM)recurse, (LPARAM)(HTREEITEM)(hitem))
- #define TVM_ENSUREVISIBLE (TV_FIRST + 20)
- #define TreeView_EnsureVisible(hwnd, hitem)
- (BOOL)SNDMSG((hwnd), TVM_ENSUREVISIBLE, 0, (LPARAM)(HTREEITEM)(hitem))
- #define TVM_SORTCHILDRENCB (TV_FIRST + 21)
- #define TreeView_SortChildrenCB(hwnd, psort, recurse)
- (BOOL)SNDMSG((hwnd), TVM_SORTCHILDRENCB, (WPARAM)recurse,
- (LPARAM)(LPTV_SORTCB)(psort))
- #define TVM_ENDEDITLABELNOW (TV_FIRST + 22)
- #define TreeView_EndEditLabelNow(hwnd, fCancel)
- (BOOL)SNDMSG((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
- #define TVM_GETISEARCHSTRINGA (TV_FIRST + 23)
- #define TVM_GETISEARCHSTRINGW (TV_FIRST + 64)
- #ifdef UNICODE
- #define TVM_GETISEARCHSTRING TVM_GETISEARCHSTRINGW
- #else
- #define TVM_GETISEARCHSTRING TVM_GETISEARCHSTRINGA
- #endif
- #if (_WIN32_IE >= 0x0300)
- #define TVM_SETTOOLTIPS (TV_FIRST + 24)
- #define TreeView_SetToolTips(hwnd, hwndTT)
- (HWND)SNDMSG((hwnd), TVM_SETTOOLTIPS, (WPARAM)hwndTT, 0)
- #define TVM_GETTOOLTIPS (TV_FIRST + 25)
- #define TreeView_GetToolTips(hwnd)
- (HWND)SNDMSG((hwnd), TVM_GETTOOLTIPS, 0, 0)
- #endif
- #define TreeView_GetISearchString(hwndTV, lpsz)
- (BOOL)SNDMSG((hwndTV), TVM_GETISEARCHSTRING, 0, (LPARAM)(LPTSTR)lpsz)
- #if (_WIN32_IE >= 0x0400)
- #define TVM_SETINSERTMARK (TV_FIRST + 26)
- #define TreeView_SetInsertMark(hwnd, hItem, fAfter)
- (BOOL)SNDMSG((hwnd), TVM_SETINSERTMARK, (WPARAM) (fAfter), (LPARAM) (hItem))
- #endif
- #if (_WIN32_IE >= 0x0400)
- #define TVM_SETITEMHEIGHT (TV_FIRST + 27)
- #define TreeView_SetItemHeight(hwnd, iHeight)
- (int)SNDMSG((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
- #define TVM_GETITEMHEIGHT (TV_FIRST + 28)
- #define TreeView_GetItemHeight(hwnd)
- (int)SNDMSG((hwnd), TVM_GETITEMHEIGHT, 0, 0)
- #define TVM_SETBKCOLOR (TV_FIRST + 29)
- #define TreeView_SetBkColor(hwnd, clr)
- (COLORREF)SNDMSG((hwnd), TVM_SETBKCOLOR, 0, (LPARAM)clr)
- #define TVM_SETTEXTCOLOR (TV_FIRST + 30)
- #define TreeView_SetTextColor(hwnd, clr)
- (COLORREF)SNDMSG((hwnd), TVM_SETTEXTCOLOR, 0, (LPARAM)clr)
- #define TVM_GETBKCOLOR (TV_FIRST + 31)
- #define TreeView_GetBkColor(hwnd)
- (COLORREF)SNDMSG((hwnd), TVM_GETBKCOLOR, 0, 0)
- #define TVM_GETTEXTCOLOR (TV_FIRST + 32)
- #define TreeView_GetTextColor(hwnd)
- (COLORREF)SNDMSG((hwnd), TVM_GETTEXTCOLOR, 0, 0)
- #define TVM_SETSCROLLTIME (TV_FIRST + 33)
- #define TreeView_SetScrollTime(hwnd, uTime)
- (UINT)SNDMSG((hwnd), TVM_SETSCROLLTIME, uTime, 0)
- #define TVM_GETSCROLLTIME (TV_FIRST + 34)
- #define TreeView_GetScrollTime(hwnd)
- (UINT)SNDMSG((hwnd), TVM_GETSCROLLTIME, 0, 0)
- #define TVM_SETBORDER (TV_FIRST + 35)
- #define TreeView_SetBorder(hwnd, dwFlags, xBorder, yBorder)
- (int)SNDMSG((hwnd), TVM_SETBORDER, (WPARAM)dwFlags, MAKELPARAM(xBorder, yBorder))
- #define TVM_GETBORDER (TV_FIRST + 36)
- #define TreeView_GetBorder(hwnd)
- (int)SNDMSG((hwnd), TVM_GETBORDER, 0, 0)
- #define TVSBF_XBORDER 0x00000001
- #define TVSBF_YBORDER 0x00000002
- #endif
- typedef int (CALLBACK *PFNTVCOMPARE)(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
- #if (_WIN32_IE >= 0x0300)
- #define LPTV_SORTCB LPTVSORTCB
- #define TV_SORTCB TVSORTCB
- #else
- #define tagTVSORTCB _TV_SORTCB
- #define TVSORTCB TV_SORTCB
- #define LPTVSORTCB LPTV_SORTCB
- #endif
- typedef struct tagTVSORTCB
- {
- HTREEITEM hParent;
- PFNTVCOMPARE lpfnCompare;
- LPARAM lParam;
- } TVSORTCB, FAR *LPTVSORTCB;
- #if (_WIN32_IE >= 0x0300)
- #define LPNM_TREEVIEWA LPNMTREEVIEWA
- #define LPNM_TREEVIEWW LPNMTREEVIEWW
- #define NM_TREEVIEWW NMTREEVIEWW
- #define NM_TREEVIEWA NMTREEVIEWA
- #else
- #define tagNMTREEVIEWA _NM_TREEVIEWA
- #define tagNMTREEVIEWW _NM_TREEVIEWW
- #define NMTREEVIEWA NM_TREEVIEWA
- #define NMTREEVIEWW NM_TREEVIEWW
- #define LPNMTREEVIEWA LPNM_TREEVIEWA
- #define LPNMTREEVIEWW LPNM_TREEVIEWW
- #endif
- #define LPNM_TREEVIEW LPNMTREEVIEW
- #define NM_TREEVIEW NMTREEVIEW
- typedef struct tagNMTREEVIEWA {
- NMHDR hdr;
- UINT action;
- TVITEMA itemOld;
- TVITEMA itemNew;
- POINT ptDrag;
- } NMTREEVIEWA, FAR *LPNMTREEVIEWA;
- typedef struct tagNMTREEVIEWW {
- NMHDR hdr;
- UINT action;
- TVITEMW itemOld;
- TVITEMW itemNew;
- POINT ptDrag;
- } NMTREEVIEWW, FAR *LPNMTREEVIEWW;
- #ifdef UNICODE
- #define NMTREEVIEW NMTREEVIEWW
- #define LPNMTREEVIEW LPNMTREEVIEWW
- #else
- #define NMTREEVIEW NMTREEVIEWA
- #define LPNMTREEVIEW LPNMTREEVIEWA
- #endif
- #define TVN_SELCHANGINGA (TVN_FIRST-1)
- #define TVN_SELCHANGINGW (TVN_FIRST-50)
- #define TVN_SELCHANGEDA (TVN_FIRST-2)
- #define TVN_SELCHANGEDW (TVN_FIRST-51)
- #define TVC_UNKNOWN 0x0000
- #define TVC_BYMOUSE 0x0001
- #define TVC_BYKEYBOARD 0x0002
- #define TVN_GETDISPINFOA (TVN_FIRST-3)
- #define TVN_GETDISPINFOW (TVN_FIRST-52)
- #define TVN_SETDISPINFOA (TVN_FIRST-4)
- #define TVN_SETDISPINFOW (TVN_FIRST-53)
- #define TVIF_DI_SETITEM 0x1000
- #if (_WIN32_IE >= 0x0300)
- #define TV_DISPINFOA NMTVDISPINFOA
- #define TV_DISPINFOW NMTVDISPINFOW
- #else
- #define tagTVDISPINFOA _TV_DISPINFOA
- #define NMTVDISPINFOA TV_DISPINFOA
- #define tagTVDISPINFOW _TV_DISPINFOW
- #define NMTVDISPINFOW TV_DISPINFOW
- #endif
- #define TV_DISPINFO NMTVDISPINFO
- typedef struct tagTVDISPINFOA {
- NMHDR hdr;
- TVITEMA item;
- } NMTVDISPINFOA, FAR *LPNMTVDISPINFOA;
- typedef struct tagTVDISPINFOW {
- NMHDR hdr;
- TVITEMW item;
- } NMTVDISPINFOW, FAR *LPNMTVDISPINFOW;
- #ifdef UNICODE
- #define NMTVDISPINFO NMTVDISPINFOW
- #define LPNMTVDISPINFO LPNMTVDISPINFOW
- #else
- #define NMTVDISPINFO NMTVDISPINFOA
- #define LPNMTVDISPINFO LPNMTVDISPINFOA
- #endif
- #define TVN_ITEMEXPANDINGA (TVN_FIRST-5)
- #define TVN_ITEMEXPANDINGW (TVN_FIRST-54)
- #define TVN_ITEMEXPANDEDA (TVN_FIRST-6)
- #define TVN_ITEMEXPANDEDW (TVN_FIRST-55)
- #define TVN_BEGINDRAGA (TVN_FIRST-7)
- #define TVN_BEGINDRAGW (TVN_FIRST-56)
- #define TVN_BEGINRDRAGA (TVN_FIRST-8)
- #define TVN_BEGINRDRAGW (TVN_FIRST-57)
- #define TVN_DELETEITEMA (TVN_FIRST-9)
- #define TVN_DELETEITEMW (TVN_FIRST-58)
- #define TVN_BEGINLABELEDITA (TVN_FIRST-10)
- #define TVN_BEGINLABELEDITW (TVN_FIRST-59)
- #define TVN_ENDLABELEDITA (TVN_FIRST-11)
- #define TVN_ENDLABELEDITW (TVN_FIRST-60)
- #define TVN_KEYDOWN (TVN_FIRST-12)
- #if (_WIN32_IE >= 0x0400)
- #define TVN_GETINFOTIPA (TVN_FIRST-13)
- #define TVN_GETINFOTIPW (TVN_FIRST-14)
- #define TVN_SINGLEEXPAND (TVN_FIRST-15)
- #endif // 0x400
- #if (_WIN32_IE >= 0x0300)
- #define TV_KEYDOWN NMTVKEYDOWN
- #else
- #define tagTVKEYDOWN _TV_KEYDOWN
- #define NMTVKEYDOWN TV_KEYDOWN
- #endif
- typedef struct tagTVKEYDOWN {
- NMHDR hdr;
- WORD wVKey;
- UINT flags;
- } NMTVKEYDOWN, FAR *LPNMTVKEYDOWN;
- #ifdef UNICODE
- #define TVN_SELCHANGING TVN_SELCHANGINGW
- #define TVN_SELCHANGED TVN_SELCHANGEDW
- #define TVN_GETDISPINFO TVN_GETDISPINFOW
- #define TVN_SETDISPINFO TVN_SETDISPINFOW
- #define TVN_ITEMEXPANDING TVN_ITEMEXPANDINGW
- #define TVN_ITEMEXPANDED TVN_ITEMEXPANDEDW
- #define TVN_BEGINDRAG TVN_BEGINDRAGW
- #define TVN_BEGINRDRAG TVN_BEGINRDRAGW
- #define TVN_DELETEITEM TVN_DELETEITEMW
- #define TVN_BEGINLABELEDIT TVN_BEGINLABELEDITW
- #define TVN_ENDLABELEDIT TVN_ENDLABELEDITW
- #else
- #define TVN_SELCHANGING TVN_SELCHANGINGA
- #define TVN_SELCHANGED TVN_SELCHANGEDA
- #define TVN_GETDISPINFO TVN_GETDISPINFOA
- #define TVN_SETDISPINFO TVN_SETDISPINFOA
- #define TVN_ITEMEXPANDING TVN_ITEMEXPANDINGA
- #define TVN_ITEMEXPANDED TVN_ITEMEXPANDEDA
- #define TVN_BEGINDRAG TVN_BEGINDRAGA
- #define TVN_BEGINRDRAG TVN_BEGINRDRAGA
- #define TVN_DELETEITEM TVN_DELETEITEMA
- #define TVN_BEGINLABELEDIT TVN_BEGINLABELEDITA
- #define TVN_ENDLABELEDIT TVN_ENDLABELEDITA
- #endif
- #if (_WIN32_IE >= 0x0300)
- typedef struct tagNMTVCUSTOMDRAW
- {
- NMCUSTOMDRAW nmcd;
- COLORREF clrText;
- COLORREF clrTextBk;
- #if (_WIN32_IE >= 0x0400)
- int iLevel;
- #endif
- } NMTVCUSTOMDRAW, *LPNMTVCUSTOMDRAW;
- #endif
- #if (_WIN32_IE >= 0x0400)
- typedef struct tagNMTVGETINFOTIPA
- {
- NMHDR hdr;
- LPSTR pszText;
- int cchTextMax;
- HTREEITEM hItem;
- LPARAM lParam;
- } NMTVGETINFOTIPA, *LPNMTVGETINFOTIPA;
- typedef struct tagNMTVGETINFOTIPW
- {
- NMHDR hdr;
- LPWSTR pszText;
- int cchTextMax;
- HTREEITEM hItem;
- LPARAM lParam;
- } NMTVGETINFOTIPW, *LPNMTVGETINFOTIPW;
- #ifdef UNICODE
- #define TVN_GETINFOTIP TVN_GETINFOTIPW
- #define NMTVGETINFOTIP NMTVGETINFOTIPW
- #define LPNMTVGETINFOTIP LPNMTVGETINFOTIPW
- #else
- #define TVN_GETINFOTIP TVN_GETINFOTIPA
- #define NMTVGETINFOTIP NMTVGETINFOTIPA
- #define LPNMTVGETINFOTIP LPNMTVGETINFOTIPA
- #endif
- // treeview's customdraw return meaning don't draw images. valid on CDRF_NOTIFYITEMPREPAINT
- #define TVCDRF_NOIMAGES 0x00010000
- #endif // _WIN32_IE >= 0x0400
- #endif // NOTREEVIEW
- #if (_WIN32_IE >= 0x0300)
- #ifndef NOUSEREXCONTROLS
- //////////////////// ComboBoxEx ////////////////////////////////
- #define WC_COMBOBOXEXW L"ComboBoxEx32"
- #define WC_COMBOBOXEXA "ComboBoxEx32"
- #ifdef UNICODE
- #define WC_COMBOBOXEX WC_COMBOBOXEXW
- #else
- #define WC_COMBOBOXEX WC_COMBOBOXEXA
- #endif
- #define CBEIF_TEXT 0x00000001
- #define CBEIF_IMAGE 0x00000002
- #define CBEIF_SELECTEDIMAGE 0x00000004
- #define CBEIF_OVERLAY 0x00000008
- #define CBEIF_INDENT 0x00000010
- #define CBEIF_LPARAM 0x00000020
- #define CBEIF_DI_SETITEM 0x10000000
- typedef struct tagCOMBOBOXEXITEMA
- {
- UINT mask;
- int iItem;
- LPSTR pszText;
- int cchTextMax;
- int iImage;
- int iSelectedImage;
- int iOverlay;
- int iIndent;
- LPARAM lParam;
- } COMBOBOXEXITEMA, *PCOMBOBOXEXITEMA;
- typedef COMBOBOXEXITEMA CONST *PCCOMBOEXITEMA;
- typedef struct tagCOMBOBOXEXITEMW
- {
- UINT mask;
- int iItem;
- LPWSTR pszText;
- int cchTextMax;
- int iImage;
- int iSelectedImage;
- int iOverlay;
- int iIndent;
- LPARAM lParam;
- } COMBOBOXEXITEMW, *PCOMBOBOXEXITEMW;
- typedef COMBOBOXEXITEMW CONST *PCCOMBOEXITEMW;
- #ifdef UNICODE
- #define COMBOBOXEXITEM COMBOBOXEXITEMW
- #define PCOMBOBOXEXITEM PCOMBOBOXEXITEMW
- #define PCCOMBOBOXEXITEM PCCOMBOBOXEXITEMW
- #else
- #define COMBOBOXEXITEM COMBOBOXEXITEMA
- #define PCOMBOBOXEXITEM PCOMBOBOXEXITEMA
- #define PCCOMBOBOXEXITEM PCCOMBOBOXEXITEMA
- #endif
- #define CBEM_INSERTITEMA (WM_USER + 1)
- #define CBEM_SETIMAGELIST (WM_USER + 2)
- #define CBEM_GETIMAGELIST (WM_USER + 3)
- #define CBEM_GETITEMA (WM_USER + 4)
- #define CBEM_SETITEMA (WM_USER + 5)
- #define CBEM_DELETEITEM CB_DELETESTRING
- #define CBEM_GETCOMBOCONTROL (WM_USER + 6)
- #define CBEM_GETEDITCONTROL (WM_USER + 7)
- #if (_WIN32_IE >= 0x0400)
- #define CBEM_SETEXSTYLE (WM_USER + 8) // use SETEXTENDEDSTYLE instead
- #define CBEM_SETEXTENDEDSTYLE (WM_USER + 14) // lparam == new style, wParam (optional) == mask
- #define CBEM_GETEXSTYLE (WM_USER + 9) // use GETEXTENDEDSTYLE instead
- #define CBEM_GETEXTENDEDSTYLE (WM_USER + 9)
- #else
- #define CBEM_SETEXSTYLE (WM_USER + 8)
- #define CBEM_GETEXSTYLE (WM_USER + 9)
- #endif
- #define CBEM_HASEDITCHANGED (WM_USER + 10)
- #define CBEM_INSERTITEMW (WM_USER + 11)
- #define CBEM_SETITEMW (WM_USER + 12)
- #define CBEM_GETITEMW (WM_USER + 13)
- #ifdef UNICODE
- #define CBEM_INSERTITEM CBEM_INSERTITEMW
- #define CBEM_SETITEM CBEM_SETITEMW
- #define CBEM_GETITEM CBEM_GETITEMW
- #else
- #define CBEM_INSERTITEM CBEM_INSERTITEMA
- #define CBEM_SETITEM CBEM_SETITEMA
- #define CBEM_GETITEM CBEM_GETITEMA
- #endif
- #define CBES_EX_NOEDITIMAGE 0x00000001
- #define CBES_EX_NOEDITIMAGEINDENT 0x00000002
- #define CBES_EX_PATHWORDBREAKPROC 0x00000004
- #if (_WIN32_IE >= 0x0400)
- #define CBES_EX_NOSIZELIMIT 0x00000008
- #define CBES_EX_CASESENSITIVE 0x00000010
- typedef struct {
- NMHDR hdr;
- COMBOBOXEXITEMA ceItem;
- } NMCOMBOBOXEXA, *PNMCOMBOBOXEXA;
- typedef struct {
- NMHDR hdr;
- COMBOBOXEXITEMW ceItem;
- } NMCOMBOBOXEXW, *PNMCOMBOBOXEXW;
- #ifdef UNICODE
- #define NMCOMBOBOXEX NMCOMBOBOXEXW
- #define PNMCOMBOBOXEX PNMCOMBOBOXEXW
- #define CBEN_GETDISPINFO CBEN_GETDISPINFOW
- #else
- #define NMCOMBOBOXEX NMCOMBOBOXEXA
- #define PNMCOMBOBOXEX PNMCOMBOBOXEXA
- #define CBEN_GETDISPINFO CBEN_GETDISPINFOA
- #endif
- #else
- typedef struct {
- NMHDR hdr;
- COMBOBOXEXITEM ceItem;
- } NMCOMBOBOXEX, *PNMCOMBOBOXEX;
- #define CBEN_GETDISPINFO (CBEN_FIRST - 0)
- #endif // _WIN32_IE >= 0x0400
- #if (_WIN32_IE >= 0x0400)
- #define CBEN_GETDISPINFOA (CBEN_FIRST - 0)
- #endif
- #define CBEN_INSERTITEM (CBEN_FIRST - 1)
- #define CBEN_DELETEITEM (CBEN_FIRST - 2)
- #define CBEN_BEGINEDIT (CBEN_FIRST - 4)
- #define CBEN_ENDEDITA (CBEN_FIRST - 5)
- #define CBEN_ENDEDITW (CBEN_FIRST - 6)
- #if (_WIN32_IE >= 0x0400)
- #define CBEN_GETDISPINFOW (CBEN_FIRST - 7)
- #endif
- #if (_WIN32_IE >= 0x0400)
- #define CBEN_DRAGBEGINA (CBEN_FIRST - 8)
- #define CBEN_DRAGBEGINW (CBEN_FIRST - 9)
- #ifdef UNICODE
- #define CBEN_DRAGBEGIN CBEN_DRAGBEGINW
- #else
- #define CBEN_DRAGBEGIN CBEN_DRAGBEGINA
- #endif
- #endif//(_WIN32_IE >= 0x0400)
- // lParam specifies why the endedit is happening
- #ifdef UNICODE
- #define CBEN_ENDEDIT CBEN_ENDEDITW
- #else
- #define CBEN_ENDEDIT CBEN_ENDEDITA
- #endif
- #define CBENF_KILLFOCUS 1
- #define CBENF_RETURN 2
- #define CBENF_ESCAPE 3
- #define CBENF_DROPDOWN 4
- #define CBEMAXSTRLEN 260
- #if (_WIN32_IE >= 0x0400)
- // CBEN_DRAGBEGIN sends this information ...
- typedef struct {
- NMHDR hdr;
- int iItemid;
- WCHAR szText[CBEMAXSTRLEN];
- }NMCBEDRAGBEGINW, *LPNMCBEDRAGBEGINW, *PNMCBEDRAGBEGINW;
- typedef struct {
- NMHDR hdr;
- int iItemid;
- char szText[CBEMAXSTRLEN];
- }NMCBEDRAGBEGINA, *LPNMCBEDRAGBEGINA, *PNMCBEDRAGBEGINA;
- #ifdef UNICODE
- #define NMCBEDRAGBEGIN NMCBEDRAGBEGINW
- #define LPNMCBEDRAGBEGIN LPNMCBEDRAGBEGINW
- #define PNMCBEDRAGBEGIN PNMCBEDRAGBEGINW
- #else
- #define NMCBEDRAGBEGIN NMCBEDRAGBEGINA
- #define LPNMCBEDRAGBEGIN LPNMCBEDRAGBEGINA
- #define PNMCBEDRAGBEGIN PNMCBEDRAGBEGINA
- #endif
- #endif // _WIN32_IE >= 0x0400
- // CBEN_ENDEDIT sends this information...
- // fChanged if the user actually did anything
- // iNewSelection gives what would be the new selection unless the notify is failed
- // iNewSelection may be CB_ERR if there's no match
- typedef struct {
- NMHDR hdr;
- BOOL fChanged;
- int iNewSelection;
- WCHAR szText[CBEMAXSTRLEN];
- int iWhy;
- } NMCBEENDEDITW, *LPNMCBEENDEDITW, *PNMCBEENDEDITW;
- typedef struct {
- NMHDR hdr;
- BOOL fChanged;
- int iNewSelection;
- char szText[CBEMAXSTRLEN];
- int iWhy;
- } NMCBEENDEDITA, *LPNMCBEENDEDITA,*PNMCBEENDEDITA;
- #ifdef UNICODE
- #define NMCBEENDEDIT NMCBEENDEDITW
- #define LPNMCBEENDEDIT LPNMCBEENDEDITW
- #define PNMCBEENDEDIT PNMCBEENDEDITW
- #else
- #define NMCBEENDEDIT NMCBEENDEDITA
- #define LPNMCBEENDEDIT LPNMCBEENDEDITA
- #define PNMCBEENDEDIT PNMCBEENDEDITA
- #endif
- #endif
- #endif // _WIN32_IE >= 0x0300
- //====== TAB CONTROL ==========================================================
- #ifndef NOTABCONTROL
- #ifdef _WIN32
- #define WC_TABCONTROLA "SysTabControl32"
- #define WC_TABCONTROLW L"SysTabControl32"
- #ifdef UNICODE
- #define WC_TABCONTROL WC_TABCONTROLW
- #else
- #define WC_TABCONTROL WC_TABCONTROLA
- #endif
- #else
- #define WC_TABCONTROL "SysTabControl"
- #endif
- // begin_r_commctrl
- #if (_WIN32_IE >= 0x0300)
- #define TCS_SCROLLOPPOSITE 0x0001 // assumes multiline tab
- #define TCS_BOTTOM 0x0002
- #define TCS_RIGHT 0x0002
- #define TCS_MULTISELECT 0x0004 // allow multi-select in button mode
- #endif
- #if (_WIN32_IE >= 0x0400)
- #define TCS_FLATBUTTONS 0x0008
- #endif
- #define TCS_FORCEICONLEFT 0x0010
- #define TCS_FORCELABELLEFT 0x0020
- #if (_WIN32_IE >= 0x0300)
- #define TCS_HOTTRACK 0x0040
- #define TCS_VERTICAL 0x0080
- #endif
- #define TCS_TABS 0x0000
- #define TCS_BUTTONS 0x0100
- #define TCS_SINGLELINE 0x0000
- #define TCS_MULTILINE 0x0200
- #define TCS_RIGHTJUSTIFY 0x0000
- #define TCS_FIXEDWIDTH 0x0400
- #define TCS_RAGGEDRIGHT 0x0800
- #define TCS_FOCUSONBUTTONDOWN 0x1000
- #define TCS_OWNERDRAWFIXED 0x2000
- #define TCS_TOOLTIPS 0x4000
- #define TCS_FOCUSNEVER 0x8000
- #if (_WIN32_IE >= 0x0400)
- // EX styles for use with TCM_SETEXTENDEDSTYLE
- #define TCS_EX_FLATSEPARATORS 0x00000001
- #define TCS_EX_REGISTERDROP 0x00000002
- #endif
- // end_r_commctrl
- #define TCM_GETIMAGELIST (TCM_FIRST + 2)
- #define TabCtrl_GetImageList(hwnd)
- (HIMAGELIST)SNDMSG((hwnd), TCM_GETIMAGELIST, 0, 0L)
- #define TCM_SETIMAGELIST (TCM_FIRST + 3)
- #define TabCtrl_SetImageList(hwnd, himl)
- (HIMAGELIST)SNDMSG((hwnd), TCM_SETIMAGELIST, 0, (LPARAM)(UINT)(HIMAGELIST)(himl))
- #define TCM_GETITEMCOUNT (TCM_FIRST + 4)
- #define TabCtrl_GetItemCount(hwnd)
- (int)SNDMSG((hwnd), TCM_GETITEMCOUNT, 0, 0L)
- #define TCIF_TEXT 0x0001
- #define TCIF_IMAGE 0x0002
- #define TCIF_RTLREADING 0x0004
- #define TCIF_PARAM 0x0008
- #if (_WIN32_IE >= 0x0300)
- #define TCIF_STATE 0x0010
- #define TCIS_BUTTONPRESSED 0x0001
- #endif
- #if (_WIN32_IE >= 0x0400)
- #define TCIS_HIGHLIGHTED 0x0002
- #endif
- #if (_WIN32_IE >= 0x0300)
- #define TC_ITEMHEADERA TCITEMHEADERA
- #define TC_ITEMHEADERW TCITEMHEADERW
- #else
- #define tagTCITEMHEADERA _TC_ITEMHEADERA
- #define TCITEMHEADERA TC_ITEMHEADERA
- #define tagTCITEMHEADERW _TC_ITEMHEADERW
- #define TCITEMHEADERW TC_ITEMHEADERW
- #endif
- #define TC_ITEMHEADER TCITEMHEADER
- typedef struct tagTCITEMHEADERA
- {
- UINT mask;
- UINT lpReserved1;
- UINT lpReserved2;
- LPSTR pszText;
- int cchTextMax;
- int iImage;
- } TCITEMHEADERA, FAR *LPTCITEMHEADERA;
- typedef struct tagTCITEMHEADERW
- {
- UINT mask;
- UINT lpReserved1;
- UINT lpReserved2;
- LPWSTR pszText;
- int cchTextMax;
- int iImage;
- } TCITEMHEADERW, FAR *LPTCITEMHEADERW;
- #ifdef UNICODE
- #define TCITEMHEADER TCITEMHEADERW
- #define LPTCITEMHEADER LPTCITEMHEADERW
- #else
- #define TCITEMHEADER TCITEMHEADERA
- #define LPTCITEMHEADER LPTCITEMHEADERA
- #endif
- #if (_WIN32_IE >= 0x0300)
- #define TC_ITEMA TCITEMA
- #define TC_ITEMW TCITEMW
- #else
- #define tagTCITEMA _TC_ITEMA
- #define TCITEMA TC_ITEMA
- #define tagTCITEMW _TC_ITEMW
- #define TCITEMW TC_ITEMW
- #endif
- #define TC_ITEM TCITEM
- typedef struct tagTCITEMA
- {
- UINT mask;
- #if (_WIN32_IE >= 0x0300)
- DWORD dwState;
- DWORD dwStateMask;
- #else
- UINT lpReserved1;
- UINT lpReserved2;
- #endif
- LPSTR pszText;
- int cchTextMax;
- int iImage;
- LPARAM lParam;
- } TCITEMA, FAR *LPTCITEMA;
- typedef struct tagTCITEMW
- {
- UINT mask;
- #if (_WIN32_IE >= 0x0300)
- DWORD dwState;
- DWORD dwStateMask;
- #else
- UINT lpReserved1;
- UINT lpReserved2;
- #endif
- LPWSTR pszText;
- int cchTextMax;
- int iImage;
- LPARAM lParam;
- } TCITEMW, FAR *LPTCITEMW;
- #ifdef UNICODE
- #define TCITEM TCITEMW
- #define LPTCITEM LPTCITEMW
- #else
- #define TCITEM TCITEMA
- #define LPTCITEM LPTCITEMA
- #endif
- #define TCM_GETITEMA (TCM_FIRST + 5)
- #define TCM_GETITEMW (TCM_FIRST + 60)
- #ifdef UNICODE
- #define TCM_GETITEM TCM_GETITEMW
- #else
- #define TCM_GETITEM TCM_GETITEMA
- #endif
- #define TabCtrl_GetItem(hwnd, iItem, pitem)
- (BOOL)SNDMSG((hwnd), TCM_GETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM FAR*)(pitem))
- #define TCM_SETITEMA (TCM_FIRST + 6)
- #define TCM_SETITEMW (TCM_FIRST + 61)
- #ifdef UNICODE
- #define TCM_SETITEM TCM_SETITEMW
- #else
- #define TCM_SETITEM TCM_SETITEMA
- #endif
- #define TabCtrl_SetItem(hwnd, iItem, pitem)
- (BOOL)SNDMSG((hwnd), TCM_SETITEM, (WPARAM)(int)iItem, (LPARAM)(TC_ITEM FAR*)(pitem))
- #define TCM_INSERTITEMA (TCM_FIRST + 7)
- #define TCM_INSERTITEMW (TCM_FIRST + 62)
- #ifdef UNICODE
- #define TCM_INSERTITEM TCM_INSERTITEMW
- #else
- #define TCM_INSERTITEM TCM_INSERTITEMA
- #endif
- #define TabCtrl_InsertItem(hwnd, iItem, pitem)
- (int)SNDMSG((hwnd), TCM_INSERTITEM, (WPARAM)(int)iItem, (LPARAM)(const TC_ITEM FAR*)(pitem))
- #define TCM_DELETEITEM (TCM_FIRST + 8)
- #define TabCtrl_DeleteItem(hwnd, i)
- (BOOL)SNDMSG((hwnd), TCM_DELETEITEM, (WPARAM)(int)(i), 0L)
- #define TCM_DELETEALLITEMS (TCM_FIRST + 9)
- #define TabCtrl_DeleteAllItems(hwnd)
- (BOOL)SNDMSG((hwnd), TCM_DELETEALLITEMS, 0, 0L)
- #define TCM_GETITEMRECT (TCM_FIRST + 10)
- #define TabCtrl_GetItemRect(hwnd, i, prc)
- (BOOL)SNDMSG((hwnd), TCM_GETITEMRECT, (WPARAM)(int)(i), (LPARAM)(RECT FAR*)(prc))
- #define TCM_GETCURSEL (TCM_FIRST + 11)
- #define TabCtrl_GetCurSel(hwnd)
- (int)SNDMSG((hwnd), TCM_GETCURSEL, 0, 0)
- #define TCM_SETCURSEL (TCM_FIRST + 12)
- #define TabCtrl_SetCurSel(hwnd, i)
- (int)SNDMSG((hwnd), TCM_SETCURSEL, (WPARAM)i, 0)
- #define TCHT_NOWHERE 0x0001
- #define TCHT_ONITEMICON 0x0002
- #define TCHT_ONITEMLABEL 0x0004
- #define TCHT_ONITEM (TCHT_ONITEMICON | TCHT_ONITEMLABEL)
- #if (_WIN32_IE >= 0x0300)
- #define LPTC_HITTESTINFO LPTCHITTESTINFO
- #define TC_HITTESTINFO TCHITTESTINFO
- #else
- #define tagTCHITTESTINFO _TC_HITTESTINFO
- #define TCHITTESTINFO TC_HITTESTINFO
- #define LPTCHITTESTINFO LPTC_HITTESTINFO
- #endif
- typedef struct tagTCHITTESTINFO
- {
- POINT pt;
- UINT flags;
- } TCHITTESTINFO, FAR * LPTCHITTESTINFO;
- #define TCM_HITTEST (TCM_FIRST + 13)
- #define TabCtrl_HitTest(hwndTC, pinfo)
- (int)SNDMSG((hwndTC), TCM_HITTEST, 0, (LPARAM)(TC_HITTESTINFO FAR*)(pinfo))
- #define TCM_SETITEMEXTRA (TCM_FIRST + 14)
- #define TabCtrl_SetItemExtra(hwndTC, cb)
- (BOOL)SNDMSG((hwndTC), TCM_SETITEMEXTRA, (WPARAM)(cb), 0L)
- #define TCM_ADJUSTRECT (TCM_FIRST + 40)
- #define TabCtrl_AdjustRect(hwnd, bLarger, prc)
- (int)SNDMSG(hwnd, TCM_ADJUSTRECT, (WPARAM)(BOOL)bLarger, (LPARAM)(RECT FAR *)prc)
- #define TCM_SETITEMSIZE (TCM_FIRST + 41)
- #define TabCtrl_SetItemSize(hwnd, x, y)
- (DWORD)SNDMSG((hwnd), TCM_SETITEMSIZE, 0, MAKELPARAM(x,y))
- #define TCM_REMOVEIMAGE (TCM_FIRST + 42)
- #define TabCtrl_RemoveImage(hwnd, i)
- (void)SNDMSG((hwnd), TCM_REMOVEIMAGE, i, 0L)
- #define TCM_SETPADDING (TCM_FIRST + 43)
- #define TabCtrl_SetPadding(hwnd, cx, cy)
- (void)SNDMSG((hwnd), TCM_SETPADDING, 0, MAKELPARAM(cx, cy))
- #define TCM_GETROWCOUNT (TCM_FIRST + 44)
- #define TabCtrl_GetRowCount(hwnd)
- (int)SNDMSG((hwnd), TCM_GETROWCOUNT, 0, 0L)
- #define TCM_GETTOOLTIPS (TCM_FIRST + 45)
- #define TabCtrl_GetToolTips(hwnd)
- (HWND)SNDMSG((hwnd), TCM_GETTOOLTIPS, 0, 0L)
- #define TCM_SETTOOLTIPS (TCM_FIRST + 46)
- #define TabCtrl_SetToolTips(hwnd, hwndTT)
- (void)SNDMSG((hwnd), TCM_SETTOOLTIPS, (WPARAM)hwndTT, 0L)
- #define TCM_GETCURFOCUS (TCM_FIRST + 47)
- #define TabCtrl_GetCurFocus(hwnd)
- (int)SNDMSG((hwnd), TCM_GETCURFOCUS, 0, 0)
- #define TCM_SETCURFOCUS (TCM_FIRST + 48)
- #define TabCtrl_SetCurFocus(hwnd, i)
- SNDMSG((hwnd),TCM_SETCURFOCUS, i, 0)
- #if (_WIN32_IE >= 0x0300)
- #define TCM_SETMINTABWIDTH (TCM_FIRST + 49)
- #define TabCtrl_SetMinTabWidth(hwnd, x)
- (int)SNDMSG((hwnd), TCM_SETMINTABWIDTH, 0, x)
- #define TCM_DESELECTALL (TCM_FIRST + 50)
- #define TabCtrl_DeselectAll(hwnd, fExcludeFocus)
- (void)SNDMSG((hwnd), TCM_DESELECTALL, fExcludeFocus, 0)
- #endif
- #if (_WIN32_IE >= 0x0400)
- #define TCM_HIGHLIGHTITEM (TCM_FIRST + 51)
- #define TabCtrl_HighlightItem(hwnd, i, fHighlight)
- (BOOL)SNDMSG((hwnd), TCM_HIGHLIGHTITEM, (WPARAM)i, (LPARAM)MAKELONG (fHighlight, 0))
- #define TCM_SETEXTENDEDSTYLE (TCM_FIRST + 52) // optional wParam == mask
- #define TabCtrl_SetExtendedStyle(hwnd, dw)
- (DWORD)SNDMSG((hwnd), TCM_SETEXTENDEDSTYLE, 0, dw)
- #define TCM_GETEXTENDEDSTYLE (TCM_FIRST + 53)
- #define TabCtrl_GetExtendedStyle(hwnd)
- (DWORD)SNDMSG((hwnd), TCM_GETEXTENDEDSTYLE, 0, 0)
- #endif // _WIN32_IE >= 0x0400
- #define TCN_KEYDOWN (TCN_FIRST - 0)
- #if (_WIN32_IE >= 0x0300)
- #define TC_KEYDOWN NMTCKEYDOWN
- #else
- #define tagTCKEYDOWN _TC_KEYDOWN
- #define NMTCKEYDOWN TC_KEYDOWN
- #endif
- typedef struct tagTCKEYDOWN
- {
- NMHDR hdr;
- WORD wVKey;
- UINT flags;
- } NMTCKEYDOWN;
- #define TCN_SELCHANGE (TCN_FIRST - 1)
- #define TCN_SELCHANGING (TCN_FIRST - 2)
- #if (_WIN32_IE >= 0x0400)
- #define TCN_GETOBJECT (TCN_FIRST - 3)
- #endif // _WIN32_IE >= 0x0400
- #endif // NOTABCONTROL
- //====== ANIMATE CONTROL ======================================================
- #ifndef NOANIMATE
- #ifdef _WIN32
- #define ANIMATE_CLASSW L"SysAnimate32"
- #define ANIMATE_CLASSA "SysAnimate32"
- #ifdef UNICODE
- #define ANIMATE_CLASS ANIMATE_CLASSW
- #else
- #define ANIMATE_CLASS ANIMATE_CLASSA
- #endif
- // begin_r_commctrl
- #define ACS_CENTER 0x0001
- #define ACS_TRANSPARENT 0x0002
- #define ACS_AUTOPLAY 0x0004
- #if (_WIN32_IE >= 0x0300)
- #define ACS_TIMER 0x0008 // don't use threads... use timers
- #endif
- // end_r_commctrl
- #define ACM_OPENA (WM_USER+100)
- #define ACM_OPENW (WM_USER+103)
- #ifdef UNICODE
- #define ACM_OPEN ACM_OPENW
- #else
- #define ACM_OPEN ACM_OPENA
- #endif
- #define ACM_PLAY (WM_USER+101)
- #define ACM_STOP (WM_USER+102)
- #define ACN_START 1
- #define ACN_STOP 2
- #define Animate_Create(hwndP, id, dwStyle, hInstance)
- CreateWindow(ANIMATE_CLASS, NULL,
- dwStyle, 0, 0, 0, 0, hwndP, (HMENU)(id), hInstance, NULL)
- #define Animate_Open(hwnd, szName) (BOOL)SNDMSG(hwnd, ACM_OPEN, 0, (LPARAM)(LPTSTR)(szName))
- #define Animate_Play(hwnd, from, to, rep) (BOOL)SNDMSG(hwnd, ACM_PLAY, (WPARAM)(UINT)(rep), (LPARAM)MAKELONG(from, to))
- #define Animate_Stop(hwnd) (BOOL)SNDMSG(hwnd, ACM_STOP, 0, 0)
- #define Animate_Close(hwnd) Animate_Open(hwnd, NULL)
- #define Animate_Seek(hwnd, frame) Animate_Play(hwnd, frame, frame, 1)
- #endif
- #endif // NOANIMATE
- #if (_WIN32_IE >= 0x0300)
- //====== MONTHCAL CONTROL ======================================================
- #ifndef NOMONTHCAL
- #ifdef _WIN32
- #define MONTHCAL_CLASSW L"SysMonthCal32"
- #define MONTHCAL_CLASSA "SysMonthCal32"
- #ifdef UNICODE
- #define MONTHCAL_CLASS MONTHCAL_CLASSW
- #else
- #define MONTHCAL_CLASS MONTHCAL_CLASSA
- #endif
- // bit-packed array of "bold" info for a month
- // if a bit is on, that day is drawn bold
- typedef DWORD MONTHDAYSTATE, FAR * LPMONTHDAYSTATE;
- #define MCM_FIRST 0x1000
- // BOOL MonthCal_GetCurSel(HWND hmc, LPSYSTEMTIME pst)
- // returns FALSE if MCS_MULTISELECT
- // returns TRUE and sets *pst to the currently selected date otherwise
- #define MCM_GETCURSEL (MCM_FIRST + 1)
- #define MonthCal_GetCurSel(hmc, pst) (BOOL)SNDMSG(hmc, MCM_GETCURSEL, 0, (LPARAM)(pst))
- // BOOL MonthCal_SetCurSel(HWND hmc, LPSYSTEMTIME pst)
- // returns FALSE if MCS_MULTISELECT
- // returns TURE and sets the currently selected date to *pst otherwise
- #define MCM_SETCURSEL (MCM_FIRST + 2)
- #define MonthCal_SetCurSel(hmc, pst) (BOOL)SNDMSG(hmc, MCM_SETCURSEL, 0, (LPARAM)(pst))
- // DWORD MonthCal_GetMaxSelCount(HWND hmc)
- // returns the maximum number of selectable days allowed
- #define MCM_GETMAXSELCOUNT (MCM_FIRST + 3)
- #define MonthCal_GetMaxSelCount(hmc) (DWORD)SNDMSG(hmc, MCM_GETMAXSELCOUNT, 0, 0L)
- // BOOL MonthCal_SetMaxSelCount(HWND hmc, UINT n)
- // sets the max number days that can be selected iff MCS_MULTISELECT
- #define MCM_SETMAXSELCOUNT (MCM_FIRST + 4)
- #define MonthCal_SetMaxSelCount(hmc, n) (BOOL)SNDMSG(hmc, MCM_SETMAXSELCOUNT, (WPARAM)(n), 0L)
- // BOOL MonthCal_GetSelRange(HWND hmc, LPSYSTEMTIME rgst)
- // sets rgst[0] to the first day of the selection range
- // sets rgst[1] to the last day of the selection range
- #define MCM_GETSELRANGE (MCM_FIRST + 5)
- #define MonthCal_GetSelRange(hmc, rgst) SNDMSG(hmc, MCM_GETSELRANGE, 0, (LPARAM)(rgst))
- // BOOL MonthCal_SetSelRange(HWND hmc, LPSYSTEMTIME rgst)
- // selects the range of days from rgst[0] to rgst[1]
- #define MCM_SETSELRANGE (MCM_FIRST + 6)
- #define MonthCal_SetSelRange(hmc, rgst) SNDMSG(hmc, MCM_SETSELRANGE, 0, (LPARAM)(rgst))
- // DWORD MonthCal_GetMonthRange(HWND hmc, DWORD gmr, LPSYSTEMTIME rgst)
- // if rgst specified, sets rgst[0] to the starting date and
- // and rgst[1] to the ending date of the the selectable (non-grayed)
- // days if GMR_VISIBLE or all the displayed days (including grayed)
- // if GMR_DAYSTATE.
- // returns the number of months spanned by the above range.
- #define MCM_GETMONTHRANGE (MCM_FIRST + 7)
- #define MonthCal_GetMonthRange(hmc, gmr, rgst) (DWORD)SNDMSG(hmc, MCM_GETMONTHRANGE, (WPARAM)(gmr), (LPARAM)(rgst))
- // BOOL MonthCal_SetDayState(HWND hmc, int cbds, DAYSTATE *rgds)
- // cbds is the count of DAYSTATE items in rgds and it must be equal
- // to the value returned from MonthCal_GetMonthRange(hmc, GMR_DAYSTATE, NULL)
- // This sets the DAYSTATE bits for each month (grayed and non-grayed
- // days) displayed in the calendar. The first bit in a month's DAYSTATE
- // corresponts to bolding day 1, the second bit affects day 2, etc.
- #define MCM_SETDAYSTATE (MCM_FIRST + 8)
- #define MonthCal_SetDayState(hmc, cbds, rgds) SNDMSG(hmc, MCM_SETDAYSTATE, (WPARAM)(cbds), (LPARAM)(rgds))
- // BOOL MonthCal_GetMinReqRect(HWND hmc, LPRECT prc)
- // sets *prc the minimal size needed to display one month
- // To display two months, undo the AdjustWindowRect calculation already done to
- // this rect, double the width, and redo the AdjustWindowRect calculation --
- // the monthcal control will display two calendars in this window (if you also
- // double the vertical size, you will get 4 calendars)
- // NOTE: if you want to gurantee that the "Today" string is not clipped,
- // get the MCM_GETMAXTODAYWIDTH and use the max of that width and this width
- #define MCM_GETMINREQRECT (MCM_FIRST + 9)
- #define MonthCal_GetMinReqRect(hmc, prc) SNDMSG(hmc, MCM_GETMINREQRECT, 0, (LPARAM)(prc))
- // set colors to draw control with -- see MCSC_ bits below
- #define MCM_SETCOLOR (MCM_FIRST + 10)
- #define MonthCal_SetColor(hmc, iColor, clr) SNDMSG(hmc, MCM_SETCOLOR, iColor, clr)
- #define MCM_GETCOLOR (MCM_FIRST + 11)
- #define MonthCal_GetColor(hmc, iColor) SNDMSG(hmc, MCM_SETCOLOR, iColor, 0)
- #define MCSC_BACKGROUND 0 // the background color (between months)
- #define MCSC_TEXT 1 // the dates
- #define MCSC_TITLEBK 2 // background of the title
- #define MCSC_TITLETEXT 3
- #define MCSC_MONTHBK 4 // background within the month cal
- #define MCSC_TRAILINGTEXT 5 // the text color of header & trailing days
- // set what day is "today" send NULL to revert back to real date
- #define MCM_SETTODAY (MCM_FIRST + 12)
- #define MonthCal_SetToday(hmc, pst) SNDMSG(hmc, MCM_SETTODAY, 0, (LPARAM)pst)
- // get what day is "today"
- // returns BOOL for success/failure
- #define MCM_GETTODAY (MCM_FIRST + 13)
- #define MonthCal_GetToday(hmc, pst) (BOOL)SNDMSG(hmc, MCM_GETTODAY, 0, (LPARAM)pst)
- // determine what pinfo->pt is over
- #define MCM_HITTEST (MCM_FIRST + 14)
- #define MonthCal_HitTest(hmc, pinfo)
- SNDMSG(hmc, MCM_HITTEST, 0, (LPARAM)(PMCHITTESTINFO)pinfo)
- typedef struct {
- UINT cbSize;
- POINT pt;
- UINT uHit; // out param
- SYSTEMTIME st;
- } MCHITTESTINFO, *PMCHITTESTINFO;
- #define MCHT_TITLE 0x00010000
- #define MCHT_CALENDAR 0x00020000
- #define MCHT_TODAYLINK 0x00030000
- #define MCHT_NEXT 0x01000000 // these indicate that hitting
- #define MCHT_PREV 0x02000000 // here will go to the next/prev month
- #define MCHT_NOWHERE 0x00000000
- #define MCHT_TITLEBK (MCHT_TITLE)
- #define MCHT_TITLEMONTH (MCHT_TITLE | 0x0001)
- #define MCHT_TITLEYEAR (MCHT_TITLE | 0x0002)
- #define MCHT_TITLEBTNNEXT (MCHT_TITLE | MCHT_NEXT | 0x0003)
- #define MCHT_TITLEBTNPREV (MCHT_TITLE | MCHT_PREV | 0x0003)
- #define MCHT_CALENDARBK (MCHT_CALENDAR)
- #define MCHT_CALENDARDATE (MCHT_CALENDAR | 0x0001)
- #define MCHT_CALENDARDATENEXT (MCHT_CALENDARDATE | MCHT_NEXT)
- #define MCHT_CALENDARDATEPREV (MCHT_CALENDARDATE | MCHT_PREV)
- #define MCHT_CALENDARDAY (MCHT_CALENDAR | 0x0002)
- #define MCHT_CALENDARWEEKNUM (MCHT_CALENDAR | 0x0003)
- // set first day of week to iDay:
- // 0 for Monday, 1 for Tuesday, ..., 6 for Sunday
- // -1 for means use locale info
- #define MCM_SETFIRSTDAYOFWEEK (MCM_FIRST + 15)
- #define MonthCal_SetFirstDayOfWeek(hmc, iDay)
- SNDMSG(hmc, MCM_SETFIRSTDAYOFWEEK, 0, iDay)
- // DWORD result... low word has the day. high word is bool if this is app set
- // or not (FALSE == using locale info)
- #define MCM_GETFIRSTDAYOFWEEK (MCM_FIRST + 16)
- #define MonthCal_GetFirstDayOfWeek(hmc)
- (DWORD)SNDMSG(hmc, MCM_GETFIRSTDAYOFWEEK, 0, 0)
- // DWORD MonthCal_GetRange(HWND hmc, LPSYSTEMTIME rgst)
- // modifies rgst[0] to be the minimum ALLOWABLE systemtime (or 0 if no minimum)
- // modifies rgst[1] to be the maximum ALLOWABLE systemtime (or 0 if no maximum)
- // returns GDTR_MIN|GDTR_MAX if there is a minimum|maximum limit
- #define MCM_GETRANGE (MCM_FIRST + 17)
- #define MonthCal_GetRange(hmc, rgst)
- (DWORD)SNDMSG(hmc, MCM_GETRANGE, 0, (LPARAM)(rgst))
- // BOOL MonthCal_SetRange(HWND hmc, DWORD gdtr, LPSYSTEMTIME rgst)
- // if GDTR_MIN, sets the minimum ALLOWABLE systemtime to rgst[0], otherwise removes minimum
- // if GDTR_MAX, sets the maximum ALLOWABLE systemtime to rgst[1], otherwise removes maximum
- // returns TRUE on success, FALSE on error (such as invalid parameters)
- #define MCM_SETRANGE (MCM_FIRST + 18)
- #define MonthCal_SetRange(hmc, gd, rgst)
- (BOOL)SNDMSG(hmc, MCM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
- // int MonthCal_GetMonthDelta(HWND hmc)
- // returns the number of months one click on a next/prev button moves by
- #define MCM_GETMONTHDELTA (MCM_FIRST + 19)
- #define MonthCal_GetMonthDelta(hmc)
- (int)SNDMSG(hmc, MCM_GETMONTHDELTA, 0, 0)
- // int MonthCal_SetMonthDelta(HWND hmc, int n)
- // sets the month delta to n. n==0 reverts to moving by a page of months
- // returns the previous value of n.
- #define MCM_SETMONTHDELTA (MCM_FIRST + 20)
- #define MonthCal_SetMonthDelta(hmc, n)
- (int)SNDMSG(hmc, MCM_SETMONTHDELTA, n, 0)
- // DWORD MonthCal_GetMaxTodayWidth(HWND hmc, LPSIZE psz)
- // sets *psz to the maximum width/height of the "Today" string displayed
- // at the bottom of the calendar (as long as MCS_NOTODAY is not specified)
- #define MCM_GETMAXTODAYWIDTH (MCM_FIRST + 21)
- #define MonthCal_GetMaxTodayWidth(hmc)
- (DWORD)SNDMSG(hmc, MCM_GETMAXTODAYWIDTH, 0, 0)
- // MCN_SELCHANGE is sent whenever the currently displayed date changes
- // via month change, year change, keyboard navigation, prev/next button
- //
- typedef struct tagNMSELCHANGE
- {
- NMHDR nmhdr; // this must be first, so we don't break WM_NOTIFY
- SYSTEMTIME stSelStart;
- SYSTEMTIME stSelEnd;
- } NMSELCHANGE, FAR * LPNMSELCHANGE;
- #define MCN_SELCHANGE (MCN_FIRST + 1)
- // MCN_GETDAYSTATE is sent for MCS_DAYSTATE controls whenever new daystate
- // information is needed (month or year scroll) to draw bolding information.
- // The app must fill in cDayState months worth of information starting from
- // stStart date. The app may fill in the array at prgDayState or change
- // prgDayState to point to a different array out of which the information
- // will be copied. (similar to tooltips)
- //
- typedef struct tagNMDAYSTATE
- {
- NMHDR nmhdr; // this must be first, so we don't break WM_NOTIFY
- SYSTEMTIME stStart;
- int cDayState;
- LPMONTHDAYSTATE prgDayState; // points to cDayState MONTHDAYSTATEs
- } NMDAYSTATE, FAR * LPNMDAYSTATE;
- #define MCN_GETDAYSTATE (MCN_FIRST + 3)
- // MCN_SELECT is sent whenever a selection has occured (via mouse or keyboard)
- //
- typedef NMSELCHANGE NMSELECT, FAR * LPNMSELECT;
- #define MCN_SELECT (MCN_FIRST + 4)
- #define MCS_DAYSTATE 0x0001
- #define MCS_MULTISELECT 0x0002
- #define MCS_WEEKNUMBERS 0x0004
- #if (_WIN32_IE >= 0x0400)
- #define MCS_NOTODAYCIRCLE 0x0008
- #define MCS_NOTODAY 0x0010
- #else
- #define MCS_NOTODAY 0x0008
- #endif
- #define GMR_VISIBLE 0 // visible portion of display
- #define GMR_DAYSTATE 1 // above plus the grayed out parts of
- // partially displayed months
- #endif // _WIN32
- #endif // NOMONTHCAL
- //====== DATETIMEPICK CONTROL ==================================================
- #ifndef NODATETIMEPICK
- #ifdef _WIN32
- #define DATETIMEPICK_CLASSW L"SysDateTimePick32"
- #define DATETIMEPICK_CLASSA "SysDateTimePick32"
- #ifdef UNICODE
- #define DATETIMEPICK_CLASS DATETIMEPICK_CLASSW
- #else
- #define DATETIMEPICK_CLASS DATETIMEPICK_CLASSA
- #endif
- #define DTM_FIRST 0x1000
- // DWORD DateTimePick_GetSystemtime(HWND hdp, LPSYSTEMTIME pst)
- // returns GDT_NONE if "none" is selected (DTS_SHOWNONE only)
- // returns GDT_VALID and modifies *pst to be the currently selected value
- #define DTM_GETSYSTEMTIME (DTM_FIRST + 1)
- #define DateTime_GetSystemtime(hdp, pst) (DWORD)SNDMSG(hdp, DTM_GETSYSTEMTIME, 0, (LPARAM)(pst))
- // BOOL DateTime_SetSystemtime(HWND hdp, DWORD gd, LPSYSTEMTIME pst)
- // if gd==GDT_NONE, sets datetimepick to None (DTS_SHOWNONE only)
- // if gd==GDT_VALID, sets datetimepick to *pst
- // returns TRUE on success, FALSE on error (such as bad params)
- #define DTM_SETSYSTEMTIME (DTM_FIRST + 2)
- #define DateTime_SetSystemtime(hdp, gd, pst) (BOOL)SNDMSG(hdp, DTM_SETSYSTEMTIME, (LPARAM)(gd), (LPARAM)(pst))
- // DWORD DateTime_GetRange(HWND hdp, LPSYSTEMTIME rgst)
- // modifies rgst[0] to be the minimum ALLOWABLE systemtime (or 0 if no minimum)
- // modifies rgst[1] to be the maximum ALLOWABLE systemtime (or 0 if no maximum)
- // returns GDTR_MIN|GDTR_MAX if there is a minimum|maximum limit
- #define DTM_GETRANGE (DTM_FIRST + 3)
- #define DateTime_GetRange(hdp, rgst) (DWORD)SNDMSG(hdp, DTM_GETRANGE, 0, (LPARAM)(rgst))
- // BOOL DateTime_SetRange(HWND hdp, DWORD gdtr, LPSYSTEMTIME rgst)
- // if GDTR_MIN, sets the minimum ALLOWABLE systemtime to rgst[0], otherwise removes minimum
- // if GDTR_MAX, sets the maximum ALLOWABLE systemtime to rgst[1], otherwise removes maximum
- // returns TRUE on success, FALSE on error (such as invalid parameters)
- #define DTM_SETRANGE (DTM_FIRST + 4)
- #define DateTime_SetRange(hdp, gd, rgst) (BOOL)SNDMSG(hdp, DTM_SETRANGE, (WPARAM)(gd), (LPARAM)(rgst))
- // BOOL DateTime_SetFormat(HWND hdp, LPCTSTR sz)
- // sets the display formatting string to sz (see GetDateFormat and GetTimeFormat for valid formatting chars)
- // NOTE: 'X' is a valid formatting character which indicates that the application
- // will determine how to display information. Such apps must support DTN_WMKEYDOWN,
- // DTN_FORMAT, and DTN_FORMATQUERY.
- #define DTM_SETFORMATA (DTM_FIRST + 5)
- #define DTM_SETFORMATW (DTM_FIRST + 50)
- #ifdef UNICODE
- #define DTM_SETFORMAT DTM_SETFORMATW
- #else
- #define DTM_SETFORMAT DTM_SETFORMATA
- #endif
- #define DateTime_SetFormat(hdp, sz) (BOOL)SNDMSG(hdp, DTM_SETFORMAT, 0, (LPARAM)(sz))
- #define DTM_SETMCCOLOR (DTM_FIRST + 6)
- #define DateTime_SetMonthCalColor(hdp, iColor, clr) SNDMSG(hdp, DTM_SETMCCOLOR, iColor, clr)
- #define DTM_GETMCCOLOR (DTM_FIRST + 7)
- #define DateTime_GetMonthCalColor(hdp, iColor) SNDMSG(hdp, DTM_GETMCCOLOR, iColor, 0)
- // HWND DateTime_GetMonthCal(HWND hdp)
- // returns the HWND of the MonthCal popup window. Only valid
- // between DTN_DROPDOWN and DTN_CLOSEUP notifications.
- #define DTM_GETMONTHCAL (DTM_FIRST + 8)
- #define DateTime_GetMonthCal(hdp) (HWND)SNDMSG(hdp, DTM_GETMONTHCAL, 0, 0)
- #if (_WIN32_IE >= 0x0400)
- #define DTM_SETMCFONT (DTM_FIRST + 9)
- #define DateTime_SetMonthCalFont(hdp, hfont, fRedraw) SNDMSG(hdp, DTM_SETMCFONT, (WPARAM)hfont, (LPARAM)fRedraw)
- #define DTM_GETMCFONT (DTM_FIRST + 10)
- #define DateTime_GetMonthCalFont(hdp) SNDMSG(hdp, DTM_GETMCFONT, 0, 0)
- #endif // _WIN32_IE >= 0x0400
- #define DTS_UPDOWN 0x0001 // use UPDOWN instead of MONTHCAL
- #define DTS_SHOWNONE 0x0002 // allow a NONE selection
- #define DTS_SHORTDATEFORMAT 0x0000 // use the short date format (app must forward WM_WININICHANGE messages)
- #define DTS_LONGDATEFORMAT 0x0004 // use the long date format (app must forward WM_WININICHANGE messages)
- #define DTS_TIMEFORMAT 0x0009 // use the time format (app must forward WM_WININICHANGE messages)
- #define DTS_APPCANPARSE 0x0010 // allow user entered strings (app MUST respond to DTN_USERSTRING)
- #define DTS_RIGHTALIGN 0x0020 // right-align popup instead of left-align it
- #define DTN_DATETIMECHANGE (DTN_FIRST + 1) // the systemtime has changed
- typedef struct tagNMDATETIMECHANGE
- {
- NMHDR nmhdr;
- DWORD dwFlags; // GDT_VALID or GDT_NONE
- SYSTEMTIME st; // valid iff dwFlags==GDT_VALID
- } NMDATETIMECHANGE, FAR * LPNMDATETIMECHANGE;
- #define DTN_USERSTRINGA (DTN_FIRST + 2) // the user has entered a string
- #define DTN_USERSTRINGW (DTN_FIRST + 15)
- typedef struct tagNMDATETIMESTRINGA
- {
- NMHDR nmhdr;
- LPCSTR pszUserString; // string user entered
- SYSTEMTIME st; // app fills this in
- DWORD dwFlags; // GDT_VALID or GDT_NONE
- } NMDATETIMESTRINGA, FAR * LPNMDATETIMESTRINGA;
- typedef struct tagNMDATETIMESTRINGW
- {
- NMHDR nmhdr;
- LPCWSTR pszUserString; // string user entered
- SYSTEMTIME st; // app fills this in
- DWORD dwFlags; // GDT_VALID or GDT_NONE
- } NMDATETIMESTRINGW, FAR * LPNMDATETIMESTRINGW;
- #ifdef UNICODE
- #define DTN_USERSTRING DTN_USERSTRINGW
- #define NMDATETIMESTRING NMDATETIMESTRINGW
- #define LPNMDATETIMESTRING LPNMDATETIMESTRINGW
- #else
- #define DTN_USERSTRING DTN_USERSTRINGA
- #define NMDATETIMESTRING NMDATETIMESTRINGA
- #define LPNMDATETIMESTRING LPNMDATETIMESTRINGA
- #endif
- #define DTN_WMKEYDOWNA (DTN_FIRST + 3) // modify keydown on app format field (X)
- #define DTN_WMKEYDOWNW (DTN_FIRST + 16)
- typedef struct tagNMDATETIMEWMKEYDOWNA
- {
- NMHDR nmhdr;
- int nVirtKey; // virtual key code of WM_KEYDOWN which MODIFIES an X field
- LPCSTR pszFormat; // format substring
- SYSTEMTIME st; // current systemtime, app should modify based on key
- } NMDATETIMEWMKEYDOWNA, FAR * LPNMDATETIMEWMKEYDOWNA;
- typedef struct tagNMDATETIMEWMKEYDOWNW
- {
- NMHDR nmhdr;
- int nVirtKey; // virtual key code of WM_KEYDOWN which MODIFIES an X field
- LPCWSTR pszFormat; // format substring
- SYSTEMTIME st; // current systemtime, app should modify based on key
- } NMDATETIMEWMKEYDOWNW, FAR * LPNMDATETIMEWMKEYDOWNW;
- #ifdef UNICODE
- #define DTN_WMKEYDOWN DTN_WMKEYDOWNW
- #define NMDATETIMEWMKEYDOWN NMDATETIMEWMKEYDOWNW
- #define LPNMDATETIMEWMKEYDOWN LPNMDATETIMEWMKEYDOWNW
- #else
- #define DTN_WMKEYDOWN DTN_WMKEYDOWNA
- #define NMDATETIMEWMKEYDOWN NMDATETIMEWMKEYDOWNA
- #define LPNMDATETIMEWMKEYDOWN LPNMDATETIMEWMKEYDOWNA
- #endif
- #define DTN_FORMATA (DTN_FIRST + 4) // query display for app format field (X)
- #define DTN_FORMATW (DTN_FIRST + 17)
- typedef struct tagNMDATETIMEFORMATA
- {
- NMHDR nmhdr;
- LPCSTR pszFormat; // format substring
- SYSTEMTIME st; // current systemtime
- LPCSTR pszDisplay; // string to display
- CHAR szDisplay[64]; // buffer pszDisplay originally points at
- } NMDATETIMEFORMATA, FAR * LPNMDATETIMEFORMATA;
- typedef struct tagNMDATETIMEFORMATW
- {
- NMHDR nmhdr;
- LPCWSTR pszFormat; // format substring
- SYSTEMTIME st; // current systemtime
- LPCWSTR pszDisplay; // string to display
- WCHAR szDisplay[64]; // buffer pszDisplay originally points at
- } NMDATETIMEFORMATW, FAR * LPNMDATETIMEFORMATW;
- #ifdef UNICODE
- #define DTN_FORMAT DTN_FORMATW
- #define NMDATETIMEFORMAT NMDATETIMEFORMATW
- #define LPNMDATETIMEFORMAT LPNMDATETIMEFORMATW
- #else
- #define DTN_FORMAT DTN_FORMATA
- #define NMDATETIMEFORMAT NMDATETIMEFORMATA
- #define LPNMDATETIMEFORMAT LPNMDATETIMEFORMATA
- #endif
- #define DTN_FORMATQUERYA (DTN_FIRST + 5) // query formatting info for app format field (X)
- #define DTN_FORMATQUERYW (DTN_FIRST + 18)
- typedef struct tagNMDATETIMEFORMATQUERYA
- {
- NMHDR nmhdr;
- LPCSTR pszFormat; // format substring
- SIZE szMax; // max bounding rectangle app will use for this format string
- } NMDATETIMEFORMATQUERYA, FAR * LPNMDATETIMEFORMATQUERYA;
- typedef struct tagNMDATETIMEFORMATQUERYW
- {
- NMHDR nmhdr;
- LPCWSTR pszFormat; // format substring
- SIZE szMax; // max bounding rectangle app will use for this format string
- } NMDATETIMEFORMATQUERYW, FAR * LPNMDATETIMEFORMATQUERYW;
- #ifdef UNICODE
- #define DTN_FORMATQUERY DTN_FORMATQUERYW
- #define NMDATETIMEFORMATQUERY NMDATETIMEFORMATQUERYW
- #define LPNMDATETIMEFORMATQUERY LPNMDATETIMEFORMATQUERYW
- #else
- #define DTN_FORMATQUERY DTN_FORMATQUERYA
- #define NMDATETIMEFORMATQUERY NMDATETIMEFORMATQUERYA
- #define LPNMDATETIMEFORMATQUERY LPNMDATETIMEFORMATQUERYA
- #endif
- #define DTN_DROPDOWN (DTN_FIRST + 6) // MonthCal has dropped down
- #define DTN_CLOSEUP (DTN_FIRST + 7) // MonthCal is popping up
- #define GDTR_MIN 0x0001
- #define GDTR_MAX 0x0002
- #define GDT_ERROR -1
- #define GDT_VALID 0
- #define GDT_NONE 1
- #endif // _WIN32
- #endif // NODATETIMEPICK
- #if (_WIN32_IE >= 0x0400)
- #ifndef NOIPADDRESS
- ///////////////////////////////////////////////
- /// IP Address edit control
- // Messages sent to IPAddress controls
- #define IPM_CLEARADDRESS (WM_USER+100) // no parameters
- #define IPM_SETADDRESS (WM_USER+101) // lparam = TCP/IP address
- #define IPM_GETADDRESS (WM_USER+102) // lresult = # of non black fields. lparam = LPDWORD for TCP/IP address
- #define IPM_SETRANGE (WM_USER+103) // wparam = field, lparam = range
- #define IPM_SETFOCUS (WM_USER+104) // wparam = field
- #define IPM_ISBLANK (WM_USER+105) // no parameters
- #define WC_IPADDRESSW L"SysIPAddress32"
- #define WC_IPADDRESSA "SysIPAddress32"
- #ifdef UNICODE
- #define WC_IPADDRESS WC_IPADDRESSW
- #else
- #define WC_IPADDRESS WC_IPADDRESSA
- #endif
- #define IPN_FIELDCHANGED (IPN_FIRST - 0)
- typedef struct tagNMIPADDRESS
- {
- NMHDR hdr;
- int iField;
- int iValue;
- } NMIPADDRESS, *LPNMIPADDRESS;
- // The following is a useful macro for passing the range values in the
- // IPM_SETRANGE message.
- #define MAKEIPRANGE(low, high) ((LPARAM)(WORD)(((BYTE)(high) << 8) + (BYTE)(low)))
- // And this is a useful macro for making the IP Address to be passed
- // as a LPARAM.
- #define MAKEIPADDRESS(b1,b2,b3,b4) ((LPARAM)(((DWORD)(b1)<<24)+((DWORD)(b2)<<16)+((DWORD)(b3)<<8)+((DWORD)(b4))))
- // Get individual number
- #define FIRST_IPADDRESS(x) ((x>>24) & 0xff)
- #define SECOND_IPADDRESS(x) ((x>>16) & 0xff)
- #define THIRD_IPADDRESS(x) ((x>>8) & 0xff)
- #define FOURTH_IPADDRESS(x) (x & 0xff)
- #endif // NOIPADDRESS
- //---------------------------------------------------------------------------------------
- //---------------------------------------------------------------------------------------
- /// ====================== Pager Control =============================
- //---------------------------------------------------------------------------------------
- //---------------------------------------------------------------------------------------
- #ifndef NOPAGESCROLLER
- //Pager Class Name
- #define WC_PAGESCROLLERW L"SysPager"
- #define WC_PAGESCROLLERA "SysPager"
- #ifdef UNICODE
- #define WC_PAGESCROLLER WC_PAGESCROLLERW
- #else
- #define WC_PAGESCROLLER WC_PAGESCROLLERA
- #endif
- //---------------------------------------------------------------------------------------
- // Pager Control Styles
- //---------------------------------------------------------------------------------------
- #define PGS_VERT 0x0000
- #define PGS_HORZ 0x0001
- //---------------------------------------------------------------------------------------
- // Pager Button State
- //---------------------------------------------------------------------------------------
- //The scroll can be in one of the following control State
- #define PGF_INVISIBLE 0 // Scroll button is not visible
- #define PGF_NORMAL 1 // Scroll button is in normal state
- #define PGF_GRAYED 2 // Scroll button is in grayed state
- #define PGF_DEPRESSED 4 // Scroll button is in depressed state
- #define PGF_HOT 8 // Scroll button is in hot state
- // The following identifiers specifies the button control
- #define PGB_TOPORLEFT 0
- #define PGB_BOTTOMORRIGHT 1
- //---------------------------------------------------------------------------------------
- // Pager Control Messages
- //---------------------------------------------------------------------------------------
- #define PGM_SETCHILD (PGM_FIRST + 1) // lParam == hwnd
- #define Pager_SetChild(hwnd, hwndChild)
- (void)SNDMSG((hwnd), PGM_SETCHILD, 0, (LPARAM)(hwndChild))
- #define PGM_RECALCSIZE (PGM_FIRST + 2)
- #define Pager_RecalcSize(hwnd)
- (void)SNDMSG((hwnd), PGM_RECALCSIZE, 0, 0)
- #define PGM_FORWARDMOUSE (PGM_FIRST + 3)
- #define Pager_ForwardMouse(hwnd, bForward)
- (void)SNDMSG((hwnd), PGM_FORWARDMOUSE, (WPARAM)(bForward), 0)
- #define PGM_SETBKCOLOR (PGM_FIRST + 4)
- #define Pager_SetBkColor(hwnd, clr)
- (COLORREF)SNDMSG((hwnd), PGM_SETBKCOLOR, 0, (LPARAM)clr)
- #define PGM_GETBKCOLOR (PGM_FIRST + 5)
- #define Pager_GetBkColor(hwnd)
- (COLORREF)SNDMSG((hwnd), PGM_GETBKCOLOR, 0, 0)
- #define PGM_SETBORDER (PGM_FIRST + 6)
- #define Pager_SetBorder(hwnd, iBorder)
- (int)SNDMSG((hwnd), PGM_SETBORDER, 0, (LPARAM)iBorder)
- #define PGM_GETBORDER (PGM_FIRST + 7)
- #define Pager_GetBorder(hwnd)
- (int)SNDMSG((hwnd), PGM_GETBORDER, 0, 0)
- #define PGM_SETPOS (PGM_FIRST + 8)
- #define Pager_SetPos(hwnd, iPos)
- (int)SNDMSG((hwnd), PGM_SETPOS, 0, (LPARAM)iPos)
- #define PGM_GETPOS (PGM_FIRST + 9)
- #define Pager_GetPos(hwnd)
- (int)SNDMSG((hwnd), PGM_GETPOS, 0, 0)
- #define PGM_SETBUTTONSIZE (PGM_FIRST + 10)
- #define Pager_SetButtonSize(hwnd, iSize)
- (int)SNDMSG((hwnd), PGM_SETBUTTONSIZE, 0, (LPARAM)iSize)
- #define PGM_GETBUTTONSIZE (PGM_FIRST + 11)
- #define Pager_GetButtonSize(hwnd)
- (int)SNDMSG((hwnd), PGM_GETBUTTONSIZE, 0,0)
- #define PGM_GETBUTTONSTATE (PGM_FIRST + 12)
- #define Pager_GetButtonState(hwnd, iButton)
- (DWORD)SNDMSG((hwnd), PGM_GETBUTTONSTATE, 0, (LPARAM)iButton)
- //---------------------------------------------------------------------------------------
- //Pager Control Notification Messages
- //---------------------------------------------------------------------------------------
- // PGN_SCROLL Notification Message
- #define PGN_SCROLL (PGN_FIRST-1)
- #define PGF_SCROLLUP 1
- #define PGF_SCROLLDOWN 2
- #define PGF_SCROLLLEFT 4
- #define PGF_SCROLLRIGHT 8
- // This structure is sent along with PGN_SCROLL notifications
- typedef struct {
- NMHDR hdr;
- RECT rcParent; // Contains Parent Window Rect
- int iDir; // Scrolling Direction
- int iXpos; // Horizontal scroll position
- int iYpos; // Vertical scroll position
- int iScroll; // [in/out] Amount to scroll
- }NMPGSCROLL, *LPNMPGSCROLL;
- // PGN_CALCSIZE Notification Message
- #define PGN_CALCSIZE (PGN_FIRST-2)
- #define PGF_CALCWIDTH 1
- #define PGF_CALCHEIGHT 2
- typedef struct {
- NMHDR hdr;
- DWORD dwFlag;
- int iWidth;
- int iHeight;
- }NMPGCALCSIZE, *LPNMPGCALCSIZE;
- #endif // NOPAGESCROLLER
- ////====================== End Pager Control ==========================================
- #endif // _WIN32_IE >= 0x0400
- #ifdef _WIN32
- //====== TrackMouseEvent =====================================================
- #ifndef NOTRACKMOUSEEVENT
- //
- // If the messages for TrackMouseEvent have not been defined then define them
- // now.
- //
- #ifndef WM_MOUSEHOVER
- #define WM_MOUSEHOVER 0x02A1
- #define WM_MOUSELEAVE 0x02A3
- #endif
- //
- // If the TRACKMOUSEEVENT structure and associated flags havent been declared
- // then declare them now.
- //
- #ifndef TME_HOVER
- #define TME_HOVER 0x00000001
- #define TME_LEAVE 0x00000002
- #define TME_QUERY 0x40000000
- #define TME_CANCEL 0x80000000
- #define HOVER_DEFAULT 0xFFFFFFFF
- typedef struct tagTRACKMOUSEEVENT {
- DWORD cbSize;
- DWORD dwFlags;
- HWND hwndTrack;
- DWORD dwHoverTime;
- } TRACKMOUSEEVENT, *LPTRACKMOUSEEVENT;
- #endif // !TME_HOVER
- //
- // Declare _TrackMouseEvent. This API tries to use the window manager's
- // implementation of TrackMouseEvent if it is present, otherwise it emulates.
- //
- WINCOMMCTRLAPI
- BOOL
- WINAPI
- _TrackMouseEvent(
- LPTRACKMOUSEEVENT lpEventTrack);
- #endif // !NOTRACKMOUSEEVENT
- #if (_WIN32_IE >= 0x0400)
- //====== Flat Scrollbar APIs=========================================
- #ifndef NOFLATSBAPIS
- #define WSB_PROP_CYVSCROLL 0x00000001L
- #define WSB_PROP_CXHSCROLL 0x00000002L
- #define WSB_PROP_CYHSCROLL 0x00000004L
- #define WSB_PROP_CXVSCROLL 0x00000008L
- #define WSB_PROP_CXHTHUMB 0x00000010L
- #define WSB_PROP_CYVTHUMB 0x00000020L
- #define WSB_PROP_VBKGCOLOR 0x00000040L
- #define WSB_PROP_HBKGCOLOR 0x00000080L
- #define WSB_PROP_VSTYLE 0x00000100L
- #define WSB_PROP_HSTYLE 0x00000200L
- #define WSB_PROP_WINSTYLE 0x00000400L
- #define WSB_PROP_PALETTE 0x00000800L
- #define WSB_PROP_MASK 0x00000FFFL
- #define FSB_FLAT_MODE 2
- #define FSB_ENCARTA_MODE 1
- #define FSB_REGULAR_MODE 0
- WINCOMMCTRLAPI BOOL WINAPI FlatSB_EnableScrollBar(HWND, int, UINT);
- WINCOMMCTRLAPI BOOL WINAPI FlatSB_ShowScrollBar(HWND, int code, BOOL);
- WINCOMMCTRLAPI BOOL WINAPI FlatSB_GetScrollRange(HWND, int code, LPINT, LPINT);
- WINCOMMCTRLAPI BOOL WINAPI FlatSB_GetScrollInfo(HWND, int code, LPSCROLLINFO);
- WINCOMMCTRLAPI int WINAPI FlatSB_GetScrollPos(HWND, int code);
- WINCOMMCTRLAPI BOOL WINAPI FlatSB_GetScrollProp(HWND, int propIndex, LPINT);
- WINCOMMCTRLAPI int WINAPI FlatSB_SetScrollPos(HWND, int code, int pos, BOOL fRedraw);
- WINCOMMCTRLAPI int WINAPI FlatSB_SetScrollInfo(HWND, int code, LPSCROLLINFO, BOOL fRedraw);
- WINCOMMCTRLAPI int WINAPI FlatSB_SetScrollRange(HWND, int code, int min, int max, BOOL fRedraw);
- WINCOMMCTRLAPI BOOL WINAPI FlatSB_SetScrollProp(HWND, UINT index, int newValue, BOOL);
- WINCOMMCTRLAPI BOOL WINAPI InitializeFlatSB(HWND);
- WINCOMMCTRLAPI HRESULT WINAPI UninitializeFlatSB(HWND);
- #endif // NOFLATSBAPIS
- #endif // _WIN32_IE >= 0x0400
- #endif /* _WIN32 */
- #endif // _WIN32_IE >= 0x0300
- #ifdef __cplusplus
- }
- #endif
- #ifdef _WIN32
- #include <poppack.h>
- #endif
- #endif
- #endif // _INC_COMMCTRL