Solved

Delphi XE2, CreateBrushIndirect incompatible type

Posted on 2011-09-19
1
1,139 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
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now