You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
No, "Item.Item." is correct. The structures are nested this way:
Code:
UNION TV_ITEM_UNION
itemex AS TVITEMEX
[b]item[/b] AS TV_ITEM
END UNION
TYPE TV_INSERTSTRUCT
hParent AS DWORD
hInsertAfter AS DWORD
[b]item[/b] AS TV_ITEM_UNION
END TYPE
So if you DIM a structure as a TV_INSERTSTRUCT it has an element called Item that is a TV_ITEM__UNION, which has an element called Item.
Not ideal naming, perhaps, but the compilers have no problem keeping it straight.
I suspect that you're not using the latest COMMCTRL.INC file. I checked the file that is (internally) dated December 10, 1999 and it does contain the structures I posted.
The latest files are available for download from this web site.
> is there any advantage to this alternate structure.
Well, one advantage is that Dave's code will compile.
Seriously, the TVITEMEX structure adds the lIntegral element, which can be used to create oversized items for owner-drawn treeview items. If you don't need that feature, there's no real advantage.
But IMO it's best to use the lastest WIN32API.INC files as improvements are made by PowerBASIC Support, regardless of whether or not you need the specific improvements. One of these days they will change something you do need, and then you would have to choose between "catching up" with all of the changes, or forever cutting and pasting custom versions of WIN32API.INC for your own use. Been there, done that, learned my lesson...
To avoid confusion, the PB include file should have used TVINSERTSTRUCT,
not TV_INSERTSTRUCT to follow current naming conventions as per MicroSofts
updates.
Regards,
Jules
[This message has been edited by Jules Marchildon (edited February 24, 2001).]
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment