Article

From:
To:
All
Subject:
Error transferring internal Bitmap using BitBlt (TeCanvas.pas)
Newsgroup:
embarcadero.public.delphi.reporting-charting

Error transferring internal Bitmap using BitBlt (TeCanvas.pas)

Hello Delphi developers,

h4. _Problem description_
If an alClient TChart component is placed on a wsMaximized Form and a Windows XP system is unlocked after it has been locked then the following error occurs: +Error transferring internal Bitmap using BitBlt (C:\Builds\TpAddons\TeeChart\TeCanvas.pas, line 6316)+

h4. _Bug report_
I have filed a QC (http://qc.embarcadero.com/wc/qcmain.aspx?d=102963), but I'm looking for workaround suggestions. Unfortunately, I cannot adapt the TeCanvas.pas, since the TeeChart source codes are not provided.


h4. _Issue reproduction (Windows XP)_
Steps are reproduced very simple. See below:.

1) Create New VCL-Forms application 2) Add TChart 3) Align TChart: alClient 4) Set WindowState property of the form to: wsMaximized 5) Compile 6) Lock the Windows XP Workstation 7) Unlock the Windows XP Workstation 8) The following error pops up:
Error transferring internal Bitmap using BitBlt (C:\Builds\TpAddons\TeeChart\TeCanvas.pas, line 6316)


Example code:

*DPR* -----
{code} program Project1;
uses   Forms,   Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
begin   Application.Initialize;   Application.MainFormOnTaskbar := True;   Application.CreateForm(TForm1, Form1);   Application.Run; end. {code}
*FORM* ----- {code} object Form1: TForm1   Left = 0   Top = 0   Caption = 'Form1'   ClientHeight = 286   ClientWidth = 426   Color = clBtnFace   Font.Charset = DEFAULT_CHARSET   Font.Color = clWindowText   Font.Height = -11   Font.Name = 'Tahoma'   Font.Style = []   OldCreateOrder = False   WindowState = wsMaximized   PixelsPerInch = 96   TextHeight = 13   object Chart1: TChart     Left = 0     Top = 0     Width = 426     Height = 286     Title.Text.Strings = (       'TChart')     Align = alClient     TabOrder = 0     ExplicitLeft = 8     ExplicitTop = 8     ExplicitWidth = 400     ExplicitHeight = 250     ColorPaletteIndex = 13   end end {code}
*UNIT* ----- {code} unit Unit1;
interface
uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs, TeEngine, ExtCtrls, TeeProcs, Chart;
type   TForm1 = class(TForm)     Chart1: TChart;   private     { Private declarations }   public     { Public declarations }   end;
var   Form1: TForm1;
implementation
{$R *.dfm}
end. {code}

FYI: The error does not seem to appear on Windows 7 64-bit.
h4. _Workarounds_ My current workarounds: 1) Minimize the application when the workstation is locked;
2) Set the WindowState to wsNormal and re-size the Form to be maximized on FormCreate and during SC_MAXIMIZE messages. Set the Top and Left positions to 0.

What would be your workaround / solution?

Kind regards, Anton
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Thu, 28 Mar 2024 23:38:03 UTC
Copyright © 2009-2024
HREF Tools Corp.