[ros-diffs] [cfinck] 34114: Import Ged's mstsc hack from the 0.3.4 branch to solve the HitTest problem. See r31922 for more details

cfinck at svn.reactos.org cfinck at svn.reactos.org
Fri Jun 27 00:01:19 CEST 2008


Author: cfinck
Date: Thu Jun 26 17:01:18 2008
New Revision: 34114

URL: http://svn.reactos.org/svn/reactos?rev=34114&view=rev
Log:
Import Ged's mstsc hack from the 0.3.4 branch to solve the HitTest problem.
See r31922 for more details

Modified:
    branches/ros-branch-0_3_5/reactos/base/applications/mstsc/connectdialog.c

Modified: branches/ros-branch-0_3_5/reactos/base/applications/mstsc/connectdialog.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_5/reactos/base/applications/mstsc/connectdialog.c?rev=34114&r1=34113&r2=34114&view=diff
==============================================================================
--- branches/ros-branch-0_3_5/reactos/base/applications/mstsc/connectdialog.c [iso-8859-1] (original)
+++ branches/ros-branch-0_3_5/reactos/base/applications/mstsc/connectdialog.c [iso-8859-1] Thu Jun 26 17:01:18 2008
@@ -197,19 +197,12 @@
 
 
 static VOID
-GeneralOnInit(HWND hwnd,
-              PINFO pInfo)
-{
-    SetWindowLongPtrW(hwnd,
-                      GWLP_USERDATA,
-                      (LONG_PTR)pInfo);
-
-    pInfo->hGeneralPage = hwnd;
-
+GeneralOnInit(PINFO pInfo)
+{
     SetWindowPos(pInfo->hGeneralPage,
                  NULL,
-                 2,
-                 22,
+                 13,
+                 110,
                  0,
                  0,
                  SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
@@ -255,13 +248,14 @@
                WPARAM wParam,
                LPARAM lParam)
 {
-    PINFO pInfo = (PINFO)GetWindowLongPtrW(hDlg,
+    PINFO pInfo = (PINFO)GetWindowLongPtrW(GetParent(hDlg),
                                            GWLP_USERDATA);
 
     switch (message)
     {
         case WM_INITDIALOG:
-            GeneralOnInit(hDlg, (PINFO)lParam);
+            pInfo->hGeneralPage = hDlg;
+            GeneralOnInit(pInfo);
             return TRUE;
 
         case WM_COMMAND:
@@ -745,23 +739,16 @@
 
 
 static VOID
-DisplayOnInit(HWND hwnd,
-              PINFO pInfo)
+DisplayOnInit(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,
-                 2,
-                 22,
+                 13,
+                 110,
                  0,
                  0,
                  SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
@@ -835,13 +822,14 @@
                WPARAM wParam,
                LPARAM lParam)
 {
-    PINFO pInfo = (PINFO)GetWindowLongPtrW(hDlg,
+    PINFO pInfo = (PINFO)GetWindowLongPtrW(GetParent(hDlg),
                                            GWLP_USERDATA);
 
     switch (message)
     {
         case WM_INITDIALOG:
-            DisplayOnInit(hDlg, (PINFO)lParam);
+            pInfo->hDisplayPage = hDlg;
+            DisplayOnInit(pInfo);
             return TRUE;
 
         case WM_DRAWITEM:
@@ -983,11 +971,10 @@
         pInfo->hTab = GetDlgItem(hwnd, IDC_TAB);
         if (pInfo->hTab)
         {
-            if (CreateDialogParamW(hInst,
-                                   MAKEINTRESOURCEW(IDD_GENERAL),
-                                   pInfo->hTab,
-                                   (DLGPROC)GeneralDlgProc,
-                                   (LPARAM)pInfo))
+            if (CreateDialogW(hInst,
+                              MAKEINTRESOURCEW(IDD_GENERAL),
+                              hwnd,
+                              (DLGPROC)GeneralDlgProc))
             {
                 WCHAR str[256];
                 ZeroMemory(&item, sizeof(TCITEM));
@@ -998,11 +985,10 @@
                 (void)TabCtrl_InsertItem(pInfo->hTab, 0, &item);
             }
 
-            if (CreateDialogParamW(hInst,
-                                   MAKEINTRESOURCEW(IDD_DISPLAY),
-                                   pInfo->hTab,
-                                   (DLGPROC)DisplayDlgProc,
-                                   (LPARAM)pInfo))
+            if (CreateDialogW(hInst,
+                              MAKEINTRESOURCEW(IDD_DISPLAY),
+                              hwnd,
+                              (DLGPROC)DisplayDlgProc))
             {
                 WCHAR str[256];
                 ZeroMemory(&item, sizeof(TCITEM));



More information about the Ros-diffs mailing list