简体   繁体   中英

How can I make a window with a close button and no icon/menu to the top left of the window?

How do I create a window that has menu buttons to the right such as the close button but without the icon to the left that opens a menu when you click on it.

EDIT: I've added a graphic example for clarity. 例子

Here is the api reference for CreateWindowEx.

http://msdn.microsoft.com/en-us/library/ms632680(v=VS.85).aspx

If you have a window handle you can call SetWindowLong with a WS_EX_TOOLWINDOW flag which is like a single border style but smaller.

创建窗口时只写:WS_SYSMENU & ~WS_CAPTION

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM