Window: insert a text into a box

Window: insert a text into a box

Postby Silvio.Falconi » 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 :

Image


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

 
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Window: insert a text into a box

Postby ukoenig » Mon Mar 25, 2013 4:41 pm

Silvio,

is there still something more to display inside the Info ?

Image

Image

Image

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.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Window: insert a text into a box

Postby Silvio.Falconi » Mon Mar 25, 2013 6: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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Window: insert a text into a box

Postby Silvio.Falconi » Tue Mar 26, 2013 6:52 pm

Any solution please ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 100 guests