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

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

Postby ukoenig » Fri Mar 14, 2008 10:42 pm

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]
Last edited by ukoenig on Sun Mar 16, 2008 12:02 am, edited 1 time in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Postby Antonio Linares » Fri Mar 14, 2008 11:54 pm

Uwe,

Here you have a working sample:
Code: Select all  Expand view
#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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Backgrounds with freeimage.dll

Postby ukoenig » Sat Mar 15, 2008 12:32 am

Antonio,

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

Greetings from Germany
Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 57 guests