News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

WS_CAPTION/ Titlebar

Started by msmith, January 31, 2006, 04:14:13 AM

Previous topic - Next topic

msmith

 In a November 2005 thread called WS_MAXIMIZE AND WS_MINIMIZE there was a large interchance among various members concerning window styles. The conclusion I came away with was that on the variuos flavors of Windows, the styles may work or not work.

My problem is related in that if I only specify WS_VISIBLE, I would not expect to see a title bar and caption, but I do.

I should have to specify WS_CAPTION.  From MSDN: "WS_CAPTION   Creates a window that has a title bar"

The only way I can get a window with no title bar is WS_POPUP. This window has none of its children displayed.

How do you make a window that is normal in every respect except with no title bar?

In testing, I found that WS_SYSMENU also controls whether or not there is a close button.

I am testing on XP SP2.

Tedd

The reason is: WS_OVERLAPPED equ 0
So, if you don't specify a style explicitly, the value will be zero, and this is the same as specifying WS_OVERLAPPED.

"WS_POPUP or WS_VISIBLE" will create a flat, plain, empty window.

I doubt this would exclude child windows, so it may be a style on the child windows themselves? Although it depends on what you want by 'child windows' because the actual meaning is quite limited, and has a number of consequences ('owned' windows, aren't necessarily 'child' windows.)
No snowflake in an avalanche feels responsible.

msmith

Quote
I doubt this would exclude child windows, so it may be a style on the child windows themselves? Although it depends on what you want by 'child windows' because the actual meaning is quite limited, and has a number of consequences ('owned' windows, aren't necessarily 'child' windows.)

What I am referring to is controls created using CreateWindowEx with a window handle specified in the hWndParent argument.

When that window shows, it does not display any of the controls created as in the previous sentence if the style is "WS_POPUP or WS_VISIBLE". If i change the style to "WS_VISIBLE" it shows all of the controls.

I know that there are different definitions of "child" in windows, but that does not solve my problem.

What I want is a window that displays the child windows, but without a titlebar.

Mike

MichaelW

The attachment is a not so quick but very dirty Window Styles demo. Basically, it allows you to easily specify a combination of window styles and then create a window of that style. It allows you to create multiple windows per session, and staggers the windows on the screen so the top window will leave the title bar and left border of the window below it exposed. Each created window has a single child control. All of the created windows are in the same thread, sharing a single message loop and window procedure. The dialog closes the created windows when it is closed. I left out WS_CHILD, WS_CHILDWINDOW, WS_CLIPCHILDREN, WS_CLIPSIBLINGS, and WS_TABSTOP because I could see no reason to include them.



[attachment deleted by admin]
eschew obfuscation

msmith

Michael,

Thank you very much for the program.

I will study it and see how yours has a "captionless" window with a button in it. This is what I was looking for.

Mike

CoR

@MichaelW:
That's exactly what I was looking for! 10x

Now I have to learn how to make those windows snap to each other if close enough. And to make it able to move 4 snapped windows by moving only first or second one.