Page 2 of 2
Posted: Thu Oct 09, 2008 4:14 pm
by James Bott
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
Minimize-Button
Posted: Sat Oct 11, 2008 8:46 pm
by ukoenig
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 ?
Code: Select all | Expand
// 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

Posted: Sun Oct 12, 2008 6:38 am
by xProgrammer
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 )
Re: Window/Dialog Title bar color
Posted: Sun Oct 12, 2008 4:32 pm
by mmercado
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
#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