Author: gedmurphy
Date: Mon Nov 5 18:31:22 2007
New Revision: 30180
URL:
http://svn.reactos.org/svn/reactos?rev=30180&view=rev
Log:
fix displaying of current resolution
Modified:
trunk/reactos/base/applications/mstsc/connectdialog.c
trunk/reactos/base/applications/mstsc/lang/en-US.rc
trunk/reactos/base/applications/mstsc/resource.h
Modified: trunk/reactos/base/applications/mstsc/connectdialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/co…
==============================================================================
--- trunk/reactos/base/applications/mstsc/connectdialog.c (original)
+++ trunk/reactos/base/applications/mstsc/connectdialog.c Mon Nov 5 18:31:22 2007
@@ -387,24 +387,18 @@
static VOID
UpdateDisplay(IN HWND hwndDlg, PINFO pGlobalData, IN BOOL bUpdateThumb)
{
+
+
+
+}
+
+
+static VOID
+FillResolutionsAndColors(PINFO pInfo)
+{
+ PSETTINGS_ENTRY Current;
TCHAR Buffer[64];
TCHAR Pixel[64];
- DWORD index;
-
- LoadString(hInst, IDS_PIXEL, Pixel, sizeof(Pixel) / sizeof(TCHAR));
- _stprintf(Buffer, Pixel,
pGlobalData->CurrentDisplayDevice->CurrentSettings->dmPelsWidth,
pGlobalData->CurrentDisplayDevice->CurrentSettings->dmPelsHeight, Pixel);
- //SendDlgItemMessage(pGlobalData->hDisplayPage, IDC_SETTINGS_RESOLUTION_TEXT,
WM_SETTEXT, 0, (LPARAM)Buffer);
- SetDlgItemText(pGlobalData->hDisplayPage, pGlobalData->hDisplayPage, Buffer);
-
- if (LoadString(hInst, (2900 +
pGlobalData->CurrentDisplayDevice->CurrentSettings->dmBitsPerPel), Buffer,
sizeof(Buffer) / sizeof(TCHAR)))
- SendDlgItemMessage(hwndDlg, IDC_GEOSLIDER, CB_SELECTSTRING, (WPARAM)-1,
(LPARAM)Buffer);
-}
-
-
-static VOID
-FillResolutionsAndColors(PINFO pInfo)
-{
- PSETTINGS_ENTRY Current;
DWORD index, i, num;
DWORD MaxBpp = 0;
UINT HighBpp;
@@ -481,7 +475,21 @@
TRUE,
MAKELONG(0, pInfo->DisplayDeviceList->ResolutionsCount));
//extra 1 for full screen
- UpdateDisplay(pInfo->hDisplayPage, pInfo, TRUE);
+ LoadString(hInst, IDS_PIXEL, Pixel, sizeof(Pixel) / sizeof(TCHAR));
+ _stprintf(Buffer, Pixel,
pInfo->CurrentDisplayDevice->CurrentSettings->dmPelsWidth,
pInfo->CurrentDisplayDevice->CurrentSettings->dmPelsHeight, Pixel);
+ SendDlgItemMessage(pInfo->hDisplayPage, IDC_SETTINGS_RESOLUTION_TEXT, WM_SETTEXT,
0, (LPARAM)Buffer);
+
+ for (index = 0; index < pInfo->CurrentDisplayDevice->ResolutionsCount;
index++)
+ {
+ if (pInfo->CurrentDisplayDevice->Resolutions[index].dmPelsWidth ==
pInfo->CurrentDisplayDevice->CurrentSettings->dmPelsWidth &&
+ pInfo->CurrentDisplayDevice->Resolutions[index].dmPelsHeight ==
pInfo->CurrentDisplayDevice->CurrentSettings->dmPelsHeight)
+ {
+ SendDlgItemMessage(pInfo->hDisplayPage, IDC_GEOSLIDER, TBM_SETPOS, TRUE,
index);
+ break;
+ }
+ }
+
+ //UpdateDisplay(pInfo->hDisplayPage, pInfo, TRUE);
}
Modified: trunk/reactos/base/applications/mstsc/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/la…
==============================================================================
--- trunk/reactos/base/applications/mstsc/lang/en-US.rc (original)
+++ trunk/reactos/base/applications/mstsc/lang/en-US.rc Mon Nov 5 18:31:22 2007
@@ -35,7 +35,7 @@
LTEXT "Note: Settings on the remote computer might override this
setting.",IDC_STATIC,56,143,165,18
LTEXT "Less",IDC_STATIC,35,42,15,8
LTEXT "More",IDC_STATIC,189,42,17,8
- LTEXT "", IDC_SETTINGS_RESOLUTION_TEXT, 56, 62, 124, 10,
SS_CENTER
+ LTEXT "", IDC_SETTINGS_RESOLUTION_TEXT, 56, 62, 120, 10,
SS_CENTER
END
IDD_CONNECTDIALOG DIALOGEX 0, 0, 260, 267
Modified: trunk/reactos/base/applications/mstsc/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mstsc/re…
==============================================================================
--- trunk/reactos/base/applications/mstsc/resource.h (original)
+++ trunk/reactos/base/applications/mstsc/resource.h Mon Nov 5 18:31:22 2007
@@ -14,8 +14,8 @@
#define IDC_LOGONICON 1016
#define IDC_CONNICON 1017
-#define IDC_REMICON 1014
-#define IDC_COLORSICON 1015
+#define IDC_REMICON 1018
+#define IDC_COLORSICON 1019
#define IDB_HEADER 1016
#define IDB_SPECT 1017