how thick is the title bar?

Started by
7 comments, last by silvermace 21 years, 8 months ago
any idea on how many pixels thick the title bar is (on windows) im creating a windowed GL game, i want the reasertizer to have a screen res of 640x480, so im assuming the title bar is 20px so i create a window 640x500 ?? any advice ..thanx /silvermace
"I am a donut! Ask not how many tris/batch, but rather how many batches/frame!" -- Matthias Wloka & Richard Huddy, (GDC, DirectX 9 Performance)

http://www.silvermace.com/ -- My personal website
Advertisement
AdjustWindowRectEx determines the window size from the size of the client area.
Isn''t there a way using GetSystemMetrics() to retrieve those values? I''ve found that Windows 98 has a different size title bar than Windows XP, but I didn''t bother to fix that part of my program yet.
It's not what you're taught, it's what you learn.

  GetSystemMetrics( SM_CYCAPTION );  


And, from memory, you may need to add the border height to this value to get the true size from the topmost area of the window:


  GetSystemMetrics( SM_CYBORDER );  


Tom
refrain_from_stupidity( &me );
I believe the proper way to solve that problem is to simply create a borderless window (like a splash screen).
quote:Original post by Beer Hunter
AdjustWindowRectEx determines the window size from the size of the client area.


Live and learn, here I am, 10+ year vet of windows programming and I''ve been using GetSystemMetrics all this time. And every time there has been an interface change (2->3, 3->95, 9x->xp) I had to ''fiddle'' the results.

Thank you


D.V.

Carpe Diem
D.V.Carpe Diem
10 years, ouch
daerid@gmail.com
Step 1: printscreen
Step 2: start mspaint
Step 3: paste
Step 4: look :D
quote:Original post by Ronin_54
Step 1: printscreen
Step 2: start mspaint
Step 3: paste
Step 4: look :D


Step 5: change fonts in screen properties
Step 6: look
Step 7: realise this is not good approach as the title bar has changed size.



D.V.

Carpe Diem
D.V.Carpe Diem

This topic is closed to new replies.

Advertisement