Index: dxglcfg2/dxglcfg2.c |
— | — | @@ -64,6 +64,7 @@ |
65 | 65 | HRESULT(WINAPI *_CloseThemeData)(HTHEME hTheme) = NULL;
|
66 | 66 | HRESULT(WINAPI *_DrawThemeBackground)(HTHEME hTheme, HDC hdc, int iPartID,
|
67 | 67 | int iStateID, const RECT *pRect, const RECT *pClipRect) = NULL;
|
| 68 | +HRESULT(WINAPI *_EnableThemeDialogTexture)(HWND hwnd, DWORD dwFlags) = NULL;
|
68 | 69 |
|
69 | 70 |
|
70 | 71 | typedef struct
|
— | — | @@ -486,6 +487,7 @@ |
487 | 488 | case WM_INITDIALOG:
|
488 | 489 | if (uxtheme) hThemeDisplay = _OpenThemeData(hWnd, L"Button");
|
489 | 490 | else hThemeDisplay = NULL;
|
| 491 | + if (_EnableThemeDialogTexture) _EnableThemeDialogTexture(hWnd, ETDT_ENABLETAB);
|
490 | 492 | return TRUE;
|
491 | 493 | case WM_MEASUREITEM:
|
492 | 494 | switch (wParam)
|
— | — | @@ -546,6 +548,7 @@ |
547 | 549 | switch (Msg)
|
548 | 550 | {
|
549 | 551 | case WM_INITDIALOG:
|
| 552 | + if (_EnableThemeDialogTexture) _EnableThemeDialogTexture(hWnd, ETDT_ENABLETAB);
|
550 | 553 | return TRUE;
|
551 | 554 | default:
|
552 | 555 | return FALSE;
|
— | — | @@ -557,6 +560,7 @@ |
558 | 561 | switch (Msg)
|
559 | 562 | {
|
560 | 563 | case WM_INITDIALOG:
|
| 564 | + if (_EnableThemeDialogTexture) _EnableThemeDialogTexture(hWnd, ETDT_ENABLETAB);
|
561 | 565 | return TRUE;
|
562 | 566 | default:
|
563 | 567 | return FALSE;
|
— | — | @@ -568,6 +572,7 @@ |
569 | 573 | switch (Msg)
|
570 | 574 | {
|
571 | 575 | case WM_INITDIALOG:
|
| 576 | + if (_EnableThemeDialogTexture) _EnableThemeDialogTexture(hWnd, ETDT_ENABLETAB);
|
572 | 577 | return TRUE;
|
573 | 578 | default:
|
574 | 579 | return FALSE;
|
— | — | @@ -579,6 +584,7 @@ |
580 | 585 | switch (Msg)
|
581 | 586 | {
|
582 | 587 | case WM_INITDIALOG:
|
| 588 | + if (_EnableThemeDialogTexture) _EnableThemeDialogTexture(hWnd, ETDT_ENABLETAB);
|
583 | 589 | return TRUE;
|
584 | 590 | default:
|
585 | 591 | return FALSE;
|
— | — | @@ -590,6 +596,7 @@ |
591 | 597 | switch (Msg)
|
592 | 598 | {
|
593 | 599 | case WM_INITDIALOG:
|
| 600 | + if (_EnableThemeDialogTexture) _EnableThemeDialogTexture(hWnd, ETDT_ENABLETAB);
|
594 | 601 | return TRUE;
|
595 | 602 | default:
|
596 | 603 | return FALSE;
|
— | — | @@ -724,7 +731,9 @@ |
725 | 732 | _DrawThemeBackground =
|
726 | 733 | (HRESULT(WINAPI*)(HTHEME, HDC, int, int, const RECT*, const RECT*))
|
727 | 734 | GetProcAddress(uxtheme, "DrawThemeBackground");
|
728 | | - if (!(_OpenThemeData && _CloseThemeData && _DrawThemeBackground))
|
| 735 | + _EnableThemeDialogTexture = (HRESULT(WINAPI*)(HWND, DWORD))
|
| 736 | + GetProcAddress(uxtheme, "EnableThemeDialogTexture");
|
| 737 | + if (!(_OpenThemeData && _CloseThemeData && _DrawThemeBackground && _EnableThemeDialogTexture))
|
729 | 738 | {
|
730 | 739 | FreeLibrary(uxtheme);
|
731 | 740 | uxtheme = NULL;
|
Index: dxgltest/common.h |
— | — | @@ -26,6 +26,7 @@ |
27 | 27 | // Windows Header Files:
|
28 | 28 | #include <windows.h>
|
29 | 29 | #include <commctrl.h>
|
| 30 | +#include <Uxtheme.h>
|
30 | 31 | extern bool gradientavailable;
|
31 | 32 | extern BOOL (WINAPI *_GradientFill)(HDC hdc, TRIVERTEX* pVertices, ULONG nVertices, void* pMesh, ULONG nMeshElements, DWORD dwMode);
|
32 | 33 |
|
Index: dxgltest/dxgltest.cpp |
— | — | @@ -23,6 +23,7 @@ |
24 | 24 | HINSTANCE hinstance;
|
25 | 25 | bool gradientavailable;
|
26 | 26 | BOOL (WINAPI *_GradientFill)(HDC hdc, TRIVERTEX* pVertices, ULONG nVertices, void* pMesh, ULONG nMeshElements, DWORD dwMode) = NULL;
|
| 27 | +HRESULT (WINAPI *_EnableThemeDialogTexture)(HWND hwnd, DWORD dwFlags) = NULL;
|
27 | 28 |
|
28 | 29 | void GetFileVersion(tstring &version, LPCTSTR filename)
|
29 | 30 | {
|
— | — | @@ -165,6 +166,7 @@ |
166 | 167 | switch(Msg)
|
167 | 168 | {
|
168 | 169 | case WM_INITDIALOG:
|
| 170 | + if (_EnableThemeDialogTexture) _EnableThemeDialogTexture(hWnd, ETDT_ENABLETAB);
|
169 | 171 | mod_ddraw = LoadLibrary(_T("ddraw.dll"));
|
170 | 172 | IsDXGLDDraw = GetProcAddress(mod_ddraw,"IsDXGLDDraw");
|
171 | 173 | if(IsDXGLDDraw) SetWindowText(GetDlgItem(hWnd,IDC_DDTYPE),_T("DXGL"));
|
— | — | @@ -286,6 +288,7 @@ |
287 | 289 | switch(Msg)
|
288 | 290 | {
|
289 | 291 | case WM_INITDIALOG:
|
| 292 | + if (_EnableThemeDialogTexture) _EnableThemeDialogTexture(hWnd, ETDT_ENABLETAB);
|
290 | 293 | DestroyWindow(GetDlgItem(hWnd,IDC_FILTERLABEL));
|
291 | 294 | DestroyWindow(GetDlgItem(hWnd,IDC_FILTER));
|
292 | 295 | DestroyWindow(GetDlgItem(hWnd,IDC_FSAALABEL));
|
— | — | @@ -497,6 +500,7 @@ |
498 | 501 | switch(Msg)
|
499 | 502 | {
|
500 | 503 | case WM_INITDIALOG:
|
| 504 | + if (_EnableThemeDialogTexture) _EnableThemeDialogTexture(hWnd, ETDT_ENABLETAB);
|
501 | 505 | SendDlgItemMessage(hWnd,IDC_FULLSCREEN,BM_SETCHECK,1,0);
|
502 | 506 | SetDlgItemText(hWnd,IDC_TESTHEADER,_T("Test 3D graphics functionality in DXGL or Direct3D. Press ESC to quit any test."));
|
503 | 507 | for(i = 0; i < numtests3d; i++)
|
— | — | @@ -833,9 +837,13 @@ |
834 | 838 | if(iccex) iccex(&icc);
|
835 | 839 | else InitCommonControls();
|
836 | 840 | if(comctl32) FreeLibrary(comctl32);
|
| 841 | + HMODULE uxtheme = LoadLibrary(_T("uxtheme.dll"));
|
| 842 | + if (uxtheme) _EnableThemeDialogTexture = (HRESULT(WINAPI*)(HWND, DWORD))
|
| 843 | + GetProcAddress(uxtheme, "EnableThemeDialogTexture");
|
837 | 844 | hinstance = hInstance;
|
838 | 845 | DialogBox(hinstance,MAKEINTRESOURCE(IDD_DXGLTEST),NULL,DXGLTestCallback);
|
839 | 846 | if(msimg32) FreeLibrary(msimg32);
|
| 847 | + if (uxtheme) FreeLibrary(uxtheme);
|
840 | 848 | #ifdef _DEBUG
|
841 | 849 | _CrtDumpMemoryLeaks();
|
842 | 850 | #endif
|