views:

74

answers:

2

I notice Vista/7 uses this type of control as well as Windows Live Messenger. This is the control: alt text alt text alt text

How can this control be programably added to a WinAPI application?

Thanks

+2  A: 

This is almost what you want (but surprisingly far from it):

t := OpenThemeData(Handle, 'STARTPANEL');
DrawThemeBackground(t, Canvas.Handle, SPP_USERPICTURE, 0, rect(10, 10, 100, 100), nil);

(Delphi code, but only WinAPI functions.)

Maybe some other part suits you better: http://msdn.microsoft.com/en-us/library/bb773210(VS.85).aspx

Andreas Rejbrand
+2  A: 

This resource is Bitmap 7016 in explorer.exe's resources. It is a 32 bit bitmap, so it has an extra alpha channel. This is how it is done.

Milo
Very good job! But a few relevant questions: Is this an undocumented feature? Would it be copyright violation to add the bitmap to one's own application?
Andreas Rejbrand
@Andreas Rejbrand I'm not sure but I've uploaded the native one if you want to see it.
Milo