Click here to Skip to main content
11,417,390 members (52,944 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C++ Win32 UI graphics
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:

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:

<img src="" />

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 28-May-10 21:20pm
Edited 31-May-10 9:29am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Please try with WS_SYSMENU style.

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

Radhakrishnan G.

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

  Print Answers RSS
0 Sascha Lefévre 340
1 Abhinav S 248
2 Sergey Alexandrovich Kryukov 245
3 OriginalGriff 235
4 Richard Deeming 160
0 Sergey Alexandrovich Kryukov 9,345
1 OriginalGriff 7,712
2 Maciej Los 3,758
3 Abhinav S 3,601
4 Sascha Lefévre 3,198

Advertise | Privacy | Mobile
Web04 | 2.8.150427.4 | Last Updated 31 May 2010
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100