🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #10525

TVINSERTSTRUCT Undefined symbol 'item'

#10525
From: Michael
Date: Thu, 15 Apr 2004 07:23
29 lines
2024 bytes
G'Day

I have just started using Borland's compiler, their free command line release, version 5.5 (Borland C++ 5.5.1 for Win32)

I am trying to compile code to use a tree view control, however the compiler insists that the structure TVINSERTSTURCT does not have a member called item,
Here is a code fragment:

<Snip>
TVITEM newTreeItem;
TVINSERTSTRUCT newTreeItemStruct;

/* Fill out structure info */
newTreeItemStruct.item = newTreeItem;
newTreeItemStruct.hInsertAfter = TVI_LAST;
newTreeItemStruct.hParent = TVI_ROOT;

</snip>

The compiler gives this error:
Error E2451 tvtest.c 37: Undefined symbol 'item' in function WinMain

Looking at MSDN, the TVINSERTSTRUCT does indeed have the member "item", and the commctrl.h header file appears to implement this correctly, furthermore the code compiles correctly under the lcc-win32 C compiler

As per MSDN recommendation I have tried defining the NONAMELESSUNION token before including the commctrl.h, but this did not solve the problem,
I have also tried using the .itemex member (with a TVITEMEX structure) however the same problem arises, namely it reports the member does not exist.

Any help would be appreciated, thank you for your time
-- Michael
Technical Details
Message-ID: <407e3878$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,4dc96a77ba775a75,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-04-15 00:39:34 PST
From: "Michael" <mloz@mail.com>
Sender: "Michael" <mloz@mail.com>
Reply-To: "Michael" <mloz@mail.com>
Subject: TVINSERTSTRUCT Undefined symbol 'item'
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 210.49.176.217     
NNTP-Posting-Host: 207.105.83.66
Message-ID: <407e3878$1@newsgroups.borland.com>
Date: 15 Apr 2004 00:23:36 -0700
X-Trace: newsgroups.borland.com 1082013816 207.105.83.66 (15 Apr 2004 00:23:36 -0700)
Lines: 29
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail