FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Window: insert a text into a box
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

Window: insert a text into a box

Posted: Mon Mar 25, 2013 12:41 PM
I wish insert application information in a small box transparent into a window
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 (fw): Select all Collapse
#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
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM

Re: Window: insert a text into a box

Posted: Mon Mar 25, 2013 04:41 PM
Silvio,

is there still something more to display inside the Info ?







Best Regards
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.
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

Re: Window: insert a text into a box

Posted: Mon Mar 25, 2013 06:31 PM

please Uwe it not is that I mean!!!!!
Please download last Minigui and on Sample applications there is SuperCheff application
With some command on minigui make it ... I cannot Think it not possible with Fivewin for Harbour!!!
I wish a frame( group to ) transparent on window please run the minigui application I sad and you can see that I mean

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM

Re: Window: insert a text into a box

Posted: Tue Mar 26, 2013 06:52 PM

Any solution please ?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion