Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Titleless and topless window, how?
#1
How do you create a window, that has no "blue bar" and cant be resized?
On the center of the screen.

And how would you use/do that with SDL?

It's used in some games/programs as the loading "screen", which is what I would like it for too...


Preferably an example, as I don't know much about windows coding, so just pointing me to API calls would prolly make me break someones computer Tongue
Reply
#2
When creating the window, just specify that it has no border style.

Normally you do this:
Code:
hWnd = CreateWindowEx( 0, _
                 szAppName, _
                         "The Hello Program", _
                          WS_OVERLAPPEDWINDOW, _
                          CW_USEDEFAULT, _
                          CW_USEDEFAULT, _
                          CW_USEDEFAULT, _
                          CW_USEDEFAULT, _
                          null, _
                          null, _
                          hInstance, _
                          null )

But, no border? No problem:
Code:
hWnd = CreateWindowEx( 0, _
                 szAppName, _
                         ByVal 0%, _
                          WS_CHILD, _
                          CW_USEDEFAULT, _
                          CW_USEDEFAULT, _
                          CW_USEDEFAULT, _
                          CW_USEDEFAULT, _
                          null, _
                          null, _
                          hInstance, _
                          null )

That is based on the Windows API documentation, I didn't test it.
Life is like a box of chocolates', hrm, WTF, no it isn't, more like, 'life is like a steaming pile of horse crap.'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)