ReactOS 0.4.15-dev-7704-gc07eb9f
d3dtest.c File Reference
#include "precomp.h"
#include <stdio.h>
Include dependency graph for d3dtest.c:

Go to the source code of this file.

Macros

#define WIDTH   800
 
#define HEIGHT   600
 

Functions

BOOL D3D7Test (HWND hWnd)
 
BOOL D3D8Test (HWND hWnd)
 
BOOL D3D9Test (HWND hWnd)
 
BOOL StartD3DTest (HWND hWnd, HINSTANCE hInstance, WCHAR *pszCaption, INT TestNr)
 
static LRESULT CALLBACK WindowProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
VOID D3DTests ()
 

Macro Definition Documentation

◆ HEIGHT

#define HEIGHT   600

Definition at line 14 of file d3dtest.c.

◆ WIDTH

#define WIDTH   800

Definition at line 13 of file d3dtest.c.

Function Documentation

◆ D3D7Test()

BOOL D3D7Test ( HWND  hWnd)

Definition at line 11 of file d3dtest7.c.

12{
13 return FALSE;
14}
#define FALSE
Definition: types.h:117

Referenced by StartD3DTest().

◆ D3D8Test()

BOOL D3D8Test ( HWND  hWnd)

Definition at line 11 of file d3dtest8.c.

12{
13 return FALSE;
14}

Referenced by StartD3DTest().

◆ D3D9Test()

BOOL D3D9Test ( HWND  hWnd)

Definition at line 11 of file d3dtest9.c.

12{
13 return FALSE;
14}

Referenced by StartD3DTest().

◆ D3DTests()

VOID D3DTests ( )

Definition at line 73 of file d3dtest.c.

74{
75 WNDCLASSEX winClass;
76 HWND hWnd;
79 WCHAR szCaption[256];
80
81 winClass.cbSize = sizeof(WNDCLASSEX);
83 winClass.lpfnWndProc = WindowProc;
84 winClass.cbClsExtra = 0;
85 winClass.cbWndExtra = 0;
86 winClass.hInstance = hInstance;
87 winClass.hIcon = 0;
88 winClass.hCursor = 0;
89 winClass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
90 winClass.lpszMenuName = NULL;
91 winClass.lpszClassName = L"d3dtest";
93
94 if (!RegisterClassEx(&winClass))
95 return;
96
98 0,
99 winClass.lpszClassName,
100 NULL,
101 WS_POPUP,
104 WIDTH,
105 HEIGHT,
106 NULL,
107 NULL,
108 hInstance,
109 NULL);
110
111 if (!hWnd)
112 goto cleanup;
113
115 LoadStringW(hInstance, IDS_MAIN_DIALOG, szCaption, sizeof(szCaption) / sizeof(WCHAR));
117 goto cleanup;
118
119 StartD3DTest(hWnd, hInstance, szCaption, 7);
120 StartD3DTest(hWnd, hInstance, szCaption, 8);
121 StartD3DTest(hWnd, hInstance, szCaption, 9);
122
123cleanup:
126}
HWND hWnd
Definition: settings.c:17
#define IDS_D3DTEST_DESCRIPTION
Definition: resource.h:153
#define IDS_MAIN_DIALOG
Definition: resource.h:103
HINSTANCE hInstance
Definition: charmap.c:19
#define WIDTH
Definition: d3dtest.c:13
BOOL StartD3DTest(HWND hWnd, HINSTANCE hInstance, WCHAR *pszCaption, INT TestNr)
Definition: d3dtest.c:20
static LRESULT CALLBACK WindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: d3dtest.c:68
#define HEIGHT
Definition: d3dtest.c:14
#define NULL
Definition: types.h:112
static const WCHAR szDescription[]
Definition: provider.c:55
static void cleanup(void)
Definition: main.c:1335
#define L(x)
Definition: ntvdm.h:50
#define WS_POPUP
Definition: pedump.c:616
int cbClsExtra
Definition: winuser.h:3203
HINSTANCE hInstance
Definition: winuser.h:3205
HCURSOR hCursor
Definition: winuser.h:3207
LPCSTR lpszMenuName
Definition: winuser.h:3209
HICON hIconSm
Definition: winuser.h:3211
UINT style
Definition: winuser.h:3201
int cbWndExtra
Definition: winuser.h:3204
UINT cbSize
Definition: winuser.h:3200
WNDPROC lpfnWndProc
Definition: winuser.h:3202
LPCSTR lpszClassName
Definition: winuser.h:3210
HICON hIcon
Definition: winuser.h:3206
HBRUSH hbrBackground
Definition: winuser.h:3208
#define GetModuleHandle
Definition: winbase.h:3762
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define BLACK_BRUSH
Definition: wingdi.h:896
#define CS_VREDRAW
Definition: winuser.h:658
#define CreateWindowEx
Definition: winuser.h:5754
#define SM_CYSCREEN
Definition: winuser.h:959
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define CS_HREDRAW
Definition: winuser.h:653
#define UnregisterClass
Definition: winuser.h:5860
#define CS_DBLCLKS
Definition: winuser.h:651
#define MB_YESNO
Definition: winuser.h:816
#define IDI_APPLICATION
Definition: winuser.h:704
#define RegisterClassEx
Definition: winuser.h:5836
#define IDNO
Definition: winuser.h:835
#define LoadIcon
Definition: winuser.h:5812
WNDCLASSEXA WNDCLASSEX
Definition: winuser.h:5718
#define MB_ICONQUESTION
Definition: winuser.h:788
#define MessageBox
Definition: winuser.h:5821
#define CS_OWNDC
Definition: winuser.h:655
#define SM_CXSCREEN
Definition: winuser.h:958
BOOL WINAPI DestroyWindow(_In_ HWND)
int WINAPI GetSystemMetrics(_In_ int)
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by DisplayPageWndProc().

