DMC + Win32Api: Error: undefined identifier 'SetDCBrushColor'

Jack jckj33 at gmail.com
Sun May 16 18:06:40 UTC 2021


On Sunday, 16 May 2021 at 14:51:56 UTC, Marcone wrote:
> Well, I program in D as a hobby for just over a year, and I 
> like to learn and explore this wonderful programming language. 
> Now I found the DMC compiler that compiles C ++ code. So I 
> decided to test it. Creating a program with a win32api 
> graphical interface I run into this error:
>
> Error: undefined identifier 'SetDCBrushColor'
>
> How to solve this problem? Thanks.

if it's not one defined in one of the core.sys.windows module, 
export it yourself:

```d
pragma(lib, "Gdi32.lib");

COLORREF SetDCBrushColor(
   HDC      hdc,
   COLORREF color
);

```


More information about the Digitalmars-d-learn mailing list