1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Work around horrifyingly nonportable use of unions in <commctrl.h>

[originally from svn r694]
This commit is contained in:
Simon Tatham 2000-10-09 16:12:51 +00:00
parent ceab40ec49
commit 3e7c4813d7

View File

@ -1186,8 +1186,13 @@ static HTREEITEM treeview_insert(struct treeview_faff *faff,
HTREEITEM newitem;
ins.hParent = (level > 0 ? faff->lastat[level-1] : TVI_ROOT);
ins.hInsertAfter = faff->lastat[level];
ins.DUMMYUNIONNAME.item.mask = TVIF_TEXT;
ins.DUMMYUNIONNAME.item.pszText = text;
#if _WIN32_IE >= 0x0400 && defined NONAMELESSUNION
#define INSITEM DUMMYUNIONNAME.item
#else
#define INSITEM item
#endif
ins.INSITEM.mask = TVIF_TEXT;
ins.INSITEM.pszText = text;
newitem = TreeView_InsertItem(faff->treeview, &ins);
if (level > 0)
TreeView_Expand(faff->treeview, faff->lastat[level-1], TVE_EXPAND);