Sr.Antonio,
Com uma MDICHILD aberta, ao clicar em:
SET MESSAGE OF M->oWnd -> M->oWnd:oMsgBar:DateOn()
O sistema duplica, triplica o titulo da WINDOW principal.
#include "FiveWin.ch"
static oWnd
//----------------------------------------------------------------------------//
function Main()
DEFINE WINDOW oWnd MDI
SET MESSAGE OF oWnd TO "Main Window" DATE
ACTIVATE WINDOW oWnd
return nil
// Controlling focus from one window to another
#include "FiveWin.ch"
STATIC oWnd
//----------------------------------------------------------------------------//
FUNCTION Main()
LOCAL oBar
DEFINE WINDOW oWnd TITLE "Main window"
@ 3, 3 BUTTON "&Outra" SIZE 80, 20 ACTION Child()
DEFINE BUTTONBAR oBar _3D OF oWnd
DEFINE BUTTON OF oBar ACTION child()
SET MESSAGE OF oWnd TO 'APOS ABRIR MDICHILD CLIQUE CLIQUE NA DATA DA MSGBAR'
oWnd:oMsgBar:DateOn()
ACTIVATE WINDOW oWnd MAXIMIZED
RETURN NIL
//----------------------------------------------------------------------------//
FUNCTION Child()
LOCAL oWndChild
DEFINE WINDOW oWndChild TITLE "Child window"
@ 3, 3 BUTTON "&Controle" SIZE 90, 20
ACTIVATE WINDOW oWndChild MAXIMIZED
RETURN NIL
//----------------------------------------------------------------------------//
#include "FiveWin.ch"
extern GetTextWidth
static oWnd, oBmpTiled
function Main()
local oHand, oBmp
DEFINE BITMAP oBmp FILENAME "..\bitmaps\FiveWin.bmp"
DEFINE BITMAP oBmpTiled FILENAME "..\bitmaps\backgrnd\water.bmp"
DEFINE WINDOW oWnd MDI FROM 3, 6 TO 20, 70 ;
TITLE "Welcome to FiveWin" COLOR "W/BG" ;
MENUINFO 3 ;
MENU BuildMenu()
DEFINE CURSOR oHand HAND
DEFINE BUTTONBAR OF oWnd _3D SIZE 33, 33 CURSOR oHand _2007
DEFINE BUTTON OF oWnd:oBar NOBORDER ;
ACTION NewChild() FILENAME "..\bitmaps\open.bmp" ;
MESSAGE "Funciona em FWH13.06"
DEFINE BUTTON OF oWnd:oBar NOBORDER ;
ACTION oWnd:End() FILENAME "..\bitmaps\exit.bmp" ;
MESSAGE "Funciona em FWH13.06"
SET MESSAGE OF oWnd TO "Teste de MDI Child" CLOCK DATE KEYBOARD NOINSET
ACTIVATE WINDOW oWnd MAXIMIZED ;
ON PAINT ( BmpTiled( hDC, oWnd, oBmpTiled ),;
PalBmpDraw( hDC,;
( oWnd:nHeight() / 2 ) - ( oBmp:nHeight() / 2 ) - 50,;
( oWnd:nWidth() / 2 ) - ( oBmp:nWidth() / 2 ), oBmp:hBitmap ) ) ;
VALID MsgYesNo( "Sair do Programa?" )
oBmp:End()
oBmpTiled:End()
return nil
function BuildMenu()
local oMenu
MENU oMenu 2007
MENUITEM "&Test"
MENU
MENUITEM "&One" ACTION MsgAbout( "Hello" )
MENU
MENUITEM "&Another" ACTION MsgYesNo( "Hola" )
ENDMENU
MENUITEM "&Two"
MENUITEM "T&hree"
ENDMENU
MENUITEM "&Files"
MENUITEM "&Help" ACTION MsgAbout( "Hello" )
MENU
MENUITEM "Another"
ENDMENU
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
function NewChild() // funciona normal em FWH13.06
local oWndChild, oFont
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 0, -8
DEFINE WINDOW oWndChild TITLE "TEST TITLE MDI CHILD -> " + Time() MDICHILD
DEFINE BUTTONBAR OF oWndChild _3D
ACTIVATE WINDOW oWndChild
oWndChild:ReSize()
return nil
//----------------------------------------------------------------------------//
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()
while nRow < nHeight
nCol = 0
while nCol < nWidth
PalBmpDraw( hDC, nRow, nCol, oBmp:hBitmap )
nCol += nBmpWidth
end
nRow += nBmpHeight
end
return nil
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 89 guests