Page 1 of 1

How to use FREEIMAGE.dll for Backgrounds in Wind./Dialogs

Posted: Fri Mar 14, 2008 10:42 pm
by ukoenig
Hello,

I wanted to change my dialog-backgrounds
from BMP to another format with FREEIMAGE.dll.

That was impossible.
I did a little change on the sample testimg.
The button-controls are overlappt with the image.
This is normal, when the image is a background.

The controls don't work anymore as soon they
are inside of the image area.
I think, for backgrounds not useful ?

Image

Regards
uwe :o [/img]

Posted: Fri Mar 14, 2008 11:54 pm
by Antonio Linares
Uwe,

Here you have a working sample:

Code: Select all

#include "FiveWin.ch"

function Main()

   local oDlg, oImg 
   
   DEFINE IMAGE oImg FILENAME "..\bitmaps\FiveTech.gif"

   DEFINE DIALOG oDlg TITLE "Image background"

   @ 0.5, 1 BUTTON "OK" ACTION MsgInfo( "click" )

   ACTIVATE DIALOG oDlg CENTERED ;
      ON PAINT PalBmpDraw( hDC, 0, 0, oImg:hBitmap )
      
   oImg:End()   

return nil
Image

Backgrounds with freeimage.dll

Posted: Sat Mar 15, 2008 12:32 am
by ukoenig
Antonio,

thank you very much.
It works great.
Now the user can choose different Graphic-Types.

Greetings from Germany
Uwe