Author: weiden
Date: Thu Sep 27 03:37:09 2007
New Revision: 29228
URL:
http://svn.reactos.org/svn/reactos?rev=29228&view=rev
Log:
Select currently selected mode by default
Modified:
trunk/reactos/dll/win32/shellext/deskadp/deskadp.c
Modified: trunk/reactos/dll/win32/shellext/deskadp/deskadp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shellext/deskadp…
==============================================================================
--- trunk/reactos/dll/win32/shellext/deskadp/deskadp.c (original)
+++ trunk/reactos/dll/win32/shellext/deskadp/deskadp.c Thu Sep 27 03:37:09 2007
@@ -85,7 +85,7 @@
HWND hwndListAllModesDlg)
{
TCHAR szFormat[64], szBuffer[64], szColors[64], szRefreshRate[64];
- PDEVMODEW lpDevMode;
+ PDEVMODEW lpDevMode, lpCurrentDevMode;
DWORD dwIndex = 0;
INT i;
@@ -98,6 +98,8 @@
{
szFormat[0] = TEXT('\0');
}
+
+ lpCurrentDevMode =
This->DeskExtInterface->GetCurrentMode(This->DeskExtInterface->Context);
do
{
@@ -133,6 +135,15 @@
LB_SETITEMDATA,
(WPARAM)i,
(LPARAM)lpDevMode);
+
+ if (lpDevMode == lpCurrentDevMode)
+ {
+ SendDlgItemMessage(hwndListAllModesDlg,
+ IDC_ALLVALIDMODES,
+ LB_SETCURSEL,
+ (WPARAM)i,
+ 0);
+ }
}
}
@@ -300,7 +311,6 @@
break;
case IDC_LISTALLMODES:
- MessageBox(hwndDlg, _T("Bla"), NULL, 0);
ShowListAllModes(This);
break;
}