Skip to main content
GameDev.net gamedev.net
🔒 Locked

overwriting windows drawing functions

Started by exorcist_bob Jan 19, 2007 at 5:47 PM 2 replies 950+ views
Original Post
exorcist_bob
exorcist_bob
Hello community, Could you point me to some resources that will allow me to draw my own window. What I mean is that I could draw my own window border, title bar, client content, etc. I would like info regarding how to do this in win32, linux, and macos. Thanks for any assistance![smile], exorcist_bob
Skizz
Skizz
To do what you want in Win32 I would suggest creating a non-client window using "WS_POPUP | WS_VISIBLE" for the style and "0" for the extended style and then create a child window of this to use as your main client window but with "WS_CHILD | WS_VISIBLE" as the style. The non-client parent window then draws the window decorations (borders, close button, resize grips, titles, etc) and the client window is as you would normally have your client window.

Don't know about the other systems (it's been a very long time since I did anything with them).

Skizz
exorcist_bob
exorcist_bob
Thanks for the advise, however, I would like to know how I can draw my own window decorations. Is it as simple as creating a window without WS_VISIBLE and getting a device context?
Skizz
Skizz
"WS_POPUP | WS_VISIBLE" gives you a borderless window without any decorations. Use the WM_PAINT message to draw your own decorations. Removing the WS_VISIBLE style will just make the window initially hidden and will require a ShowWindow call to display it.

Skizz

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.