Modify the title font of a MdiChild window

Modify the title font of a MdiChild window

Postby Ari » Thu Mar 14, 2024 1:53 pm

Hello everybody !

I hope everything is ok!

Dear,

Is it possible to modify the title font of a MDIChild or Dialog window, increasing the size and style?
Thanks,
Ari

FWH 2212 - Harbour 3.2.0 - Embarcadero 7.43 - MySQL
São Paulo - SP - Brasil
www.sisrev.com.br
User avatar
Ari
 
Posts: 234
Joined: Fri Feb 03, 2006 4:21 pm
Location: São Paulo, SP - Brazil

Re: Modify the title font of a MdiChild window

Postby karinha » Thu Mar 14, 2024 2:19 pm

NO.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7824
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Modify the title font of a MdiChild window

Postby Otto » Fri Mar 15, 2024 1:46 am

Hello Ari,

Have you seen this sample? It is for WINDOWS, but maybe you can change it to a dialog as well.

Best regards,
Otto

Image


Code: Select all  Expand view


#include "FiveWin.ch"

    #define CLR_MSPURPLE RGB( 128,  57, 123 )
    #define CLR_MSRED    RGB( 232,  17,  35 )
    #define CLR_MSGRAY   RGB( 229, 229, 229 )

    #define TME_LEAVE    2

    function Main()

       local oWnd, nRowPos, nColPos, oBtnClose, oBtnMax, oBtnMin, lDrag := .F., oBold


DEFINE FONT oBold  NAME "Segoe UI" SIZE 0,-18 BOLD


       DEFINE WINDOW oWnd STYLE ( WS_POPUP | 0x00040000L  ) COLOR CLR_BLACK, CLR_MSPURPLE



       oWnd:SetSize( 500, 300 )
       oWnd:Center()
       oWnd:Shadow()

       oWnd:bLClicked = { | nRow, nCol | If( nRow < 25, ( oWnd:Capture(), nRowPos := nRow, nColPos := nCol, lDrag := .T. ),) }
         
       oWnd:bMMoved = { | nRow, nCol | TrackMouseEvent( oWnd:hWnd, TME_LEAVE ),;
                                       If( lDrag .and. ! IsZoomed( oWnd:hWnd ) .and. IsOverWnd( oWnd:hWnd, nRow, nCol ),;
                                           oWnd:Move( oWnd:nTop + nRow - nRowPos, oWnd:nLeft + nCol - nColPos,,, .T. ),) }  

       oWnd:bLButtonUp = { || ReleaseCapture(), lDrag := .F. }
       oWnd:bMLeave    = { || lDrag := .F. }

       @ 1, oWnd:nWidth - 46 BTNBMP oBtnClose BITMAP "../bitmaps/16x16/closew.bmp" ;
          FLAT NOBORDER NOROUND ACTION oWnd:End() SIZE 45, 29 ;
          COLOR CLR_BLACK, CLR_MSPURPLE

       @ 1, oWnd:nWidth - 92 BTNBMP oBtnMax BITMAP "../bitmaps/16x16/max.bmp" ;
          FLAT NOBORDER NOROUND ACTION If( ! IsZoomed( oWnd:hWnd ), oWnd:Maximize(), oWnd:Restore() ) SIZE 45, 29 ;
          COLOR CLR_BLACK, CLR_MSPURPLE

       @ 1, oWnd:nWidth - 138 BTNBMP oBtnMin BITMAP "../bitmaps/16x16/min.bmp" ;
          FLAT NOBORDER NOROUND ACTION If( ! IsIconic( oWnd:hWnd ), oWnd:Iconize(), oWnd:Restore() ) SIZE 45, 29 ;
          COLOR CLR_BLACK, CLR_MSPURPLE

       oBtnClose:bMMoved = { || oBtnClose:SetColor( CLR_BLACK, If( oBtnClose:lMOver, CLR_MSRED, oWnd:nClrPane ) ) }
       oBtnMax:bMMoved   = { || oBtnMax:SetColor( CLR_BLACK, If( oBtnMax:lMOver, CLR_MSGRAY, oWnd:nClrPane ) ) }
       oBtnMin:bMMoved   = { || oBtnMin:SetColor( CLR_BLACK, If( oBtnMin:lMOver, CLR_MSGRAY, oWnd:nClrPane ) ) }

       oWnd:bResized = { || oBtnClose:Move( 1, oWnd:nWidth - 46 ), oBtnMax:Move( 1, oWnd:nWidth - 92 ),;
                            oBtnMin:Move( 1, oWnd:nWidth - 138 ) }

oWnd:bPainted = { || oWnd:Say( 8, 30, "Caption", CLR_BLACK, CLR_WHITE, oBold, .T., .T. ) }
       ACTIVATE WINDOW oWnd

    return nil


 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: Modify the title font of a MdiChild window

Postby Antonio Linares » Fri Mar 15, 2024 8:55 am

Dear Ari,

Please review samples\skin3.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Modify the title font of a MdiChild window

Postby karinha » Fri Mar 15, 2024 3:04 pm

My dear friend Otto, try this trick that you posted, using MDI, please.

Mi querido amigo Otto, prueba este truco que publicaste usando MDI, por favor.

Code: Select all  Expand view

   DEFINE WINDOW oWnd STYLE ( WS_POPUP | 0x00040000L  ) ;
      COLOR CLR_BLACK, CLR_MSPURPLE MDI
 


Gracias, tks.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7824
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 80 guests