🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: [C++ Error] uxtheme.h(176): E2146 Need an identifier to declare

#5396
From: Ed Mulroy
Date: Fri, 19 Aug 2005 17:50
73 lines
3015 bytes
There appears to be a bug in the header.

This is not correct syntax:

--------------------
typedef enum THEMESIZE
{
    TS_MIN,             // minimum size
    TS_TRUE,            // size without stretching
    TS_DRAW,            // size that theme mgr will use to draw part
};

--------------------

The correct syntax is:

--------------------
typedef enum
{
    TS_MIN,             // minimum size
    TS_TRUE,            // size without stretching
    TS_DRAW,            // size that theme mgr will use to draw part
}  THEMESIZE;

--------------------

If you were to use only C++ and not C it could optionally be:

--------------------
enum   THEMESIZE
{
    TS_MIN,             // minimum size
    TS_TRUE,            // size without stretching
    TS_DRAW,            // size that theme mgr will use to draw part
};

--------------------

As to the question of if you should change the header file, I am modifying 
mine right now.

.  Ed

> JD wrote in message
> news:43061578@newsgroups.borland.com...
>
> I've included uxtheme.h into a project but it generates 2
> compiler errors:
>
> [C++ Error] uxtheme.h(176): E2146 Need an identifier to declare
> [C++ Error] uxtheme.h(546): E2146 Need an identifier to declare
>
> both of which follow a typedef enum statement:
>
> typedef enum THEMESIZE
> {
>    TS_MIN,             // minimum size
>    TS_TRUE,            // size without stretching
>    TS_DRAW,            // size that theme mgr will use to draw part
> };
>
> and
>
> typedef enum PROPERTYORIGIN
> {
>    PO_STATE,           // property was found in the state section
>    PO_PART,            // property was found in the part section
>    PO_CLASS,           // property was found in the class section
>    PO_GLOBAL,          // property was found in [globals] section
>    PO_NOTFOUND         // property was not found
> };
>
> I don't think that I should be changing the header so what do I do?
Technical Details
Message-ID: <43061bdd$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43061578@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,fb85fd278a19acb2
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Ed Mulroy" <dont_email_me@bitbuc.ket>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <43061578@newsgroups.borland.com>
Subject: Re: [C++ Error] uxtheme.h(176): E2146 Need an identifier to declare
Date: Fri, 19 Aug 2005 13:50:32 -0400
Lines: 75
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
NNTP-Posting-Host: 69.134.170.196
Message-ID: <43061bdd$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1124473821 69.134.170.196 (19 Aug 2005 10:50:21 -0700)
X-Authenticated-User: edmulroy
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail