Author: janderwald
Date: Wed Apr 30 05:55:35 2008
New Revision: 33196
URL:
http://svn.reactos.org/svn/reactos?rev=33196&view=rev
Log:
- use tab control as parent for the child dialogs
- fixes display problems
- thanks to GedMurphy & Colin_Finck for finding the issue
Modified:
trunk/reactos/base/applications/dxdiag/display.c
trunk/reactos/base/applications/dxdiag/dxdiag.c
trunk/reactos/base/applications/dxdiag/precomp.h
trunk/reactos/base/applications/dxdiag/sound.c
Modified: trunk/reactos/base/applications/dxdiag/display.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/d…
==============================================================================
--- trunk/reactos/base/applications/dxdiag/display.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/display.c [iso-8859-1] Wed Apr 30 05:55:35
2008
@@ -313,7 +313,7 @@
break;
pContext->hDisplayWnd = hDlgs;
- hwndDlg = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_DISPLAY_DIALOG),
pContext->hMainDialog, DisplayPageWndProc, (LPARAM)pContext);
+ hwndDlg = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_DISPLAY_DIALOG),
pContext->hTabCtrl, DisplayPageWndProc, (LPARAM)pContext);
if (!hwndDlg)
break;
Modified: trunk/reactos/base/applications/dxdiag/dxdiag.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/d…
==============================================================================
--- trunk/reactos/base/applications/dxdiag/dxdiag.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/dxdiag.c [iso-8859-1] Wed Apr 30 05:55:35 2008
@@ -98,15 +98,19 @@
VOID
InitializeTabCtrl(HWND hwndDlg, PDXDIAG_CONTEXT pContext)
{
+ /* get tabctrl */
+ hTabCtrlWnd = GetDlgItem(hwndDlg, IDC_TAB_CONTROL);
+ pContext->hTabCtrl = hTabCtrlWnd;
+
/* create the dialogs */
- pContext->hDialogs[0] = CreateDialogParamW(hInst,
MAKEINTRESOURCEW(IDD_SYSTEM_DIALOG), hwndDlg, SystemPageWndProc, (LPARAM)pContext);
- pContext->hDialogs[1] = CreateDialogParamW(hInst,
MAKEINTRESOURCEW(IDD_MUSIC_DIALOG), hwndDlg, MusicPageWndProc, (LPARAM)pContext);
- pContext->hDialogs[2] = CreateDialogParamW(hInst,
MAKEINTRESOURCEW(IDD_INPUT_DIALOG), hwndDlg, InputPageWndProc, (LPARAM)pContext);
- pContext->hDialogs[3] = CreateDialogParamW(hInst,
MAKEINTRESOURCEW(IDD_NETWORK_DIALOG), hwndDlg, NetworkPageWndProc, (LPARAM)pContext);
- pContext->hDialogs[4] = CreateDialogParamW(hInst,
MAKEINTRESOURCEW(IDD_HELP_DIALOG), hwndDlg, HelpPageWndProc, (LPARAM)pContext);
+ 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);
/* insert tab ctrl items */
- hTabCtrlWnd = GetDlgItem(hwndDlg, IDC_TAB_CONTROL);
+
InsertTabCtrlItem(hTabCtrlWnd, 0, MAKEINTRESOURCEW(IDS_SYSTEM_DIALOG));
InitializeDisplayAdapters(pContext);
InitializeDirectSoundPage(pContext);
Modified: trunk/reactos/base/applications/dxdiag/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/p…
==============================================================================
--- trunk/reactos/base/applications/dxdiag/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/precomp.h [iso-8859-1] Wed Apr 30 05:55:35
2008
@@ -20,6 +20,7 @@
typedef struct
{
HWND hMainDialog;
+ HWND hTabCtrl;
ULONG NumDisplayAdapter;
HWND * hDisplayWnd;
ULONG NumSoundAdapter;
Modified: trunk/reactos/base/applications/dxdiag/sound.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/dxdiag/s…
==============================================================================
--- trunk/reactos/base/applications/dxdiag/sound.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/dxdiag/sound.c [iso-8859-1] Wed Apr 30 05:55:35 2008
@@ -29,7 +29,7 @@
return FALSE;
pContext->hSoundWnd = hDlgs;
- hwndDlg = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_SOUND_DIALOG),
pContext->hMainDialog, SoundPageWndProc, (LPARAM)pContext);
+ hwndDlg = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_SOUND_DIALOG),
pContext->hTabCtrl, SoundPageWndProc, (LPARAM)pContext);
if (!hwndDlg)
return FALSE;
@@ -40,7 +40,7 @@
swprintf (szText, L"%s %u", szSound, pContext->NumSoundAdapter + 1);
- InsertTabCtrlItem(GetDlgItem(pContext->hMainDialog, IDC_TAB_CONTROL),
pContext->NumDisplayAdapter + pContext->NumSoundAdapter + 1, szText);
+ InsertTabCtrlItem(pContext->hTabCtrl, pContext->NumDisplayAdapter +
pContext->NumSoundAdapter + 1, szText);
hDlgs[pContext->NumSoundAdapter] = hwndDlg;
pContext->NumSoundAdapter++;