MCPcopy Create free account
hub / github.com/DiscordMessenger/dm / XEnableThemeDialogTexture

Function XEnableThemeDialogTexture

src/windows/OptionsDialog.cpp:91–117  ·  view source on GitHub ↗

XXX: Shim to avoid linking against uxtheme.lib

Source from the content-addressed store, hash-verified

89#ifdef NEW_WINDOWS
90// XXX: Shim to avoid linking against uxtheme.lib
91HRESULT XEnableThemeDialogTexture(HWND hWnd, DWORD dwFlags)
92{
93 typedef HRESULT(STDAPICALLTYPE *pEnableThemeDialogTexture)(HWND, DWORD);
94
95 static HMODULE hndl = (HMODULE)INVALID_HANDLE_VALUE;
96 static pEnableThemeDialogTexture etdt;
97 static bool etdtLoaded = false;
98
99 if (!etdtLoaded)
100 {
101 if (hndl == INVALID_HANDLE_VALUE)
102 hndl = LoadLibrary(TEXT("uxtheme.dll"));
103
104 if (!hndl)
105 return S_OK; // simulate OK
106
107 etdt = (pEnableThemeDialogTexture)GetProcAddress(hndl, "EnableThemeDialogTexture");
108 etdtLoaded = true;
109 }
110
111 if (!etdt) {
112 auto err = GetLastError();
113 return S_OK;
114 }
115
116 return etdt(hWnd, dwFlags);
117}
118#endif
119
120void OptionsInitPage(HWND hwndDlg, int pageNum)

Callers 1

OnChildDialogInitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected