[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.drawing

UpdateLayeredWindow with dialog controls

xargon

11/22/2004 6:29:00 PM

I would really like to build an app that does skinning.

I have a dialog app in c++ that I want to use UpdateLayeredWindow
because I want to do per pixel alpha blending of the window, i.e.
skinning. I have it working nicely, but if I use it on the dialog, I
must then draw all controls myself using gdi+. Is there any way to use
either standard controls on top of the skinned dialog, or ownerdraw?

Also, I think I found a bug in the DrawString code. If you use
drawstring with updatelayeredwindow, it draws transparent if the font
is not bold. The following code demonstrates. Just change
FontStyleRegular to FontStyleBold and it draws in black.

Font myFont(L"Arial", 12, FontStyleRegular );
PointF origin(100, 100);
SolidBrush blackBrush(Color(255, 0, 0, 0));
CString strText = "Test Text";

// Draw string.
status = graphics.DrawString(
strText.AllocSysString(),
-1,
&myFont,
origin,
&blackBrush);

Xargon