Mike McCormack : winmine: Use WIN32_LEAN_AND_MEAN.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Jan 19 05:46:37 CST 2006


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

Author: Mike McCormack <mike at codeweavers.com>
Date:   Thu Jan 19 12:39:28 2006 +0100

winmine: Use WIN32_LEAN_AND_MEAN.

---

 programs/winemine/dialog.c |    2 ++
 programs/winemine/main.c   |   12 +++++++-----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/programs/winemine/dialog.c b/programs/winemine/dialog.c
index fd08440..c517162 100644
--- a/programs/winemine/dialog.c
+++ b/programs/winemine/dialog.c
@@ -18,6 +18,8 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#define WIN32_LEAN_AND_MEAN
+
 #include <windows.h>
 #include "main.h"
 #include "dialog.h"
diff --git a/programs/winemine/main.c b/programs/winemine/main.c
index 62a0635..abd6752 100644
--- a/programs/winemine/main.c
+++ b/programs/winemine/main.c
@@ -18,10 +18,12 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#define WIN32_LEAN_AND_MEAN
+
 #include <string.h>
 #include <time.h>
 #include <windows.h>
-#include <windowsx.h>
+#include <stdlib.h>
 #include "main.h"
 #include "dialog.h"
 #include "resource.h"
@@ -55,13 +57,13 @@ int WINAPI WinMain( HINSTANCE hInst, HIN
     wc.lpszMenuName = "MENU_WINEMINE";
     wc.lpszClassName = appname;
 
-    if (!RegisterClass(&wc)) exit(1);
+    if (!RegisterClass(&wc)) ExitProcess(1);
     hWnd = CreateWindow( appname, appname,
 	wnd_style,
         CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
         0, 0, hInst, NULL );
 
-    if (!hWnd) exit(1);
+    if (!hWnd) ExitProcess(1);
 
     ShowWindow( hWnd, cmdshow );
     UpdateWindow( hWnd );
@@ -111,8 +113,8 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT
 
     case WM_MOVE:
         WINE_TRACE("WM_MOVE\n");
-	board.pos.x = GET_X_LPARAM(lParam);
-	board.pos.y = GET_Y_LPARAM(lParam);
+        board.pos.x = (short)LOWORD(lParam);
+        board.pos.y = (short)HIWORD(lParam);
         return 0;
 
     case WM_DESTROY:




More information about the wine-cvs mailing list