and when I resize the window this box must be drawed at the same coordinates
I wish insert two smaller bmps into background image
as this application :
I have made this test to try, when you resize the wnd the box is moved
- Code: Select all Expand view
#include "FiveWin.ch"
STATIC oWndMain
Function Test()
oImagen = TImage():Define( , "C:\work\fwh\bitmaps\backgrnd\clouds4.bmp" )
DEFINE WINDOW oWndMain ;
TITLE "test" ;
MENU BuildMenu() ;
COLOR CLR_BLACK, GetSysColor( 15 ) - Rgb( 30, 30, 30 )
oWndMain:bPainted := {|hDC| (PalBmpDraw( hDC, 0, 0, oImagen:hBitmap,, oWndMain:nWidth, oWndMain:nHeight,, .T.),;
Scrivitesto(hDC)) }
ACTIVATE WINDOW oWndMain
RETURN nIL
Function BuildMenu()
Local oMenu
MENU oMenu 2007
MENUITEM i18n("&Info")
MENU
MENUITEM i18n( "Specificare la stampante" ) RESOURCE "SH_IMPRIMIR2" ;
ACTION PrinterSetup() ;
MESSAGE i18n( "Stabilire la configurazione della sua stampante. " )
SEPARATOR
MENUITEM i18n( "Configurazione del programma" ) RESOURCE "MENU_CONFIG" Action ::Configurazione()
SEPARATOR
MENUITEM i18n( "Uscire dal programma" ) RESOURCE "SH_SALIR2" ;
ACTION NL ;
MESSAGE i18n( " Terminare l'esecuzione dell'applicazione. " )
MENUITEM i18n( "test" ) action NIL
ENDMENU
RETURN oMenu
FUNCTION Scrivitesto (hDC)
Local aRect2:= {oWndMain:nHeight-120,;
oWndmain:nWidth-420,;
oWndMain:nHeight-10,;
oWndMain:nWidth-10}
Local cText1:= 'tecla F10'
Local cText2:= 'Acompanhamento dos'
Local cText3:= 'pedidos feitos'
Local cText4:= 'em : venda delivery'
Local cText5:= 'em : venda balcão'
Local cText6:= 'Operador atual'
Local cText7:= dtoc(date())+' as '+substr(time(),1,5)+'h'
Local cText8:= 'Número de Série'
Local _numero_serie_ :="00030302309"
SetBkMode(hDC,1)
SetTextColor(hDC,CLR_RED)
DrawText(hDC," testo numero uno",{oWndMain:nHeight-140,;
oWndmain:nWidth-420,;
oWndMain:nHeight-10,;
oWndMain:nWidth-10})
SetTextColor(hDC,CLR_WHITE)
aRectBox:= {oWndMain:nHeight-220,;
oWndmain:nWidth-760,;
oWndmain:nWidth-20 ,;
oWndMain:nHeight-200}
RoundBox( hDC, aRectBox[1], aRectBox[2], aRectBox[3], aRectBox[4], 2, 2,;
CLR_RED, 1 )
SetTextColor(hDC,CLR_RED)
DrawTextEx( hDC, "TESTO NUMERO DUE", aRect2, 1 )
RETURN NIL