Mike McCormack : Remove some unnecessary uses of windowsx.h

Alexandre Julliard julliard at wine.codeweavers.com
Sat Mar 18 12:51:01 CST 2006


Module: wine
Branch: refs/heads/master
Commit: d5816d22020da65b07b0d768f84112d48eadc2c3
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=d5816d22020da65b07b0d768f84112d48eadc2c3

Author: Mike McCormack <mike at codeweavers.com>
Date:   Fri Mar 17 23:26:20 2006 +0900

Remove some unnecessary uses of windowsx.h

---

 dlls/user/tests/edit.c     |    5 +++--
 programs/progman/group.c   |    1 -
 programs/progman/main.c    |    1 -
 programs/progman/program.c |    1 -
 programs/winecfg/audio.c   |    9 ++++-----
 5 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/dlls/user/tests/edit.c b/dlls/user/tests/edit.c
index d92b244..1a830c2 100644
--- a/dlls/user/tests/edit.c
+++ b/dlls/user/tests/edit.c
@@ -20,7 +20,6 @@
 
 #include <assert.h>
 #include <windows.h>
-#include <windowsx.h>
 #include <commctrl.h>
 
 #include "wine/test.h"
@@ -278,7 +277,9 @@ static void ET2_OnCommand(HWND hwnd, int
 static LRESULT CALLBACK ET2_WndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
 {
     switch (iMsg) {
-        HANDLE_MSG(hwnd, WM_COMMAND, ET2_OnCommand);
+    case WM_COMMAND:
+        ET2_OnCommand(hwnd, LOWORD(wParam), (HWND)lParam, HIWORD(wParam));
+        break;
     }
     return DefWindowProc(hwnd, iMsg, wParam, lParam);
 }
diff --git a/programs/progman/group.c b/programs/progman/group.c
index 2f8c5fc..81d078f 100644
--- a/programs/progman/group.c
+++ b/programs/progman/group.c
@@ -23,7 +23,6 @@
 #include <stdio.h>
 #include <string.h>
 #include "windows.h"
-#include "windowsx.h"
 #include "progman.h"
 
 /***********************************************************************
diff --git a/programs/progman/main.c b/programs/progman/main.c
index d1e2a1e..fd79690 100644
--- a/programs/progman/main.c
+++ b/programs/progman/main.c
@@ -22,7 +22,6 @@
 #include <stdio.h>
 #include <string.h>
 #include "windows.h"
-#include "windowsx.h"
 #include "progman.h"
 
 GLOBALS Globals;
diff --git a/programs/progman/program.c b/programs/progman/program.c
index 783d415..d646545 100644
--- a/programs/progman/program.c
+++ b/programs/progman/program.c
@@ -22,7 +22,6 @@
 
 #include <string.h>
 #include "windows.h"
-#include "windowsx.h"
 #include "progman.h"
 
 /***********************************************************************
diff --git a/programs/winecfg/audio.c b/programs/winecfg/audio.c
index b677c2a..ba82e54 100644
--- a/programs/winecfg/audio.c
+++ b/programs/winecfg/audio.c
@@ -38,7 +38,6 @@
 #include <shlguid.h>
 #include <shlwapi.h>
 #include <shlobj.h>
-#include <windowsx.h>
 #include <mmsystem.h>
 #include <mmreg.h>
 #include <mmddk.h>
@@ -699,8 +698,8 @@ AudioDlgProc (HWND hDlg, UINT uMsg, WPAR
                   DWORD dwPos = GetMessagePos();
                   HWND tree = ((LPNMHDR)lParam)->hwndFrom;
                   ZeroMemory(&ht, sizeof(ht));
-                  ht.pt.x = GET_X_LPARAM(dwPos);
-                  ht.pt.y = GET_Y_LPARAM(dwPos);
+                  ht.pt.x = (short)LOWORD(dwPos);
+                  ht.pt.y = (short)HIWORD(dwPos);
                   MapWindowPoints(HWND_DESKTOP, tree, &ht.pt, 1);
                   SendMessageW( tree, TVM_HITTEST, 0, (LPARAM)&ht );
                   if (TVHT_ONITEMSTATEICON & ht.flags)
@@ -735,8 +734,8 @@ AudioDlgProc (HWND hDlg, UINT uMsg, WPAR
                   HWND tree = ((LPNMHDR)lParam)->hwndFrom;
                   POINT pt;
                   ZeroMemory(&ht, sizeof(ht));
-                  pt.x = GET_X_LPARAM(dwPos);
-                  pt.y = GET_Y_LPARAM(dwPos);
+                  pt.x = (short)LOWORD(dwPos);
+                  pt.y = (short)HIWORD(dwPos);
                   ht.pt = pt;
                   MapWindowPoints(HWND_DESKTOP, tree, &ht.pt, 1);
                   SendMessageW( tree, TVM_HITTEST, 0, (LPARAM)&ht );




More information about the wine-cvs mailing list