Commit e6e71ad4 authored by Alex Priem's avatar Alex Priem Committed by Alexandre Julliard

- (final?) update of TreeView_* macro's.

- implementation of TVM_SETINSERTMARK & TVM_SETINSERTMARKCOLOR - fixed some typo's - custom draw enhancements - implementation of state images - implementation of TVS_CHECKBOXES
parent 426e812b
......@@ -56,3 +56,8 @@ extern HMODULE COMCTL32_hModule;
#define IDM_OCT 310
#define IDM_NOV 311
#define IDM_DEC 312
/* Treeview Checboxes */
#define IDT_CHECK 401
......@@ -67,6 +67,35 @@ IDD_MCMONTHMENU MENU LOADONCALL DISCARDABLE
END
}
IDT_CHECK BITMAP LOADONCALL DISCARDABLE
{
'42 4D 8E 01 00 00 00 00 00 00 5E 00 00 00 28 00'
'00 00 1F 00 00 00 10 00 00 00 01 00 04 00 02 00'
'00 00 30 01 00 00 01 00 00 00 01 00 00 00 0A 00'
'00 00 0A 00 00 00 00 00 00 00 00 00 80 00 00 80'
'00 00 80 00 00 00 C0 C0 C0 00 80 80 80 00 00 FF'
'00 00 00 FF FF 00 FF 00 00 00 FF FF FF 00 1F 99'
'00 00 01 99 0D 11 02 99 0E 11 01 99 00 00 01 99'
'0D 11 02 99 0E 11 01 99 00 00 01 99 02 11 09 99'
'02 11 02 99 02 11 0A 99 02 11 01 99 00 00 01 99'
'02 11 09 99 02 11 02 99 02 11 0A 99 02 11 01 99'
'00 00 01 99 02 11 09 99 02 11 02 99 02 11 03 99'
'02 00 05 99 02 11 01 99 00 00 01 99 02 11 09 99'
'02 11 02 99 02 11 03 99 03 00 04 99 02 11 01 99'
'00 00 01 99 02 11 09 99 02 11 02 99 02 11 02 99'
'04 00 04 99 02 11 01 99 00 00 01 99 02 11 09 99'
'02 11 02 99 02 11 01 99 02 00 02 99 02 00 03 99'
'02 11 01 99 00 00 01 99 02 11 09 99 02 11 02 99'
'02 11 02 00 04 99 02 00 02 99 02 11 01 99 00 00'
'01 99 02 11 09 99 02 11 02 99 02 11 01 00 06 99'
'02 00 01 99 02 11 01 99 00 00 01 99 02 11 09 99'
'02 11 02 99 02 11 07 99 02 00 01 99 01 00 01 11'
'01 99 00 00 01 99 02 11 09 99 02 11 02 99 02 11'
'08 99 01 00 01 99 01 00 01 11 01 99 00 00 01 99'
'0D 11 02 99 0A 11 02 00 02 11 01 99 00 00 01 99'
'0D 11 02 99 0E 11 01 99 00 00 1F 99 00 01'
}
IDB_STD_SMALL BITMAP LOADONCALL DISCARDABLE
{
......
......@@ -387,6 +387,7 @@ typedef struct _IMAGELIST *HIMAGELIST;
#define ILD_BLEND ILD_BLEND50
#define INDEXTOOVERLAYMASK(i) ((i)<<8)
#define INDEXTOSTATEIMAGEMASK(i) ((i)<<12)
#define ILCF_MOVE (0x00000000)
#define ILCF_SWAP (0x00000001)
......@@ -1705,26 +1706,6 @@ typedef struct
#define TVM_SETUNICODEFORMAT CCM_SETUNICODEFORMAT
#define TVM_GETUNICODEFORMAT CCM_GETUNICODEFORMAT
#define TreeView_GetItemState(hwndTV, hti, mask) \
(UINT)SendMessageA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
#define TreeView_GetCheckState(hwndTV, hti) \
((((UINT)(SendMessageA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), \
TVIS_STATEIMAGEMASK))) >> 12) -1)
#define TreeView_SetLineColor(hwnd, clr) \
(COLORREF)SendMessageA((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))
#define TreeView_GetLineColor(hwnd) \
(COLORREF)SendMessageA((hwnd), TVM_GETLINECOLOR, 0, 0)
#define TreeView_SetItemState(hwndTV, hti, data, _mask) \
{ TVITEM _TVi; \
_TVi.mask = TVIF_STATE; \
_TVi.hItem = hti; \
_TVi.stateMask = _mask; \
_TVi.state = data; \
SendMessageA((hwndTV), TVM_SETITEM, 0, (LPARAM)(TV_ITEM *)&_TVi); \
}
#define TVN_FIRST (0U-400U)
......@@ -1815,6 +1796,7 @@ typedef struct
#define TVS_FULLROWSELECT 0x1000
#define TVS_NOSCROLL 0x2000
#define TVS_NONEVENHEIGHT 0x4000
#define TVS_NOHSCROLL 0x8000
#define TVS_SHAREDIMAGELISTS 0x0000
#define TVS_PRIVATEIMAGELISTS 0x0400
......@@ -2061,7 +2043,7 @@ typedef struct tagNMTVGETINFOTIPW
(LPARAM)(HTREEITEM) (hitem))
#define TreeView_GetChild(hwnd, hitem) \
TreeView_GetNextItem(hwnd, hitem , TVGN_CHILD)
TreeView_GetNextItem(hwnd, hitem , TVGN_CHILD)
#define TreeView_GetNextSibling(hwnd, hitem) \
TreeView_GetNextItem(hwnd, hitem , TVGN_NEXT)
#define TreeView_GetPrevSibling(hwnd, hitem) \
......@@ -2094,22 +2076,24 @@ typedef struct tagNMTVGETINFOTIPW
#define TreeView_SelectItem(hwnd, hitem) \
TreeView_Select(hwnd, hitem, TVGN_CARET)
#define TreeView_SelectDropTarget(hwnd, hitem) \
TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
/* FIXME
#define TreeView_SelectSetFirstVisible(hwnd, hitem) \
TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
*/
TreeView_Select(hwnd, hitem, TVGN_DROPHILITE)
#define TreeView_SelectSetFirstVisible(hwnd, hitem) \
TreeView_Select(hwnd, hitem, TVGN_FIRSTVISIBLE)
#define TreeView_GetItemA(hwnd, pitem) \
(BOOL)SendMessageA((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
#define TreeView_GetItemW(hwnd, pitem) \
(BOOL)SendMessageW((hwnd), TVM_GETITEMA, 0, (LPARAM) (TVITEMA *)(pitem))
#define TreeView_SetItemA(hwnd, pitem) \
(BOOL)SendMessageA((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
#define TreeView_SetItemW(hwnd, pitem) \
(BOOL)SendMessageW((hwnd), TVM_SETITEMA, 0, (LPARAM)(const TVITEMA *)(pitem))
#define TreeView_EditLabel(hwnd, hitem) \
(HWND)SendMessageA((hwnd), TVM_EDITLABEL, 0, (LPARAM)(HTREEITEM)(hitem))
#define TreeView_GetEditControl(hwnd) \
(HWND)SendMessageA((hwnd), TVM_GETEDITCONTROL, 0, 0)
......@@ -2138,12 +2122,19 @@ typedef struct tagNMTVGETINFOTIPW
#define TreeView_EndEditLabelNow(hwnd, fCancel) \
(BOOL)SendMessageA((hwnd), TVM_ENDEDITLABELNOW, (WPARAM)fCancel, 0)
#define TreeView_GetISearchString(hwndTV, lpsz) \
(BOOL)SendMessageA((hwndTV), TVM_GETISEARCHSTRING, 0, \
#define TreeView_GetISearchString(hwnd, lpsz) \
(BOOL)SendMessageA((hwnd), TVM_GETISEARCHSTRING, 0, \
(LPARAM)(LPTSTR)lpsz)
#define TreeView_SetToolTips(hwnd, hwndTT) \
(BOOL)SendMessageA((hwnd), TVM_SETTOOLTIPS, (WPARAM)(hwndTT), 0)
#define TreeView_GetToolTips(hwnd) \
(BOOL)SendMessageA((hwnd), TVM_GETTOOLTIPS, 0, 0)
#define TreeView_SetItemHeight(hwnd, iHeight) \
(INT)SendMessageA((hwnd), TVM_SETITEMHEIGHT, (WPARAM)iHeight, 0)
#define TreeView_GetItemHeight(hwnd) \
(INT)SendMessageA((hwnd), TVM_GETITEMHEIGHT, 0, 0)
......@@ -2165,11 +2156,37 @@ typedef struct tagNMTVGETINFOTIPW
#define TreeView_GetScrollTime(hwnd) \
(UINT)SendMessageA((hwnd), TVM_GETSCROLLTIME, 0, 0)
#define TreeView_SetInsertMark(hwnd, hItem, fAfter) \
(BOOL)SendMessageA((hwnd), TVM_SETINSERTMARK, (WPARAM)(fAfter), \
(LPARAM) (hItem))
#define TreeView_SetInsertMarkColor(hwnd, clr) \
(COLORREF)SendMessageA((hwnd), TVM_SETINSERTMARKCOLOR, 0, (LPARAM)clr)
#define TreeView_GetInsertMarkColor(hwnd) \
(COLORREF)SendMessageA((hwnd), TVM_GETINSERTMARKCOLOR, 0, 0)
#define TreeView_GetItemState(hwndTV, hti, mask) \
(UINT)SendMessageA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), (LPARAM)(mask))
#define TreeView_GetCheckState(hwndTV, hti) \
((((UINT)(SendMessageA((hwndTV), TVM_GETITEMSTATE, (WPARAM)(hti), \
TVIS_STATEIMAGEMASK))) >> 12) -1)
#define TreeView_SetLineColor(hwnd, clr) \
(COLORREF)SendMessageA((hwnd), TVM_SETLINECOLOR, 0, (LPARAM)(clr))
#define TreeView_GetLineColor(hwnd) \
(COLORREF)SendMessageA((hwnd), TVM_GETLINECOLOR, 0, 0)
#define TreeView_SetItemState(hwndTV, hti, data, _mask) \
{ TVITEM _TVi; \
_TVi.mask = TVIF_STATE; \
_TVi.hItem = hti; \
_TVi.stateMask = _mask; \
_TVi.state = data; \
SendMessageA((hwndTV), TVM_SETITEM, 0, (LPARAM)(TV_ITEM *)&_TVi); \
}
......
......@@ -40,6 +40,8 @@ typedef struct {
RECT rect;
RECT text;
RECT expandBox; /* expand box (+/-) coordinate */
RECT bitmap;
RECT statebitmap;
} TREEVIEW_ITEM;
......@@ -67,11 +69,14 @@ typedef struct tagTREEVIEW_INFO
HTREEITEM editItem; /* handle to item currently editted, 0 if none */
HTREEITEM firstVisible; /* handle to first visible item */
HTREEITEM dropItem; /* handle to item selected by drag cursor */
HTREEITEM insertMarkItem; /* item after which insertion mark is placed */
BOOL insertBeforeorAfter; /* flag used by TVM_SETINSERTMARK */
HIMAGELIST dragList; /* Bitmap of dragged item */
INT cx,cy; /* current x/y place in list */
COLORREF clrBk;
COLORREF clrText;
COLORREF clrLine;
COLORREF clrInsertMark;
HFONT hFont;
HFONT hBoldFont;
HWND hwndToolTip;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment