There's a lot to be said for both views. But in the end it is MS that dictates what we have to do, even if they caused the problem . And the dpi scaling in Vista/W7 caused a lot of problems. MS says that you have to code dpi-aware, and calls it 'best practice', the usual term they use when they messed up ( the other one is: 'this behaviour is by design ... ). So be it ... you may agree or disagree ( I disagree ) but in the end I have to code for the user.
As for XP-style: I leave it on. IMO it is up to the user to decide what kind of interface he/she prefers. As for scaling things: I use GetDeviceCaps_(GetDC_(0), #LOGPIXELSX) to calculate a scale, and a macro to scale my gadgets/fonts/windows etc. I do need to thank Rescator here for pointing the right direction in his thread.
Windows 7 sizing
Re: Windows 7 sizing
Fooling around with this, I'm running in a specific problem: how to retrieve the actual font and font size? I've found some code, but it wasn't always accurate. Any suggestions?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Re: Windows 7 sizing
The actual font and font size of what and in what units?blueznl wrote:Fooling around with this, I'm running in a specific problem: how to retrieve the actual font and font size? I've found some code, but it wasn't always accurate. Any suggestions?
Maybe this helps?
Code: Select all
CreateImage(0, 10, 10, 32)
FontID = GetGadgetFont(#PB_Default)
hDC = StartDrawing(ImageOutput(0))
SelectObject_(hDC, FontID)
GetTextMetrics_(hDC, @Metrics.TEXTMETRIC)
StopDrawing()
CallDebugger
Re: Windows 7 sizing
Ah, yes, that might do, gonna' try that tonight!
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )