🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: how to resolve conflicts in gdi+ ?

#1602
From: 4N
Date: Thu, 05 Jul 2007 18:45
44 lines
2304 bytes
oops, maybe I should have used the "graphics" group, sorry.

> I use that same statement in my GDI+ code and it works fine for me.

How? If I don't define STRICT the code stops in the last line of the 
following code (inside the file GDIPLUSGRAPHICS.H):

class Graphics : public GdiplusBase
{
public:
    friend class Region;
    friend class GraphicsPath;
    friend class Image;
    friend class Bitmap;
    friend class Metafile;
    friend class Font;
    friend class FontFamily;
    friend class FontCollection;
    friend class CachedBitmap;

    static Graphics* FromHDC(IN HDC hdc)
    {
        return new Graphics(hdc);

and I get the errors:

[C++ Error] GdiplusGraphics.h(34): E2015 Ambiguity between 
'Gdiplus::Graphics::Graphics(void *)' and 'Gdiplus::Graphics::Graphics(void 
*,int)'
[C++ Error] OpenImages.cpp(294): E2015 Ambiguity between 
'Gdiplus::Graphics::Graphics(void *)' and 'Gdiplus::Graphics::Graphics(void 
*,int)'


If I define STRICT there are functions that need cast, eg. an error I get 
is:

const HANDLE handle=...;
 GetWindowLong(handle, GWL_STYLE);

  [C++ Error] Unit_Main.cpp(3297): E2034 Cannot convert 'void * const' to 
'HWND__ *'
  [C++ Error] Unit_Main.cpp(3297): E2342 Type mismatch in parameter 'hWnd' 
(wanted 'HWND__ *', got 'void *')
Technical Details
Message-ID: <468d3c18@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <468d2ea0@newsgroups.borland.com> <468d312f$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,42fc4c19e42cbb45
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "4N" <xxxx@yyyy.zzz>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <468d2ea0@newsgroups.borland.com> <468d312f$1@newsgroups.borland.com>
Subject: Re: how to resolve conflicts in gdi+ ?
Date: Thu, 5 Jul 2007 20:45:07 +0200
Lines: 46
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 87.19.102.3
Message-ID: <468d3c18@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1183661080 87.19.102.3 (5 Jul 2007 11:44:40 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
X-Original-Bytes: 2158