ioa747 Posted July 27 Posted July 27 (edited) Spoiler Important note about Windows DLLs Files like fontext.dll in newer versions of Windows (Windows 10/11) are MUI (Multilingual User Interface) binaries. This means that the actual language strings are often not contained within the .dll itself, but in language subfolders (e.g. C:\Windows\System32\el-GR\fontext.dll.mui). When you call LoadLibraryExW with the flag $LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE (0x00000040) or when you let Windows load the corresponding .mui, the system automatically routes the call to the language of the active user. I have English MUI (Multilingual User Interface) windows. #AutoIt3Wrapper_UseX64=y #include <WinAPIRes.au3> Local $aStrings[4] = [1101, 1103, 1136, 1137] ; Directly load the MUI file for Greek Local $sMuiDll = @SystemDir & "\el-GR\comdlg32.dll.mui" ConsoleWrite("-> $sMuiDll=" & $sMuiDll & @CRLF) Local $hInstance = _WinAPI_LoadLibraryEx($sMuiDll, $LOAD_LIBRARY_AS_DATAFILE) If $hInstance Then For $i = 0 To UBound($aStrings) - 1 ConsoleWrite("String " & $aStrings[$i] & ": " & _WinAPI_LoadString($hInstance, $aStrings[$i]) & @CRLF) Next _WinAPI_FreeLibrary($hInstance) Else ConsoleWrite("Error: Could not load MUI file." & @CRLF) EndIf output: >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "D:\i\Pro\.AutoIT\_Test\000_forum-topic\213613-guidarktheme-udf\neo-test.au3" /UserParams +>11:53:37 Starting AutoIt3Wrapper (pid=18340) 23.402.1150.10 from:SciTE.exe (4.4.6.0) Keyboard:00000409 OS:WIN_11/2009 CPU:X64 OS:X64 Environment(Language:0409) CodePage:65001 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Users\ioaio\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper SCITE_USERHOME => C:\Users\ioaio\AppData\Local\AutoIt v3\SciTE >Running AU3Check (3.3.18.0) from:C:\Program Files (x86)\AutoIt3 input:D:\i\Pro\.AutoIT\_Test\000_forum-topic\213613-guidarktheme-udf\neo-test.au3 +>11:53:38 AU3Check ended. rc:0 >Running:(3.3.18.0):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "D:\i\Pro\.AutoIT\_Test\000_forum-topic\213613-guidarktheme-udf\neo-test.au3" +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart. --> Press Ctrl+BREAK to Stop. -> $sMuiDll=C:\WINDOWS\system32\el-GR\comdlg32.dll.mui String 1101: Γραμματοσειρά TrueType. Η ίδια γραμματοσειρά θα χρησιμοποιηθεί και στον εκτυπωτή και στην οθόνη σας. String 1103: Γραμματοσειρά οθόνης. Στον εκτυπωτή σας θα χρησιμοποιηθεί η πλησιέστερη γραμματοσειρά που ταιριάζει. String 1136: Γραμματοσειρά OpenType. Η ίδια γραμματοσειρά θα χρησιμοποιηθεί στον εκτυπωτή και στην οθόνη σας. String 1137: Γραμματοσειρά OpenType. Η ίδια γραμματοσειρά θα χρησιμοποιηθεί στον εκτυπωτή και στην οθόνη σας. edit: 😁 #AutoIt3Wrapper_UseX64=y #include <WinAPIRes.au3> #include <File.au3> Local $aStrings[4] = [1101, 1103, 1136, 1137] Local $aArray = _FileListToArrayRec(@SystemDir, "comdlg32.dll.mui", $FLTAR_FILES, $FLTAR_RECUR, $FLTAR_SORT) For $j = 1 To $aArray[0] ; Directly load the MUI file Local $sMuiDll = @SystemDir & "\" & $aArray[$j] Local $sLabel = StringLeft($aArray[$j], StringInStr($aArray[$j], "\") -1) ConsoleWrite("--- " & $sLabel & " ---" & @CRLF) Local $hInstance = _WinAPI_LoadLibraryEx($sMuiDll, $LOAD_LIBRARY_AS_DATAFILE) If $hInstance Then For $i = 0 To UBound($aStrings) - 1 ConsoleWrite("String " & $aStrings[$i] & ": " & _WinAPI_LoadString($hInstance, $aStrings[$i]) & @CRLF) Next _WinAPI_FreeLibrary($hInstance) Else ConsoleWrite("Error: Could not load MUI file." & @CRLF) EndIf Next Edited July 27 by ioa747 argumentum and WildByDesign 1 1 I know that I know nothing
WildByDesign Posted July 27 Author Posted July 27 GUIDarkTheme 2026.07.27 Load Font Type strings directly from OS with _WinAPI_LoadString This also obtains strings for non-English OS DPI improvements for vertical alignment of combo items in Font dialog Fixed issue where Font dialog was crashing on non-English OS Changed methods used to determine if dialog is Font, Color, etc. Latest download available in the first post of the topic. ioa747 and argumentum 2
WildByDesign Posted July 27 Author Posted July 27 4 hours ago, ioa747 said: I have English MUI (Multilingual User Interface) windows. Your example scripts and output was very helpful, thank you. I've never had multiple languages on my system and so never really understood how it all works. So your examples pulling strings from MUI files helped my understanding. I have always wondered something though and perhaps you can help answer this question. Does the @MUILang macro return the currently (in-use) language that is on your system in a multi-language system? Also if you have a moment, I just updated GUIDarkTheme-2026.07.27 version with some fixes to prevent crashes particularly on non-English OS for the ChooseFont dialog. Could you please test this new version, run the GUI, and click on the ...Font() button to bring up the ChooseFont dialog to see if it works in your language? Thank you. Although, it would need to be tested on Win10/11. I don't recall what your main system runs. My goal is simply to make the default ChooseFont dialog become dark mode but keeping the design and layout the same. So I often test by running the AutoIt default light mode _ChooseFont() dialog and run my dark mode variant and check them side-by-side to compare. It was much more complex than I anticipated. But it turned out good so far. ioa747 1
ioa747 Posted July 27 Posted July 27 ConsoleWrite("@muilang=" & @muilang & @CRLF) it comes out @muilang=0409 basically it says what the scite console says +>17:07:56 Starting AutoIt3Wrapper (pid=7804) 23.402.1150.10 from:SciTE.exe (4.4.6.0) Keyboard:00000409 OS:WIN_11/2009 CPU:X64 OS:X64 Environment(Language:0409) CodePage:65001 utf8.auto.check:4 In my system as Windows display language Windows features like Settings and File Explorer will appear in this language English (United States) And as Country or region a Windows and apps might use your country or region to give you local content Greece Edition Windows 11 Pro Version 25H2 Installed on 27/11/2025 OS build 26200.8894 Experience Windows Feature Experience Pack 1000.26100.334.0 WildByDesign 1 I know that I know nothing
WildByDesign Posted August 4 Author Posted August 4 GUIDarkTheme 2026.08.03 Added dark theme support for RichEdit controls Added CUSTOMDRAW for improved Rebar control dark theme Allows custom painting of Rebar band gripper and more Fixed some visual glitches with multi-line Edit (ES_MULTILINE) controls in WM_CTLCOLOREDIT Improvements to vertical alignment of text in single line Edit controls Improved vertical alignment of text in HotKey controls Added _SelfWatchDog UDF by argumentum for debugging if needed Added related "Enable Debugger" option in the Options menu Fixed an issue where the top 3 pixels of a SysIPAddress32 control were not responding to clicks Latest download available in the first post of the topic. argumentum 1
bladem2003 Posted Friday at 10:57 PM Posted Friday at 10:57 PM #include "GUIDarkTheme.au3" #include <MsgBoxConstants.au3> Example() Func Example() ; Create a constant variable in Local scope of the message to display in FileSelectFolder. Local Const $sMessage = "Select a folder" ; Display an open dialog to select a file. Local $sFileSelectFolder = FileSelectFolder($sMessage, "") If @error Then ; Display the error message. MsgBox($MB_SYSTEMMODAL, "", "No folder was selected.") Else ; Display the selected folder. MsgBox($MB_SYSTEMMODAL, "", "You chose the following folder:" & @CRLF & $sFileSelectFolder) EndIf EndFunc ;==>Example @WildByDesign That always returns an empty string.
WildByDesign Posted Friday at 11:11 PM Author Posted Friday at 11:11 PM 5 minutes ago, bladem2003 said: That always returns an empty string. Thanks for letting me know. I actually ran into a similar bug with FileOpenDialog earlier today. The problem was my code for intercepting Choose Color and Choose Font dialogs is not intended to handle other dialog types. So I fixed it by only allowing Color and Font dialogs to be intercepted and allow the other dialog types to continue as normal. I tested my fix with your example code and the fix worked well for FileSelectFolder. I will try to get an update out tomorrow. bladem2003 1
WildByDesign Posted Friday at 11:27 PM Author Posted Friday at 11:27 PM GUIDarkTheme 2026.09.18 Fixed issue with certain dialog windows failing to work correctly or crashing @bladem2003 This release has the fix that prevents other dialog types from crashing or failing. I have a bigger release coming (hopefully soon) that I have been working on for a month now to bring full Per-Monitor V2 DPI scaling to GUIDarkTheme UDF. It has been more difficult than I expected but it is almost done. ioa747, bladem2003 and argumentum 2 1
WildByDesign Posted Saturday at 01:34 PM Author Posted Saturday at 01:34 PM Heads up: I apologize, but my "fix" in the GUIDarkTheme 2026.09.18 release ended up breaking dark mode for MsgBox, Font dialog, and Color dialog. I've got an idea for a more elaborate fix for this issue but I can't fix it until later tonight. Sorry about that.
WildByDesign Posted Saturday at 11:39 PM Author Posted Saturday at 11:39 PM GUIDarkTheme 2026.09.19 Fixed a regression from the last release that affected certain dark mode dialog windows Latest download available in the first post of the topic. argumentum 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now