help for a background

help for a background

Postby Silvio » Wed Jul 30, 2008 8:19 pm

I must insert a background into a window child but the image not is filled into this wchild .
this is my code test
Code: Select all  Expand view
#define OSFONDO   "D48.JPG"


  static oWnd



function Main()

   local oBar

   DEFINE WINDOW oWnd TITLE "Test" MDI ;
      MENU BuildMenu()

DEFINE BUTTONBAR oBar 3DLOOK BUTTONSIZE 39,39 OF oWnd 2007


SET MESSAGE OF oWnd TO "test image" NOINSET 2007

   ACTIVATE WINDOW oWnd

return nil

function BuildMenu()

   local oMenu

   MENU oMenu
      MENUITEM "Test"
      MENU
         MENUITEM "Beach" ACTION Beach()
      ENDMENU
      oMenu:AddMdi()
   ENDMENU

return oMenu

function beach()
LOCAL oWChld

DEFINE WINDOW oWChld OF oWnd MDICHILD  ;
TITLE 'Beach Plan'

@0,0 IMAGE oImg FILENAME OSFONDO OF oWChld SIZE oWChld:nWidth, oWChld:nHeight PIXEL ADJUST



          cRegistro := "OMBRELLONI : "
          cAutore   := "Liberi  : "
          cSyst     := "Occupati : "

SET MESSAGE OF  oWChld TO "" NOINSET
DEFINE MSGITEM OF  oWChld:oMSGBAR  prompt cregistro  size 150 ACTION    nil
DEFINE MSGITEM OF  oWChld:oMSGBAR  prompt  cAutore  size 150 ACTION    nil
DEFINE MSGITEM OF  oWChld:oMSGBAR  prompt cSyst  size 150 ACTION    nil

ACTIVATE WINDOW oWChld MAXIMIZED

return nil



have you an idea ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Wnd-Background

Postby ukoenig » Thu Jul 31, 2008 9:03 am

Hello Silvio,
just a sample ;


Code: Select all  Expand view

DEFINE IMAGE oImage FILENAME SW_LOGO  TRANSPARENT
DEFINE WINDOW oWnd TITLE "Your Title"  MDI MENU TMenu():New()

DEFINE BUTTONBAR oBar1 3DLOOK OF oWnd BUTTONSIZE 70,80 2007 RIGHT

// Button 1
DEFINE BUTTON oBtn1 OF oBar1 ACTION ( NIL ) ;
RESOURCE "null_5"

// Button 2
DEFINE BUTTON oBtn2 OF oBar1 ACTION ( SYS_HELP() )  ;
RESOURCE "info_5" PROMPT "Help for" + CRLF + "Visual Tools"   

....
....
....

// Button 5
DEFINE BUTTON oBtn5 OF oBar1 ;
ACTION SHOW_FILE( SetOption(nOption) ) ;                 
RESOURCE "magic_5" PROMPT "Show " + CRLF + "Design"

// Button 6
DEFINE BUTTON oBtn9 OF oBar1 ACTION ( oWnd:End() ) ;
RESOURCE "ende_5" PROMPT "&Exit"   

// You can place a GIF somewhere
// use < ON PAINT > to show a background

ACTIVATE WINDOW oWnd MAXIMIZED ;
ON PAINT ( PalBmpDraw( hDC, 0, 0, oImage:hBitmap, , oWnd:nWidth, oWnd:nHeight ) ) ;
ON INIT ( oBtn5:Disable(), PlaceGif1( oWnd, oBar1) )
oImage:End()   



Best Regards
Uwe :lol:
Last edited by ukoenig on Thu Jul 31, 2008 9:07 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 » Thu Jul 31, 2008 9:07 am

Silvio,

oWChld:oClient = oImg
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

Postby Silvio » Thu Jul 31, 2008 9:26 pm

Antonio
i must insert on wchild many buttons
Now the wchild paint the jpg but I cannot clik on buttons why ?

look this code



#INCLUDE"FIVEWIN.CH"


#define OSFONDO "D48.JPG"


static oWnd



function Main()

local oBar

DEFINE WINDOW oWnd TITLE "Test" MDI ;
MENU BuildMenu()

DEFINE BUTTONBAR oBar 3DLOOK BUTTONSIZE 39,39 OF oWnd 2007


SET MESSAGE OF oWnd TO "test image" NOINSET 2007

ACTIVATE WINDOW oWnd

return nil

function BuildMenu()

local oMenu

MENU oMenu
MENUITEM "Test"
MENU
MENUITEM "Beach" ACTION Beach()
ENDMENU
oMenu:AddMdi()
ENDMENU

return oMenu

function beach()
LOCAL oWChld

DEFINE WINDOW oWChld OF oWnd MDICHILD ;
TITLE 'Beach Plan'

@0,0 IMAGE oImg FILENAME OSFONDO OF oWChld SIZE oWChld:nWidth, oWChld:nHeight PIXEL ADJUST
oWChld:oClient = oImg



@ 70, 80 BTNBMP oBtn FILENAME "../bitmaps/yes.bmp" ;
SIZE 50, 30 OF oWChld NOBORDER ACTION MsgInfo( "click" )






cRegistro := "OMBRELLONI : "
cAutore := "Liberi : "
cSyst := "Occupati : "

SET MESSAGE OF oWChld TO "" NOINSET
DEFINE MSGITEM OF oWChld:oMSGBAR prompt cregistro size 150 ACTION nil
DEFINE MSGITEM OF oWChld:oMSGBAR prompt cAutore size 150 ACTION nil
DEFINE MSGITEM OF oWChld:oMSGBAR prompt cSyst size 150 ACTION nil

ACTIVATE WINDOW oWChld MAXIMIZED

return ni
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 70 guests