DEFINE WINDOW oWnd MDI
oWnd:oWndClient:bPainted := { || oWnd:oWndClient:DrawImage( "..\bitmaps\pngs\2.png",,,,,,"RB" ) }
ACTIVATE WINDOW oWnd CENTERED
DEFINE WINDOW oWnd MDI
oWnd:bPainted := { || oWnd:DrawImage( "..\bitmaps\pngs\2.png",,,,,,"RB" ) }
ACTIVATE WINDOW oWnd CENTERED
#include "FiveWin.ch"
STATIC oWnd
FUNCTION Main()
LOCAL oIco, oBar, oBmp, oLogo
DEFINE ICON oIco FILE "..\icons\fax.ico"
DEFINE WINDOW oWnd MDI FROM 1, 1 TO 22, 75 TITLE "Byron Logo" ;
MENU BuildMenu() COLOR "B/W" ICON oIco
DEFINE BUTTONBAR oBar _3D SIZE 26, 27 OF oWnd
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\new.bmp" FLAT ;
ACTION MsgInfo( "New" ) ;
TOOLTIP "Creates a new document"
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\open.bmp" FLAT ;
ACTION MsgInfo( cGetFile( "*.*", "Select a document to open" ) ) ;
TOOLTIP "Opens a document" WHEN .F.
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\floppy.bmp" FLAT ;
ACTION MsgInfo( Time() ) TOOLTIP "Saves this document"
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\printer.bmp" FLAT ;
ACTION MsgInfo( "Prints this document" ) TOOLTIP "Print this document" GROUP
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\prop.bmp" FLAT ;
ACTION PrinterSetup() TOOLTIP "Setup the printer"
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\HelpInd.bmp" FLAT ;
ACTION MsgInfo( Version() ) TOOLTIP "A multiple lines" + ;
Chr( 13 ) + Chr( 10 ) + "tooltip!" GROUP
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Help.bmp" FLAT ;
ACTION MsgInfo( "fivewin power!" ) TOOLTIP "fivewin power!"
DEFINE BUTTON OF oBar FILENAME "..\bitmaps\16x16\Exit.bmp" FLAT ;
ACTION( oWnd:End() ) TOOLTIP "Exit this app" GROUP
DEFINE MESSAGE OF oWnd ;
PROMPT FWVERSION + " " + FWCOPYRIGHT ;
NOINSET CENTERED KEYBOARD DATE CLOCK
DEFINE BITMAP oBmp FILENAME "..\bitmaps\pngs\dvd.png"
// DEFINE BITMAP oBmp FILENAME "..\bitmaps\sea.bmp"
oWnd:bPainted = {| hDC | BmpTiled( hDC, oWnd, oBmp ) }
@ 0, 0 Image oLogo FILE ".\Logo.jpg" Of oWnd:oWndClient No Border
ACTIVATE WINDOW oWnd ;
ON RESIZE SetLogo( oLogo, oWnd )
RETURN NIL
FUNCTION SetLogo( oLogo, oWnd )
LOCAL nX, nY
oWnd:CoorsUpdate()
oWnd:oWndClient:CoorsUpdate()
oLogo:CoorsUpdate()
oLogo:Hide()
nX := oWnd:oWndClient:nWidth() - oLogo:nWidth()
nY := oWnd:oWndClient:nHeight() - oLogo:nHeight()
oLogo:Move( nY, nX, oLogo:nWidth(), oLogo:nHeight(), .T. )
oLogo:Show()
RETURN NIL
FUNCTION BuildMenu()
LOCAL oMenu
MENU oMenu
MENUITEM "Information"
MENU
MENUITEM "&About..." ;
ACTION MsgInfo( FWDESCRIPTION ) ;
FILENAME "..\bitmaps\16x16\info.bmp"
SEPARATOR
MENUITEM "&End..." ;
ACTION( oWnd:End() ) ;
FILENAME "..\bitmaps\16x16\exit.bmp"
ENDMENU
MENUITEM "&Clients"
MENU
MENUITEM "&New..." ;
ACTION ( MsgStop( "New Clients" ), ;
oWnd:Say( 5, 5, "New Clients...", "GR+/G" ) ) ;
FILENAME "..\bitmaps\16x16\faces.bmp"
MENUITEM "&Modify..." ACTION MsgInfo( "Modif. Clients" ) ;
FILENAME "..\bitmaps\edit.bmp"
MENUITEM "&Delete..." ACTION MsgAlert( "Del Clients" ) ;
FILENAME "..\bitmaps\16x16\delete.bmp"
SEPARATOR
MENUITEM "&Browse..." ACTION MsgInfo( "Browse Clients" ) ;
FILENAME "..\bitmaps\16x16\browse.bmp"
ENDMENU
MENUITEM "&Utilities"
MENU
MENUITEM "&Calculator..." ACTION WinExec( "Calc" ) ;
FILENAME "..\bitmaps\16x16\calc.bmp"
MENUITEM "&Internet..." ;
ACTION WinExec( "start iexplore www.fivetech.com", 0 ) ;
FILENAME "..\bitmaps\16x16\explorer.bmp"
ENDMENU
ENDMENU
RETURN oMenu
STATIC FUNCTION BmpTiled( hDC, oWnd, oBmp )
LOCAL nWidth := oWnd:nWidth(), nHeight := oWnd:nHeight()
LOCAL nRow := 0, nCol := 0, n
LOCAL nBmpWidth := oBmp:nWidth(), nBmpHeight := oBmp:nHeight()
IF oBmp:hBitmap == 0
RETURN NIL
ENDIF
WHILE nRow < nHeight
nCol = 0
WHILE nCol < nWidth
PalBmpDraw( hDC, nRow, nCol, oBmp:hBitmap )
nCol += nBmpWidth
END
nRow += nBmpHeight
END
RETURN NIL
// FIN / END
#include "fivewin.ch"
function Main()
local oWnd, oBrush, oBar
local cPng1 := "..\bitmaps\pngs\2.png"
local cPng2 := "..\bitmaps\pngs\pan_setting.png"
DEFINE BRUSH oBrush FILE "..\bitmaps\backgrnd\beach.bmp"
DEFINE WINDOW oWnd MDI BRUSH oBrush TITLE "TRANSP LOGOS"
DEFINE BUTTONBAR oBar OF oWnd 2007
SET MESSAGE OF oWnd TO "" 2007
oWnd:oWndClient:bPainted := { || ;
oWnd:oWndClient:DrawImage( cPng1, { .6,.7,, },,,,, "RB" ), ;
oWnd:oWndClient:DrawImage( cPng2,{,,,.2},,,,,"LB" ) }
ACTIVATE WINDOW oWnd CENTERED
RELEASE BRUSH oBrush
return nil
byron.hopp wrote:Mr. Rao, yes that did it. I had to convert my app to a newer version of FiveWin and once I got that going it was good. Thanks so much for taking the time to explain.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 35 guests