Jump to content
Fivewin Brasil

Fonte e Cor na Window


maudruidas

Recommended Posts

Boa noite, estou precisando trocar o fonte e a cor do texto do título da minha Window. Como faço isto?

  DEFINE ICON oIco FILE "MAP.ICO"


  DEFINE WINDOW oWnd TITLE RAZ ICON OICO

  DEFINE BITMAP oBmpfp FILE("MAP3.BMP") ADJUST
  oWnd:bpainted = {| hdc | palbmpdraw( hdc, 0, 0, obmpfp:hbitmap,obmpfp:hPalette,oWnd:nWidth(),oWnd:nHeight())}
 

Fivewin 21.02 

Link to comment
Share on other sites

1 hora atrás, maudruidas disse:

Bom dia, sim também acho, porém achei que teria alguma forma de mudar a cor do texto do título da window.

Imagem:

https://etecspgov-my.sharepoint.com/:i:/g/personal/mauricio_pinto5_etec_sp_gov_br/EcQPOa1NvtxEhteUbq8UgYABIZzGS8ewRkxr3fV_HBEUOQ?e=6bE589

Ai, eu acho, que é no GERENCIAMENTO DE CORES do WINDOWS. Se você mudar para ROSA XICLÉTYYYY,  vai arrraaasssaaaarrrrrrrrr.... kkkkkkkkkkkkkkkkkkkk

Link to comment
Share on other sites

Teste ai e veja se serve: Não está perfeito, mas não desisto fácil. Vá testando... Vá na frente que eu vou atrás.... kkkkkkkkkkkkkkkkkkkkkkkkkkkkkk

// Polipoligon sample - \samples\3DOBJ.PRG
	#Include "FiveWin.ch"
	#define WM_NCPAINT           133    // 0x085
	#define COLOR_SCROLLBAR      RGB(135, 121, 78)
#define COLOR_CAPTIONTEXT    RGB(109, 135, 100)
	static oWnd
	//----------------------------------------------------------------//
	FUNCTION Main()
	   LOCAL oBar, cTitle, nRet
	   cTitle := "RODRIGUES & AMORIM MECANICA LTDA TESTE"
	   // DEFINE WINDOW oWnd TITLE "3D objects"
   DEFINE WINDOW oWnd TITLE cTitle
	   DEFINE BUTTONBAR oBar _3D OF oWnd
	   DEFINE BUTTON OF oBar ACTION BuildObj()
	   SET MESSAGE OF oWnd TO "3D Objects" NOINSET CLOCK DATE KEYBOARD
	   /*
   nRet := SETSYSCOLORSEX({COLOR_SCROLLBAR}, CLR_HMAGENTA)
   nRet := SETSYSCOLORSEX({COLOR_CAPTIONTEXT},CLR_HBLUE)
   */
	   ACTIVATE WINDOW oWnd MAXIMIZED ;
      ON INIT( nRet := SETSYSCOLORSEX({COLOR_SCROLLBAR}, CLR_HMAGENTA), ;
               nRet := SETSYSCOLORSEX({COLOR_CAPTIONTEXT},CLR_HBLUE) )
   /*
   // AGORA SIM... NAO ESTA PERFEITO, MAS FUNCIONA.
   // ACTIVATE WINDOW oWnd MAXIMIZED ON INIT( CLRTEST( CLR_WHITE, CLR_BLACK ) )
   */
	RETURN NIL
	function BuildObj()
	   local obj := T3DObj():New()
	   MsgInfo( obj:ClassName() )
	   obj:AddVertex( 100, 80, 50 )
   obj:AddVertex( 200, 85, 75 )
   obj:AddVertex( 300, 60, 40 )
	   obj:Paint()
	   TDict():New()
	return nil
	CLASS T3DOBJ
	   DATA   aVertex
   DATA   aFaces
	   METHOD New() CONSTRUCTOR
	   METHOD AddVertex()
   METHOD Paint()
	ENDCLASS
	METHOD New() CLASS T3DObj
	   ::aVertex = {}
   ::aFaces  = {}
	return Self
	METHOD AddVertex( x, y, z ) CLASS T3DObj
	   AAdd( ::aVertex, { x, y, z } )
	return nil
	METHOD Paint() CLASS T3DObj
	   PolyPolygon( oWnd:GetDC(), ::aVertex )
   oWnd:ReleaseDC()
	return nil
	// CORES NO TITULO DA WINDOW -FUNCIONOU--
	#pragma BEGINDUMP
	#include <hbapi.h>
#include <windows.h>
	HB_FUNC( CLRTEST )
{
   int aElements[2] = { COLOR_CAPTIONTEXT, COLOR_ACTIVECAPTION };
   DWORD aColors[2];
	   aColors[ 0 ] = hb_parnl( 1 );
   aColors[ 1 ] = hb_parnl( 2 );
   SetSysColors( 2, aElements, aColors );
	}
	//----------------------------------------------------------------------------//
	#pragma ENDDUMP
	//-------FUNCIONOU--------------------------------------------//
	#pragma BEGINDUMP
	#include <hbapi.h>
#include <windows.h>
	HB_FUNC( SETSYSCOLORSEX )
{
   int aElements[1];
   DWORD aColors[1];
	   aElements[ 0 ] = hb_parnl( 1 );
   aColors[ 0 ]   = hb_parnl( 2 );
   hb_retl (SetSysColors( 1, aElements, aColors ));
}
	#pragma ENDDUMP
// FIN / END


 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...