mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
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
This commit is contained in:
parent
0dfb900085
commit
33ce8924d2
1 changed files with 22 additions and 10 deletions
|
@ -1,9 +1,11 @@
|
|||
#include <windows.h>
|
||||
#include <ddrawi.h>
|
||||
#include <ddraw.h>
|
||||
|
||||
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,
|
||||
#else
|
||||
WS_POPUP,
|
||||
#endif
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
800,
|
||||
600,
|
||||
NULL, NULL,
|
||||
800,
|
||||
600,
|
||||
NULL, NULL,
|
||||
hInst, NULL);
|
||||
#else
|
||||
hwnd = CreateWindow("DDrawDemo",
|
||||
"ReactOS DirectDraw Demo",
|
||||
WS_POPUP,
|
||||
CW_USEDEFAULT,
|
||||
CW_USEDEFAULT,
|
||||
800,
|
||||
600,
|
||||
NULL, NULL,
|
||||
hInst, NULL);
|
||||
#endif
|
||||
|
||||
// Inizalize Ddraw
|
||||
if(Init(hwnd))
|
||||
|
|
Loading…
Reference in a new issue