aboutsummaryrefslogtreecommitdiff
path: root/Src/Winamp/setup/langutil.cpp
diff options
context:
space:
mode:
authorJean-Francois Mauguit <jfmauguit@mac.com>2024-09-24 09:03:25 -0400
committerGitHub <noreply@github.com>2024-09-24 09:03:25 -0400
commitbab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch)
tree12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Winamp/setup/langutil.cpp
parent4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff)
parent20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff)
downloadwinamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/Winamp/setup/langutil.cpp')
-rw-r--r--Src/Winamp/setup/langutil.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/Src/Winamp/setup/langutil.cpp b/Src/Winamp/setup/langutil.cpp
new file mode 100644
index 00000000..a461fc3b
--- /dev/null
+++ b/Src/Winamp/setup/langutil.cpp
@@ -0,0 +1,43 @@
+#include "main.h"
+#include "./langutil.h"
+
+
+
+INT_PTR WADialogBoxParam(LPCWSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam)
+{
+ INT_PTR ret(0);
+ HINSTANCE hInst = (language_pack_instance) ? language_pack_instance : hMainInstance;
+ while(hInst)
+ {
+ ret = DialogBoxParamW(hInst, lpTemplateName, hWndParent, lpDialogFunc, dwInitParam);
+ if (-1 == ret && hInst != hMainInstance) hInst = hMainInstance;
+ else break;
+ }
+ return ret;
+}
+
+HWND WACreateDialogParam(LPCWSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM dwInitParam)
+{
+ HWND ret(NULL);
+ HINSTANCE hInst = (language_pack_instance) ? language_pack_instance : hMainInstance;
+ while(hInst)
+ {
+ ret = CreateDialogParamW(hInst, lpTemplateName, hWndParent, lpDialogFunc, dwInitParam);
+ if (NULL == ret && hInst != hMainInstance) hInst = hMainInstance;
+ else break;
+ }
+ return ret;
+}
+
+HBITMAP WALoadImage2(LPCWSTR pszSectionName, LPCWSTR lpImageName, BOOL bPremult)
+{
+ HBITMAP ret(NULL);
+ HINSTANCE hInst = (language_pack_instance) ? language_pack_instance : hMainInstance;
+ while(hInst)
+ {
+ ret = WALoadImage(hInst, pszSectionName, lpImageName, bPremult);
+ if (NULL == ret && hInst != hMainInstance) hInst = hMainInstance;
+ else break;
+ }
+ return ret;
+} \ No newline at end of file