◆ StartD3DTest()

BOOL StartD3DTest ( HWND  hWnd,
HINSTANCE  hInstance,
WCHAR pszCaption,
INT  TestNr 
)

Definition at line 20 of file d3dtest.c.

21{
22 WCHAR szTestDescriptionRaw[256];
23 WCHAR szTestDescription[256];
24 WCHAR szCaption[256];
25 WCHAR szResult[256];
26 WCHAR szError[256];
28
29 LoadStringW(hInstance, IDS_MAIN_DIALOG, szCaption, sizeof(szCaption) / sizeof(WCHAR));
30 LoadStringW(hInstance, IDS_DDTEST_ERROR, szError, sizeof(szError) / sizeof(WCHAR));
31 LoadStringW(hInstance, IDS_D3DTEST_D3Dx, szTestDescriptionRaw, sizeof(szTestDescriptionRaw) / sizeof(WCHAR));
32 //LoadStringW(hInstance, resResult, szResult, sizeof(szResult) / sizeof(WCHAR));
33
34 swprintf(szTestDescription, szTestDescriptionRaw, TestNr);
35 if (MessageBox(NULL, szTestDescription, szCaption, MB_YESNO | MB_ICONQUESTION) == IDNO)
36 return FALSE;
37
39
40 switch(TestNr){
41 case 7:
43 break;
44 case 8:
46 break;
47 case 9:
49 break;
50 default:
51 Result = FALSE;
52 }
53
55
56 if(!Result)
57 {
58 MessageBox(NULL, szError, szCaption, MB_OK | MB_ICONERROR);
59 return FALSE;
60 }
61
62 if(MessageBox(NULL, szResult, szCaption, MB_YESNO | MB_ICONQUESTION) == IDYES)
63 return TRUE;
64
65 return FALSE;
66}
#define IDS_DDTEST_ERROR
Definition: resource.h:141
#define IDS_D3DTEST_D3Dx
Definition: resource.h:154
BOOL D3D8Test(HWND hWnd)
Definition: d3dtest8.c:11
BOOL D3D9Test(HWND hWnd)
Definition: d3dtest9.c:11
BOOL D3D7Test(HWND hWnd)
Definition: d3dtest7.c:11
#define TRUE
Definition: types.h:120
#define swprintf
Definition: precomp.h:40
unsigned int BOOL
Definition: ntddk_ex.h:94
#define SW_HIDE
Definition: winuser.h:767
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define MB_ICONERROR
Definition: winuser.h:786
#define MB_OK
Definition: winuser.h:789
#define SW_SHOW
Definition: winuser.h:774
#define IDYES
Definition: winuser.h:834
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409

Referenced by D3DTests().

◆ WindowProc()

static LRESULT CALLBACK WindowProc ( HWND  hWnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 68 of file d3dtest.c.

69{
71}
#define msg(x)
Definition: auth_time.c:54
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define DefWindowProc
Definition: ros2win.h:31

Referenced by D3DTests().