From 653a40ad149e4264e6345822d7fba769878c8f8d Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Wed, 26 Sep 2007 23:37:09 +0000 Subject: [PATCH] Select currently selected mode by default svn path=/trunk/; revision=29228 --- reactos/dll/win32/shellext/deskadp/deskadp.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/reactos/dll/win32/shellext/deskadp/deskadp.c b/reactos/dll/win32/shellext/deskadp/deskadp.c index c792f6376a4..69b57b2c04a 100644 --- a/reactos/dll/win32/shellext/deskadp/deskadp.c +++ b/reactos/dll/win32/shellext/deskadp/deskadp.c @@ -85,7 +85,7 @@ InitListAllModesDialog(PDESKDISPLAYADAPTER This, HWND hwndListAllModesDlg) { TCHAR szFormat[64], szBuffer[64], szColors[64], szRefreshRate[64]; - PDEVMODEW lpDevMode; + PDEVMODEW lpDevMode, lpCurrentDevMode; DWORD dwIndex = 0; INT i; @@ -99,6 +99,8 @@ InitListAllModesDialog(PDESKDISPLAYADAPTER This, szFormat[0] = TEXT('\0'); } + lpCurrentDevMode = This->DeskExtInterface->GetCurrentMode(This->DeskExtInterface->Context); + do { lpDevMode = This->DeskExtInterface->EnumAllModes(This->DeskExtInterface->Context, @@ -133,6 +135,15 @@ InitListAllModesDialog(PDESKDISPLAYADAPTER This, LB_SETITEMDATA, (WPARAM)i, (LPARAM)lpDevMode); + + if (lpDevMode == lpCurrentDevMode) + { + SendDlgItemMessage(hwndListAllModesDlg, + IDC_ALLVALIDMODES, + LB_SETCURSEL, + (WPARAM)i, + 0); + } } } @@ -300,7 +311,6 @@ DisplayAdapterDlgProc(HWND hwndDlg, break; case IDC_LISTALLMODES: - MessageBox(hwndDlg, _T("Bla"), NULL, 0); ShowListAllModes(This); break; }