?
Solved

TToolbar with a background image

Posted on 1998-09-25
1
Medium Priority
?
366 Views
Last Modified: 2010-04-06
I would like to have the TToolBar component have a background image like in IE3. I know that this is done by placing a Coolbar on your form and then placing a Toolbar on top of it, setting the Flat property to true.

However, I do not want to use the TCoolbar componet, I would just like to have a TToolbar which has the background image itself. I have tried writing a component based upon the TToolbar but have had no joy in getting the Bitmap to draw on it.

Could someone help me out here? Isn't it just a case of having a Bitmap property on the TToolbar component and then showing that bitmap if the designer loads one?
0
Comment
Question by:jsweby
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 20

Accepted Solution

by:
Madshi earned 400 total points
ID: 1340857
Yes, basically it's that easy.

  TJswebysGreatToolbar = class(TToolBar)
  private
    procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND;
  end;

procedure TJswebysGreatToolbar.WMEraseBkgnd(var Message: TWMEraseBkgnd);
var canvas : TCanvas;
begin
  canvas:=TCanvas.Create;
  try
    canvas.handle:=Message.dc;
    try
      // here do the painting on "canvas"...
    finally canvas.handle:=0 end;
  finally canvas.Free end;
end;

Regards, Madshi.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month9 days, 6 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question