Author: gedmurphy
Date: Tue Nov 13 14:53:31 2007
New Revision: 30417
URL:
http://svn.reactos.org/svn/reactos?rev=30417&view=rev
Log:
remove a workaround for an early bug. The tabs will display correctly in low resolution
now.
Modified:
trunk/reactos/base/applications/mstsc/connectdialog.c
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 Tue Nov 13 14:53:31 2007
@@ -196,12 +196,19 @@
static VOID
-GeneralOnInit(PINFO pInfo)
-{
+GeneralOnInit(HWND hwnd,
+ PINFO pInfo)
+{
+ SetWindowLongPtrW(hwnd,
+ GWLP_USERDATA,
+ (LONG_PTR)pInfo);
+
+ pInfo->hGeneralPage = hwnd;
+
SetWindowPos(pInfo->hGeneralPage,
NULL,
- 13,
- 110,
+ 2,
+ 22,
0,
0,
SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
@@ -247,14 +254,13 @@
WPARAM wParam,
LPARAM lParam)
{
- PINFO pInfo = (PINFO)GetWindowLongPtrW(GetParent(hDlg),
+ PINFO pInfo = (PINFO)GetWindowLongPtrW(hDlg,
GWLP_USERDATA);
switch (message)
{
case WM_INITDIALOG:
- pInfo->hGeneralPage = hDlg;
- GeneralOnInit(pInfo);
+ GeneralOnInit(hDlg, (PINFO)lParam);
return TRUE;
case WM_COMMAND:
@@ -738,16 +744,23 @@
static VOID
-DisplayOnInit(PINFO pInfo)
+DisplayOnInit(HWND hwnd,
+ PINFO pInfo)
{
DISPLAY_DEVICEW displayDevice;
DWORD iDevNum = 0;
BOOL GotDev = FALSE;
+ SetWindowLongPtrW(hwnd,
+ GWLP_USERDATA,
+ (LONG_PTR)pInfo);
+
+ pInfo->hDisplayPage = hwnd;
+
SetWindowPos(pInfo->hDisplayPage,
NULL,
- 13,
- 110,
+ 2,
+ 22,
0,
0,
SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
@@ -821,14 +834,13 @@
WPARAM wParam,
LPARAM lParam)
{
- PINFO pInfo = (PINFO)GetWindowLongPtrW(GetParent(hDlg),
+ PINFO pInfo = (PINFO)GetWindowLongPtrW(hDlg,
GWLP_USERDATA);
switch (message)
{
case WM_INITDIALOG:
- pInfo->hDisplayPage = hDlg;
- DisplayOnInit(pInfo);
+ DisplayOnInit(hDlg, (PINFO)lParam);
return TRUE;
case WM_DRAWITEM:
@@ -968,10 +980,11 @@
pInfo->hTab = GetDlgItem(hwnd, IDC_TAB);
if (pInfo->hTab)
{
- if (CreateDialogW(hInst,
- MAKEINTRESOURCEW(IDD_GENERAL),
- hwnd,
- (DLGPROC)GeneralDlgProc))
+ if (CreateDialogParamW(hInst,
+ MAKEINTRESOURCEW(IDD_GENERAL),
+ pInfo->hTab,
+ (DLGPROC)GeneralDlgProc,
+ pInfo))
{
WCHAR str[256];
ZeroMemory(&item, sizeof(TCITEM));
@@ -982,10 +995,11 @@
(void)TabCtrl_InsertItem(pInfo->hTab, 0, &item);
}
- if (CreateDialogW(hInst,
- MAKEINTRESOURCEW(IDD_DISPLAY),
- hwnd,
- (DLGPROC)DisplayDlgProc))
+ if (CreateDialogParamW(hInst,
+ MAKEINTRESOURCEW(IDD_DISPLAY),
+ pInfo->hTab,
+ (DLGPROC)DisplayDlgProc,
+ pInfo))
{
WCHAR str[256];
ZeroMemory(&item, sizeof(TCITEM));