GradientFill function

Windows specific questions.
wallyfblu
Posts: 69
Joined: May 24, 2006 10:58
Location: ITALY

GradientFill function

Postby wallyfblu » Sep 03, 2007 14:23

I've found example code on the net that use GradientFill function from MSIMG32.DLL library. I haven't found any reference in FB .bi files.
I've tried this code to use the function:

Code: Select all

Dim retlib As HINSTANCE
retlib=LoadLibrary("MSIMG32.DLL")
If retlib=0 Then
   MessageBox(NULL,"error","LIB",MB_OK)
EndIf

Dim Shared GradientFill As Function (hDC AS HDC, pVertex As PTRIVERTEX, dwNumVertex As Integer,pMesh AS PGRADIENT_RECT, dwNumMesh as integer, dwMode As integer)As BOOL

Gradientfill=GetProcAddress(retlib,"GradientFill")
.
.
.
GradientFill(hdc,@Vert(0),2,@Rect,1,GRADIENT_FILL_RECT_V)



Is the right way to use that function?

Thanks
MichaelW
Posts: 3500
Joined: May 16, 2006 22:34
Location: USA

Postby MichaelW » Sep 03, 2007 22:30

Not exactly, but not too far off. There was a discussion here that covered two methods, loading the library dynamically and creating and using an import library. One thing I failed to note was that the batch file that builds the import library assumes that dlltool is somewhere on your path.
wallyfblu
Posts: 69
Joined: May 24, 2006 10:58
Location: ITALY

Postby wallyfblu » Sep 04, 2007 6:41

Thanks a lot, I have not searched in the forum about GradientFill. Now I have other problems with that code, but I try to solve myself (maybe) :)

Return to “Windows”

Who is online

Users browsing this forum: No registered users and 2 guests