diff --git a/reactos/base/applications/mstsc/connectdialog.c b/reactos/base/applications/mstsc/connectdialog.c index c6f094d30f8..792a22219b4 100644 --- a/reactos/base/applications/mstsc/connectdialog.c +++ b/reactos/base/applications/mstsc/connectdialog.c @@ -387,17 +387,9 @@ ByeBye: static VOID UpdateDisplay(IN HWND hwndDlg, PINFO pGlobalData, IN BOOL bUpdateThumb) { - 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); + } @@ -405,6 +397,8 @@ static VOID FillResolutionsAndColors(PINFO pInfo) { PSETTINGS_ENTRY Current; + TCHAR Buffer[64]; + TCHAR Pixel[64]; DWORD index, i, num; DWORD MaxBpp = 0; UINT HighBpp; @@ -481,7 +475,21 @@ FillResolutionsAndColors(PINFO pInfo) 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); } diff --git a/reactos/base/applications/mstsc/lang/en-US.rc b/reactos/base/applications/mstsc/lang/en-US.rc index b9060295d13..d7c2661edc5 100644 --- a/reactos/base/applications/mstsc/lang/en-US.rc +++ b/reactos/base/applications/mstsc/lang/en-US.rc @@ -35,7 +35,7 @@ BEGIN 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 diff --git a/reactos/base/applications/mstsc/resource.h b/reactos/base/applications/mstsc/resource.h index 3743edd7e13..efe04505216 100644 --- a/reactos/base/applications/mstsc/resource.h +++ b/reactos/base/applications/mstsc/resource.h @@ -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