Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2006 Oct : Drawing Windows Buttons on the Titlebar - Last Try!!!
| Subject: | Drawing Windows Buttons on the Titlebar - Last Try!!! |
| Posted by: | "Marcelo Grossi" (magros..@nelogica.com.br) |
| Date: | Fri, 20 Oct 2006 17:28:12 |
Hi,
I've been naggin' you guys for the last few posts about this same question.
I'm using the Widget component (as sugested) to draw the button on the title
bar for me. This works fine! I have my own little rectangle to draw whatever
I want on the titlebar (I'm modifying the component to make it draw other
stuff ...).
What I want is the following:
- Call some Windows API to draw the background AND border of the titlebar
button, just like Windows does. And then I get to draw on top of that
background some stuff I want (like some char and a down arrow). I also want
to make that buttons background color to change at will, like for instance
the Close button windows draws has a red background (at least on my Win XP).
Is there such API or combination of Win APIs to draw those kinds of
components?
- Background Image of TitleBar button with the specified color
- That white contoured border that those kinds of buttons have
I've been trying unsuccessfully to use DrawThemeBackground and DrawThemeEdge
as sugested by ours friends from TeamB. Has anyone ever tried this? I think
it is possible because windows itself uses the buttons I want with diferent
colors and everything, I just wanted to be able to find that (those) API(s)
...
Please help! I'm going nuts over this ... trying google and MSDN every 2
secs :'(
Thanks,
Marcelo Grossi