mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
- use tab control as parent for the child dialogs
- fixes display problems - thanks to GedMurphy & Colin_Finck for finding the issue svn path=/trunk/; revision=33196
This commit is contained in:
parent
efc283ea0f
commit
f938064c8d
4 changed files with 14 additions and 9 deletions
|
@ -313,7 +313,7 @@ void InitializeDisplayAdapters(PDXDIAG_CONTEXT pContext)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
pContext->hDisplayWnd = hDlgs;
|
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)
|
if (!hwndDlg)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -98,15 +98,19 @@ TabCtrl_OnSelChange(PDXDIAG_CONTEXT pContext)
|
||||||
VOID
|
VOID
|
||||||
InitializeTabCtrl(HWND hwndDlg, PDXDIAG_CONTEXT pContext)
|
InitializeTabCtrl(HWND hwndDlg, PDXDIAG_CONTEXT pContext)
|
||||||
{
|
{
|
||||||
|
/* get tabctrl */
|
||||||
|
hTabCtrlWnd = GetDlgItem(hwndDlg, IDC_TAB_CONTROL);
|
||||||
|
pContext->hTabCtrl = hTabCtrlWnd;
|
||||||
|
|
||||||
/* create the dialogs */
|
/* create the dialogs */
|
||||||
pContext->hDialogs[0] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_SYSTEM_DIALOG), hwndDlg, SystemPageWndProc, (LPARAM)pContext);
|
pContext->hDialogs[0] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_SYSTEM_DIALOG), hTabCtrlWnd, SystemPageWndProc, (LPARAM)pContext);
|
||||||
pContext->hDialogs[1] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_MUSIC_DIALOG), hwndDlg, MusicPageWndProc, (LPARAM)pContext);
|
pContext->hDialogs[1] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_MUSIC_DIALOG), hTabCtrlWnd, MusicPageWndProc, (LPARAM)pContext);
|
||||||
pContext->hDialogs[2] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_INPUT_DIALOG), hwndDlg, InputPageWndProc, (LPARAM)pContext);
|
pContext->hDialogs[2] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_INPUT_DIALOG), hTabCtrlWnd, InputPageWndProc, (LPARAM)pContext);
|
||||||
pContext->hDialogs[3] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_NETWORK_DIALOG), hwndDlg, NetworkPageWndProc, (LPARAM)pContext);
|
pContext->hDialogs[3] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_NETWORK_DIALOG), hTabCtrlWnd, NetworkPageWndProc, (LPARAM)pContext);
|
||||||
pContext->hDialogs[4] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_HELP_DIALOG), hwndDlg, HelpPageWndProc, (LPARAM)pContext);
|
pContext->hDialogs[4] = CreateDialogParamW(hInst, MAKEINTRESOURCEW(IDD_HELP_DIALOG), hTabCtrlWnd, HelpPageWndProc, (LPARAM)pContext);
|
||||||
|
|
||||||
/* insert tab ctrl items */
|
/* insert tab ctrl items */
|
||||||
hTabCtrlWnd = GetDlgItem(hwndDlg, IDC_TAB_CONTROL);
|
|
||||||
InsertTabCtrlItem(hTabCtrlWnd, 0, MAKEINTRESOURCEW(IDS_SYSTEM_DIALOG));
|
InsertTabCtrlItem(hTabCtrlWnd, 0, MAKEINTRESOURCEW(IDS_SYSTEM_DIALOG));
|
||||||
InitializeDisplayAdapters(pContext);
|
InitializeDisplayAdapters(pContext);
|
||||||
InitializeDirectSoundPage(pContext);
|
InitializeDirectSoundPage(pContext);
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
HWND hMainDialog;
|
HWND hMainDialog;
|
||||||
|
HWND hTabCtrl;
|
||||||
ULONG NumDisplayAdapter;
|
ULONG NumDisplayAdapter;
|
||||||
HWND * hDisplayWnd;
|
HWND * hDisplayWnd;
|
||||||
ULONG NumSoundAdapter;
|
ULONG NumSoundAdapter;
|
||||||
|
|
|
@ -29,7 +29,7 @@ BOOL CALLBACK DSEnumCallback(LPGUID lpGuid, LPCWSTR lpcstrDescription, LPCWSTR l
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
pContext->hSoundWnd = hDlgs;
|
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)
|
if (!hwndDlg)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ BOOL CALLBACK DSEnumCallback(LPGUID lpGuid, LPCWSTR lpcstrDescription, LPCWSTR l
|
||||||
swprintf (szText, L"%s %u", szSound, pContext->NumSoundAdapter + 1);
|
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;
|
hDlgs[pContext->NumSoundAdapter] = hwndDlg;
|
||||||
pContext->NumSoundAdapter++;
|
pContext->NumSoundAdapter++;
|
||||||
|
|
Loading…
Reference in a new issue