Window properties [WIN32]
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;
Yes it is possible to do that.
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.
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.
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);
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.
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.
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.
WS_POPUP did the trick !
Thanks alot guys :)
[Edit] Thanks for the MSDN link i really should rtfm !
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*
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement