FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Window/Dialog Title bar color
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Window/Dialog Title bar color
Posted: Thu Oct 09, 2008 04:14 PM

Uwe,

>you mean, changing the get-color after changing the value ?

Yes.

>Another sample with dialog-titles on a GET :
>In Jeff's sample, he could show the Patient-name in the Dialog-title.

Granted he could do this, but then the user still has to scan the entire screen to find where the change was made. If the GET (or other control) is highlighted then it is immediately obvious. Maybe both would work well, but if I had to pick only one, then it would to highlight the control.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Minimize-Button
Posted: Sat Oct 11, 2008 08:46 PM
Hello,

I added a minimize-button to the dialog-title, to test how it looks.
It works like a < normal > dialog.
Is it maybe possible, to change the look of the minimize-button ?



// Minimize-Button
// ---------------------
REDEFINE BITMAP oBmp2  ID 102 ADJUST RESOURCE "Minimize" ; CURSOR oCursor OF oDlg 
oBMP2:bLClicked := { || oDlg:Minimize() } 

// Exit-Button
// ----------------
REDEFINE BITMAP oBmp3  ID 105 ADJUST RESOURCE "Cancelar" ; CURSOR oCursor OF oDlg 
oBMP3:bLClicked := { || oDlg:End() }


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: 464
Joined: Tue May 16, 2006 07:47 AM
Window/Dialog Title bar color
Posted: Sun Oct 12, 2008 06:38 AM

Hi all

I haven't commented to date as I have gotten to be rather out of touch with Windows. But certainly in Linux if a window has had a change and may need attention the background color of its minimised icon changes - in my case it goes from white to a fairly dark orange gradually and after a bit settles back to a mid orange. Quite effective without being obtrusive. If you can do something along those lines I think it would be pretty effective.

Regards to all
Doug
( xProgrammer )

Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Re: Window/Dialog Title bar color
Posted: Sun Oct 12, 2008 04:32 PM
Jeff Barnes wrote:How can I change just the window title bar to a different color?
Hi Jeff:

Here a little working sample about changing system colors:
#include "FiveWin.ch"
#define COLOR_ACTIVECAPTION 2
#define COLOR_GRADIENTACTIVECAPTION 27

function Main()

   local oDlg, ;
         nColor1 := GetSysColor( COLOR_ACTIVECAPTION ), ;
         nColor2 := GetSysColor( COLOR_GRADIENTACTIVECAPTION )

   DEFINE DIALOG oDlg From 00,00 to 400,500 TITLE "System Colors" PIXEL OF oDlg COLORS CLR_WHITE,CLR_WHITE

   ACTIVATE DIALOG oDlg CENTERED ;
   ON INIT ChangeSysColors( 2, { COLOR_ACTIVECAPTION, COLOR_GRADIENTACTIVECAPTION }, { CLR_HRED, CLR_HGREEN } )

   ChangeSysColors( 2, { COLOR_ACTIVECAPTION, COLOR_GRADIENTACTIVECAPTION }, { nColor1, nColor2 } )

Return nil

#pragma BEGINDUMP
#include <Windows.h>
#include <hbApi.h>
#include <clipApi.h>
#include <StdLib.h>

HB_FUNC( CHANGESYSCOLORS )
{
   int iEle, iItems = _parni( 1 ) ;
   int aiElemen[ 28 ] ;
   COLORREF alColors[ 28 ] ;

   for( iEle = 0 ; iEle <= ( iItems - 1 ) ; iEle++ )
   {
      aiElemen[ iEle ] = _parni( 2, ( iEle + 1 ) ) ;
      alColors[ iEle ] = _parnl( 3, ( iEle + 1 ) ) ;
   }

   SetSysColors( iItems, aiElemen, alColors ) ;
}
#pragma ENDDUMP
Notice: It doesn't work for window title bar with themed windows

Regards.

Manuel Mercado
manuelmercado at prodigy dot net dot mx

Continue the discussion