I am trying to use CVF 6.1 (though I also have v6.6 that I haven't installed yet) to set the checkbox state on a treeview control. The SDK gives the example in C below. I can duplicate this in Fortran except for the line where tvItem.state = INDEXTOSTATEIMAGEMASK... But when I do that, the fortran compiler says INDEXTOSTATEIMAGEMASK is undefined (though I call "use dfwin" and "use Comctl32"). Any ideas would be appreciated.
BOOL TreeView_SetCheckState(HWND hwndTreeView, HTREEITEM hItem, BOOL fCheck)
tvItem.mask = TVIF_HANDLE | TVIF_STATE;
tvItem.hItem = hItem;
tvItem.stateMask = TVIS_STATEIMAGEMASK;
Since state images are one-based, 1 in this macro turns the check off, and
2 turns it on.
tvItem.state = INDEXTOSTATEIMAGEMASK((fCheck ? 2 : 1));
return TreeView_SetItem(hwndTreeView, &tvItem);