🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: how to resolve conflicts in gdi+ ?

#1605
From: Darko Miletic
Date: Thu, 05 Jul 2007 20:31
19 lines
1631 bytes
4N wrote:
> oops, maybe I should have used the "graphics" group, sorry.
> 
> 
> If I define STRICT there are functions that need cast, eg. an error I get 
> is:
> 
> const HANDLE handle=...;
>  GetWindowLong(handle, GWL_STYLE);

As Remy told you GetWindowLong expects HWND and not const HANDLE (const 
void*).

Dirty hack would be something like this:

GetWindowLong(reinterpret_cast<HWND>(const_cast<HANDLE>(handle)),GWL_STYLE);

I just do not understand why are you using HANDLE in the first place 
instead of HWND.
Technical Details
Message-ID: <468d5566$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <468d2ea0@newsgroups.borland.com> <468d312f$1@newsgroups.borland.com> <468d3c18@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
Date: Thu, 05 Jul 2007 17:31:54 -0300
From: Darko Miletic <kiklop@fibertel.com.ar>
Reply-To: Darko Miletic <kiklop@fibertel.com.ar>
User-Agent: Thunderbird 2.0.0.4 (Windows/20070604)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: how to resolve conflicts in gdi+ ?
References: <468d2ea0@newsgroups.borland.com> <468d312f$1@newsgroups.borland.com> <468d3c18@newsgroups.borland.com>
In-Reply-To: <468d3c18@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 000754-2, 05/07/2007), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 200.49.157.162
Message-ID: <468d5566$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1183667558 200.49.157.162 (5 Jul 2007 13:32:38 -0700)
Lines: 20
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail