View Single Post
Old 03 January 2018, 15:48   #4
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,346
Looking at the second pic in the post above, Windows uses the same font & scaling for the settings window title bar as when the desktop is at monitor-native high res, even though the full-screen mode is much lower resolution. That wastes precious screen space. Is it possible to specify a smaller font for the window title bar?

I don't think there's a way to tell Windows to use a specific font/size for an individual window. You could use SystemParametersInfo() with SPI_GETNONCLIENTMETRICS / SPI_SETNONCLIENTMETRICS, specifying a smaller value for the lfCaptionFont field of the NONCLIENTMETRICS structure. But that seems to be a system-wide change. That could still be feasible — change when you switch to full-screen mode, revert to original value on exiting full-screen — but doesn't seem a very nice thing to do since it could affect other apps.

A possible alternative would be to open the settings window with the WS_EX_TOOLWINDOW extended window style. From that page:

WS_EX_TOOLWINDOW
"The window is intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog that appears when the user presses ALT+TAB. If a tool window has a system menu, its icon is not displayed on the title bar. However, you can display the system menu by right-clicking or by typing ALT+SPACE."

Not appearing in the taskbar or Alt-Tab switcher may not be a problem if you're in full-screen mode. I wonder what happens if you specify (WS_EX_TOOLWINDOW | WS_EX_APPWINDOW)?

The page also mentions WS_EX_PALETTEWINDOW = (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST)
"The window is palette window, which is a modeless dialog box that presents an array of commands."
mark_k is offline  
 
Page generated in 0.04191 seconds with 11 queries