开发者

win32 sdk: how to make the caption/border of a child window transparent

开发者_StackOverflow

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 snap:

alt text http://img2.pict.com/f7/c6/2c/3570867/0/e68d95e88eb7.png

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


To get the close button in the caption you will need to add the WS_SYSMENU style. As a child window your window will not have the transparency effect, you will need to use WS_POPUP for that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