Window properties [WIN32]

Started by
7 comments, last by FireNet 19 years, 7 months ago
Hello, Is it possible to create a window without a control box in addition to not being able to be resized (im sure it is). heres what i use for my current window class wndclass.cbSize = sizeof(WNDCLASSEX); wndclass.style = CS_HREDRAW | CS_VREDRAW; wndclass.lpfnWndProc = ProcessMsgs; wndclass.hInstance = hInstance; wndclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); wndclass.lpszClassName = class_name;
Advertisement
Yes it is possible to do that.

wndclass.style = CS_DBLCLKS | CS_OWNDC |CS_HREDRAW | CS_VREDRAWCreateWindowEx(		WS_EX_CONTROLPARENT,		ClassName,		Wname,		WS_BORDER | WS_SYSMENU | WS_CAPTION| WS_VISIBLE,		0, 0, 		Width,Height,		NULL, NULL, gcl_hInstance,NULL);


This will give to a window with only a border and it cannot be resized.

If you dont want the standard controls like close and minimize just remove WS_SYSMENU.

And if you just want a black box without any title bar then remove WS_CAPTION

Helps?

Btw also check the Windows API helpfile for information on various options.They are very helpful.
______________________________________________________________________________________________________
[AirBash.com]
all you really need is to make a WS_TILED window, as in:

CreateWindow(winclass,winname,WS_TILED|WS_VISIBLE,0,0,640,480,NULL,NULL,NULL,NULL);


As your leader, I encourage you from time to time, and always in a respectful manner, to question my logic. If you're unconvinced that a particular plan of action I've decided is the wisest, tell me so, but allow me to convince you and I promise you right here and now, no subject will ever be taboo. Except, of course, the subject that was just under discussion. The price you pay for bringing up either my Chinese or American heritage as a negative is - I collect your f***ing head.
Much Much better !

However while in full screen i can still 'drag' the window around via the title bar...is there any way to disable that or get rid of the title bar?

Than you.
try

CreateWindow(winclass,winname,WS_POPUP,0,0,640,480,NULL,NULL,NULL,NULL);


for reference, see MSDN
Quote:Original post by anist
all you really need is to make a WS_TILED window, as in:

*** Source Snippet Removed ***


Dont we just love windows.There are a hundred ways to do a single thing.
______________________________________________________________________________________________________
[AirBash.com]
WS_POPUP did the trick !

Thanks alot guys :)

[Edit] Thanks for the MSDN link i really should rtfm !
Quote:Original post by FireNet
Dont we just love windows.There are a hundred ways to do a single thing.


yeah, sorry, i got my post out while you were editing yours. just trying to help like you and i like to see others helping as well *rates you up*
As your leader, I encourage you from time to time, and always in a respectful manner, to question my logic. If you're unconvinced that a particular plan of action I've decided is the wisest, tell me so, but allow me to convince you and I promise you right here and now, no subject will ever be taboo. Except, of course, the subject that was just under discussion. The price you pay for bringing up either my Chinese or American heritage as a negative is - I collect your f***ing head.
Thanks anist,[totally].

______________________________________________________________________________________________________
[AirBash.com]

This topic is closed to new replies.

Advertisement