Click here to Skip to main content
15,886,074 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hello!

i have a problem.
My window that don't have the style "WS_CAPTION",i want it have the shadow of aero,
how can i To achieve that effect.

i want to provide a picture,but this don't Support.

the effect i want look like the shadow of system window,my Operating system is window 7.

if the window have the style "WS_CAPTION" i can see the shadow, if i remove the style the shadow will disappear.

my window have no "WS_CAPTION","WS_SIZEBOX" and "WS_BORDER".


my english is so-so,i don't know whe whether you understand me.

If you have questions please leave a message.

thanks.

dawei.lin
Posted

1 solution

First you need to open the right theme from the current skin:
hThm = OpenThemeData(hWnd, L"WINDOW");


After that you may draw the needed thing with DrawThemeBackground,
DrawThemeBackground( hThm, hDC, WP_CAPTION, CS_ACTIVE, &rc, 0 );
 
Share this answer
 
Comments
lin98666521 10-Jul-12 1:21am    
Thanks,i try it , it work,i have a problem,although the effect of aero is right,but the shadow Still not. i want the shadow around the window.
armagedescu 10-Jul-12 1:45am    
Try using DWM
http://msdn.microsoft.com/en-us/library/ff468822(v=vs.85)
lin98666521 10-Jul-12 3:49am    
oh,i try to use it,if i encountered a problem,i will ask you.
thanks very much.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900