From 33ce8924d28d4ff22d166775972aa463b54e6062 Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Fri, 15 Jun 2007 14:46:18 +0000 Subject: [PATCH] Fix so our demo apps can be compile with vs, this mean we can now using our demo apps debug our ddraw.dll internal struct data or ms ddraw.dll internal struct data allot easy. svn path=/trunk/; revision=27190 --- rosapps/demos/ddraw/main.cpp | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/rosapps/demos/ddraw/main.cpp b/rosapps/demos/ddraw/main.cpp index f71be27ee30..b393aa7e132 100644 --- a/rosapps/demos/ddraw/main.cpp +++ b/rosapps/demos/ddraw/main.cpp @@ -1,9 +1,11 @@ #include +#include #include LPDIRECTDRAW7 DirectDraw = NULL; LPDIRECTDRAWSURFACE7 FrontBuffer = NULL; LPDIRECTDRAWCLIPPER Clipper = NULL; +LPDDRAWI_DIRECTDRAW_INT This = NULL; PCHAR DDErrorString (HRESULT hResult); LONG WINAPI WndProc (HWND hwnd, UINT message, UINT wParam, LONG lParam); @@ -26,6 +28,8 @@ bool Init (HWND hwnd) return 0; } + This = (LPDDRAWI_DIRECTDRAW_INT)DirectDraw; + // Set Fullscreen or windowed mode OutputDebugString("=> DDraw->SetCooperativeLevel\n"); @@ -143,7 +147,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, { MSG msg; WNDCLASS wndclass; - + HWND hwnd; Fullscreen = MessageBox(0, "Do you want to me to run in Fullscreen ?", 0, MB_YESNO) == IDYES; // Create windnow @@ -160,19 +164,27 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, RegisterClass(&wndclass); - HWND hwnd = CreateWindow("DDrawDemo", - "ReactOS DirectDraw Demo", #ifdef USE_CLIPPER + hwnd = CreateWindow("DDrawDemo", + "ReactOS DirectDraw Demo", Fullscreen ? WS_POPUP : WS_OVERLAPPEDWINDOW, + CW_USEDEFAULT, + CW_USEDEFAULT, + 800, + 600, + NULL, NULL, + hInst, NULL); #else - WS_POPUP, -#endif - CW_USEDEFAULT, + hwnd = CreateWindow("DDrawDemo", + "ReactOS DirectDraw Demo", + WS_POPUP, + CW_USEDEFAULT, CW_USEDEFAULT, - 800, - 600, - NULL, NULL, + 800, + 600, + NULL, NULL, hInst, NULL); +#endif // Inizalize Ddraw if(Init(hwnd)) -- 2.17.1