Click here to Skip to main content
Rate this: bad
good
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:
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 28-May-10 21:20pm
lhyblue134
Edited 31-May-10 9:29am
v5

1 solution

Rate this: bad
good
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?
 
Regards,
Radhakrishnan G.
  Permalink  
v4

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 535
1 OriginalGriff 275
2 BillWoodruff 260
3 Shweta N Mishra 244
4 Deepu S Nair 230
0 OriginalGriff 6,168
1 Sergey Alexandrovich Kryukov 5,818
2 DamithSL 4,958
3 Manas Bhardwaj 4,539
4 Maciej Los 3,755


Advertise | Privacy | Mobile
Web01 | 2.8.1411019.1 | Last Updated 31 May 2010
Copyright © CodeProject, 1999-2014
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