🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Linker Error - GradientFill

#2484
From: DreamChaser
Date: Sun, 25 Feb 2007 02:17
54 lines
2411 bytes
I keep getting the following error

[Linker Error] Unresolved external 'GradientFill' referenced from 
C:\PROGRAM FILES\BORLAND\CBUILDER5\PROJECTS\...\FRMMAIN.OBJ

But code insight shows the prototype/parameters

it is declared in Windows.hpp
function GradientFill; external msimg32 name 'GradientFill';

  & wingdi.h
WINGDIAPI BOOL  WINAPI GradientFill( IN HDC, IN PTRIVERTEX, IN ULONG, IN 
PVOID, IN ULONG, IN ULONG);


Anybody get this to work? Can think of what I might be doing wrong? Know 
the phase of the moon? :)

Any help would be greatly appreciated. Code follows:

DC
BCB5ent

//---------------------------------------------------------------------------
void __fastcall TMainForm::FormPaint(TObject *Sender)
{
    int startColor = ColorToRGB(clBlue);
    int endColor   = ColorToRGB(clBlack);
    TRIVERTEX      vert[2];
    GRADIENT_RECT  gRect;

    vert[0].x      = 0;
    vert[0].y      = 0;
    vert[0].Red    = GetRValue(startColor);
    vert[0].Green  = GetGValue(startColor);
    vert[0].Blue   = GetBValue(startColor);
    vert[0].Alpha  = 0x0000;

    vert[1].x      = 0;
    vert[1].y      = 0;
    vert[1].Red    = GetRValue(endColor);
    vert[1].Green  = GetGValue(endColor);
    vert[1].Blue   = GetBValue(endColor);
    vert[1].Alpha  = 0x0000;

    gRect.UpperLeft  = 0;
    gRect.LowerRight = 1;
    GradientFill(pnlEventEditor->Handle,
                 vert, 2,
                 &gRect, 1,
                 GRADIENT_FILL_RECT_H
                );
} //End FormPaint()
//---------------------------------------------------------------------------
Technical Details
Message-ID: <45e0f193$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,877fc148c182c41,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Sat, 24 Feb 2007 20:17:41 -0600
From: DreamChaser <jkofsky@No-Spam.net>
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Linker Error - GradientFill
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 65.6.192.60
Message-ID: <45e0f193$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1172369811 65.6.192.60 (24 Feb 2007 18:16:51 -0800)
Lines: 54
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail