Modify the title font of a MdiChild window

Post Reply
User avatar
Ari
Posts: 236
Joined: Fri Feb 03, 2006 4:21 pm
Location: São Paulo, SP - Brazil
Contact:

Modify the title font of a MdiChild window

Post by Ari »

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
karinha
Posts: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: Modify the title font of a MdiChild window

Post by karinha »

NO.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
Otto
Posts: 6378
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Modify the title font of a MdiChild window

Post by Otto »

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


#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
Antonio Linares
Site Admin
Posts: 42259
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Modify the title font of a MdiChild window

Post by Antonio Linares »

Dear Ari,

Please review samples\skin3.prg
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
karinha
Posts: 7885
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: Modify the title font of a MdiChild window

Post by karinha »

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

   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
Post Reply