From ff8f4a6ff97c13be1d9e6eaa24938e0617d72474 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Thu, 30 May 2013 08:12:13 +0000 Subject: [PATCH] [DXDIAG] - Disable call to Direct3DCreate9 [HACK] - Use the correct parent window handle when creating the system dialogs. - Fix the next page button - TODO: ReactOS needs to check whether a correct parent window handle was provided - Fixes dxdiag tab problem svn path=/trunk/; revision=59113 --- reactos/base/applications/dxdiag/display.c | 6 ++++-- reactos/base/applications/dxdiag/dxdiag.c | 16 +++++++++------- reactos/base/applications/dxdiag/sound.c | 2 -- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/reactos/base/applications/dxdiag/display.c b/reactos/base/applications/dxdiag/display.c index 77b6fd337d7..ac1221d50b6 100644 --- a/reactos/base/applications/dxdiag/display.c +++ b/reactos/base/applications/dxdiag/display.c @@ -214,12 +214,14 @@ InitializeDialog(HWND hwndDlg, PDISPLAY_DEVICEW pDispDevice) HWND hDlgCtrls[5]; DWORD dwMemory; DEVMODEW DevMode; - IDirect3D9 * ppObj; + IDirect3D9 * ppObj = NULL; D3DADAPTER_IDENTIFIER9 Identifier; HRESULT hResult; szText[0] = L'\0'; - ppObj = Direct3DCreate9(D3D_SDK_VERSION); + + /* fix wine */ + //ppObj = Direct3DCreate9(D3D_SDK_VERSION); if (ppObj) { hResult = IDirect3D9_GetAdapterIdentifier(ppObj, D3DADAPTER_DEFAULT , 2/*D3DENUM_WHQL_LEVEL*/, &Identifier); diff --git a/reactos/base/applications/dxdiag/dxdiag.c b/reactos/base/applications/dxdiag/dxdiag.c index 808f92b673a..2b46f9bef92 100644 --- a/reactos/base/applications/dxdiag/dxdiag.c +++ b/reactos/base/applications/dxdiag/dxdiag.c @@ -119,11 +119,11 @@ InitializeTabCtrl(HWND hwndDlg, PDXDIAG_CONTEXT pContext) pContext->hTabCtrl = hTabCtrlWnd; /* create the dialogs */ - pContext->hDialogs[0] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_SYSTEM_DIALOG), hTabCtrlWnd, SystemPageWndProc, (LPARAM)pContext); - pContext->hDialogs[1] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_MUSIC_DIALOG), hTabCtrlWnd, MusicPageWndProc, (LPARAM)pContext); - pContext->hDialogs[2] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_INPUT_DIALOG), hTabCtrlWnd, InputPageWndProc, (LPARAM)pContext); - pContext->hDialogs[3] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_NETWORK_DIALOG), hTabCtrlWnd, NetworkPageWndProc, (LPARAM)pContext); - pContext->hDialogs[4] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_HELP_DIALOG), hTabCtrlWnd, HelpPageWndProc, (LPARAM)pContext); + pContext->hDialogs[0] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_SYSTEM_DIALOG), pContext->hMainDialog, SystemPageWndProc, (LPARAM)pContext); + pContext->hDialogs[1] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_MUSIC_DIALOG), pContext->hMainDialog, MusicPageWndProc, (LPARAM)pContext); + pContext->hDialogs[2] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_INPUT_DIALOG), pContext->hMainDialog, InputPageWndProc, (LPARAM)pContext); + pContext->hDialogs[3] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_NETWORK_DIALOG), pContext->hMainDialog, NetworkPageWndProc, (LPARAM)pContext); + pContext->hDialogs[4] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_HELP_DIALOG), pContext->hMainDialog, HelpPageWndProc, (LPARAM)pContext); /* insert tab ctrl items */ InsertTabCtrlItem(hTabCtrlWnd, 0, MAKEINTRESOURCEW(IDS_SYSTEM_DIALOG)); @@ -197,9 +197,11 @@ DxDiagWndProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam) EnableWindow(GetDlgItem(hwndDlg, IDC_BUTTON_NEXT), (CurSel != TabCtrl_GetItemCount(hTabCtrlWnd) - 1)); - /* switch to next page */ + /* switch to next tab */ SendMessageW(hTabCtrlWnd, TCM_SETCURSEL, CurSel, 0L); - + + /* show next page */ + TabCtrl_OnSelChange(pContext); return TRUE; } diff --git a/reactos/base/applications/dxdiag/sound.c b/reactos/base/applications/dxdiag/sound.c index 59a9293f6c5..17c4a654481 100644 --- a/reactos/base/applications/dxdiag/sound.c +++ b/reactos/base/applications/dxdiag/sound.c @@ -244,8 +244,6 @@ BOOL CALLBACK DSEnumCallback(LPGUID lpGuid, LPCWSTR lpcstrDescription, LPCWSTR l /* set further device details */ SetDeviceDetails(hwndDlg, &GUID_DEVCLASS_MEDIA, lpcstrDescription); - - /* load sound resource string */ szSound[0] = L'\0'; LoadStringW(hInst, IDS_SOUND_DIALOG, szSound, sizeof(szSound)/sizeof(WCHAR));