Window/Dialog Title bar color

Postby James Bott » Thu Oct 09, 2008 4: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Minimize-Button

Postby ukoenig » Sat Oct 11, 2008 8: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 ?

Image

Code: Select all  Expand view

// 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 :lol:
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

Postby xProgrammer » Sun Oct 12, 2008 6: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 )
User avatar
xProgrammer
 
Posts: 464
Joined: Tue May 16, 2006 7:47 am
Location: Australia

Re: Window/Dialog Title bar color

Postby mmercado » Sun Oct 12, 2008 4: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:
Code: Select all  Expand view
#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
User avatar
mmercado
 
Posts: 782
Joined: Wed Dec 19, 2007 7:50 am
Location: Salamanca, Gto., México

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 64 guests