im using pure API on Vista, also im experimenting with the DWM(desktop window manager) for the glass effects including extending it into the client area like windows media player (lol just for fun mind) and im having a problem with drawing buttons ontop of the glass, it appers the when the glass extends it extends OVER the client area, how would i create buttons and text and things so it appears ontop,

Ive already been on so many but most of them are for C# and bits of code i cant translate so can anyone tell me a C++ version lol :) it would really be helpful :)

Thnx for your time

Sarriss2

If you find a C# example which calls APIs foo() bar() and baz() in that order, how much C# do you really need to know in order to call foo() bar() and baz() from a C++ program?

Figuring out enough C# (not much) just to get the general idea of what is required is all you need.

Plus if you ever need to use C# for real, you'll have head start.
Who knows, you might even like it.

well i know that its the functions etc, just some of the stuff i cant translate well, for example they may have CFont instead of HFont, but CFont has extra functionality than HFONT etc, it is various bits like that-that i cant do well, and additionally with the DWM C# reacts differently to C++ and the problem i have in C++ doesnt occur

lol well the initial problem is that when the glass is extended into the client area in C++ it appears over the top of the client area, where as in C# you can place things over the top regardless of where the glass is ;). thats the first initial problem,

secondly i just found an article written for WTL and glass in C++ which has been useful in someways, but its using funtions in WTL no straight forward API so it is including things like CRect and CFont etc which as i dont have WTL cannot include or use, and tbh wouldnt use anyway

http://www.codeproject.com/KB/vista/VGGlassIntro.aspx

but it did shed some like as to what was going on and now im stuck in how to make use of the BitBlt with text and buttons or something

Adding glass to the window is the easy part, adding your own UI on top of the glass is a bit trickier. Since the alpha values of the pixels have to be maintained properly, we have to use drawing APIs that understand alpha and set the alpha values properly. The bad news is that GDI almost entirely ignores alpha - the only API that maintains it is BitBlt() with the SRCCOPY raster operation. Therefore, apps have to use GDI+ or the theme APIs for drawing, since those APIs were written with alpha in mind.

so any help would be had as to solve this problem still, im not new to C++ but i aint that familiar with it lol

This article has been dead for over six months. Start a new discussion instead.