Solved

Delphi XE2, CreateBrushIndirect incompatible type

Posted on 2011-09-19
1
1,156 Views
Last Modified: 2016-10-03
Hi

I installed Delphi XE2 and try to compile an old project. Now I have the following problem:

In the old project there is code like

procedure JustAsample;
var
  Data: PEMRCreateBrushIndirect;
  xx : int64;
begin
  xx := CreateBrushIndirect(Data^.lb);
end;

the compiler now says: "incompatible type tagLogBrush and tagLogBrush32." Same error it doesn't matter if I compile 3bit or 64bit.

The CreateBrushIndirect-procedure is definied in winapi.windows-unit and I really can see that there are different types. Is that a bug from that unit and how can I solve it?

Thanks for your help, Peter
0
Comment
Question by:formi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
rotem156 earned 500 total points
ID: 36563779
It takes a TLogBrush structure as an argument and returns a handle to a brush (HBRUSH).

procedure JustAsample;
var
  Data: TLogBrush;
  xx :  HBRUSH;
begin
  xx := CreateBrushIndirect(Data);
end;

Open in new window

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month11 days, 7 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question