• Announcements

Archived

This topic is now archived and is closed to further replies.

how thick is the title bar?

Recommended Posts

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

Share on other sites
AdjustWindowRectEx determines the window size from the size of the client area.

Share on other sites
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.

Share on other sites

  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

Share on other sites
I believe the proper way to solve that problem is to simply create a borderless window (like a splash screen).

Share on other sites
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

10 years, ouch

Share on other sites
Step 1: printscreen
Step 2: start mspaint
Step 3: paste
Step 4: look :D

Share on other sites
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

• Forum Statistics

• Total Topics
628278
• Total Posts
2981789

• 10
• 11
• 17
• 14
• 9