Is there a way to change the Active Title Bar color of a Macro Scheduler Dialog?
In v12, the Dialog property called "Color" pertains to the whole Dialog and there is not a separate property for the Active Title Bar color.
Yes I know I can change that color in the Windows OS itself... but I do not want to change it for all apps and windows... just for my one compiled macro.
I found this: http://stackoverflow.com/questions/2018 ... -title-bar
Which led me to this: http://delphi.about.com/od/adptips2006/ ... ionbar.htm
...and the following Delphi code:
Code: Select all
type
TCustomCaptionForm = class(TForm)
private
procedure WMNCPaint(var Msg: TWMNCPaint) ; message WM_NCPAINT;
procedure WMNCACTIVATE(var Msg: TWMNCActivate) ; message WM_NCACTIVATE;
procedure DrawCaptionText() ;
end;
...
implementation
procedure TCustomCaptionForm .DrawCaptionText;
const
captionText = 'delphi.about.com';
var
canvas: TCanvas;
begin
canvas := TCanvas.Create;
try
canvas.Handle := GetWindowDC(Self.Handle) ;
with canvas do
begin
Brush.Style := bsClear;
Font.Color := clMaroon;
TextOut(Self.Width - 110, 6, captionText) ;
end;
finally
ReleaseDC(Self.Handle, canvas.Handle) ;
canvas.Free;
end;
end;
procedure TCustomCaptionForm.WMNCACTIVATE(var Msg: TWMNCActivate) ;
begin
inherited;
DrawCaptionText;
end;
procedure TCustomCaptionForm.WMNCPaint(var Msg: TWMNCPaint) ;
begin
inherited;
DrawCaptionText;
end;
AddDialogHandler>Dialog1,,OnActivate,SUBROUTINE_NAME
AddDialogHandler>Dialog1,,OnPaint,SUBROUTINE_NAME
...but I am at a loss as to how I would translate the above Delphi code into something that would work in Macro Scheduler... perhaps some mix of MS and Win API calls? In any case, Marcus can you provide any insight here?
Or does anyone out there have a way to set the Active Title Bar color of an MS Dialog... to a color of one's choosing?
Thanks and take care