Click here to Skip to main content
15,867,756 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
In my Win32 application, I want to create a child window within the main window. I assigned these styles to the child window when calling CreateWindowEx:
WS_CHILDWINDOW | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | WS_SIZEBOX | WS_CAPTION

The child window I get has a caption and a resizable border. However there's no close button in the caption, and the caption/border of the child window is not transparent. I'm using the aero theme in Windows 7.

Here is the screen shot:



How to add close button to the caption? How can I make the caption/border transparent?

What's more, you may not notice but initially the upper left and upper right corner of the child window has a black background. If I drag the window or resize it, the black background will disappear. Why is that and how to fix this minor problem?
Posted
Updated 31-May-10 8:29am
v5

1 solution

Please try with WS_SYSMENU style.

Which brush is set to your window class? Can you paste sample code for creating the child window?

Regards,
Radhakrishnan G.
 
Share this answer
 
v4

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