Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Override non-standard font/text size in Windows 7

$
0
0
We started an office-wide conversion from Windows XP Pro SP3 to Windows 7 x64 SP1 a couple months ago.
About 1/3 of our 40 PC's have been updated and I've run into problems when people adjust their default text size.
If you right-click a blank area of the desktop, select "Personalize" then click on "Display", you're given options for text size.
The default shows as "Small - 100%", some of our users have switched it to "Medium - 125%".
This enlarges the fonts in my Autoit apps, but not the controls themselves (labels, buttons, etc).
The result is that a lot of the data shown on the GUI is truncated.

I found a thread where Guinness posted this function:
Func _GUICtrlSetTheme($iControl = -1)
	 If Not IsHWnd($iControl) Then $iControl = GUICtrlGetHandle($iControl)
	 Local $aReturn = DllCall("UxTheme.dll", "int", "SetWindowTheme", "hwnd", $iControl, "wstr", 0, "wstr", 0)
	 If @error Then Return SetError(1, 1, 0)
	 Return $aReturn[0]
EndFunc ;==>_GUICtrlSetTheme

Either I'm calling it incorrectly, it doesn't work, or the setting I'm trying to override is not considered part of the theme?
I just inserted the call (which returns @error = 0) like this:
$Main_GUI = GuiCreate($AppName & "				 (" & @ComputerName & ")", 560, 440 + $ShowScan * 107, $PositionLeft, $PositionTop)
_GUICtrlSetTheme($Main_GUI)

Any ideas?
Thank you.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>