XXX: Shim to avoid linking against uxtheme.lib
| 89 | #ifdef NEW_WINDOWS |
| 90 | // XXX: Shim to avoid linking against uxtheme.lib |
| 91 | HRESULT 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 | |
| 120 | void OptionsInitPage(HWND hwndDlg, int pageNum) |