ReactOS  0.4.14-dev-342-gdc047f9
GetPeekMessage.c File Reference
#include "precomp.h"
Include dependency graph for GetPeekMessage.c:

Go to the source code of this file.

Functions

void Test_GetMessage (HWND hWnd)
 
void Test_PeekMessage (HWND hWnd)
 
 START_TEST (GetPeekMessage)
 

Function Documentation

◆ START_TEST()

START_TEST ( GetPeekMessage  )

Definition at line 30 of file GetPeekMessage.c.

31 {
32  HWND hWnd = CreateWindowExW(0, L"EDIT", L"miau", 0, CW_USEDEFAULT, CW_USEDEFAULT,
34  ok(hWnd != INVALID_HANDLE_VALUE, "\n");
35  /* make sure we pass an invalid handle to GetMessage/PeekMessage */
36  ok(DestroyWindow(hWnd), "\n");
37 
40 }
void Test_GetMessage(HWND hWnd)
HWND hWnd
Definition: settings.c:17
#define INVALID_HANDLE_VALUE
Definition: compat.h:399
BOOL WINAPI DestroyWindow(_In_ HWND)
#define CW_USEDEFAULT
Definition: winuser.h:225
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR L[]
Definition: oid.c:1250
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
#define GetModuleHandle
Definition: winbase.h:3651
#define ok(value,...)
Definition: atltest.h:57
void Test_PeekMessage(HWND hWnd)

◆ Test_GetMessage()

void Test_GetMessage ( HWND  hWnd)

Definition at line 10 of file GetPeekMessage.c.

11 {
12  MSG msg;
13 
15 
16  ok(GetMessage(&msg, hWnd, 0, 0) == -1, "\n");
17  ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "GetLastError() = %lu\n", GetLastError());
18 }
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
HWND hWnd
Definition: settings.c:17
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define ERROR_INVALID_WINDOW_HANDLE
Definition: winerror.h:881
#define SetLastError(x)
Definition: compat.h:417
#define DNS_ERROR_RCODE_NXRRSET
Definition: winerror.h:1855
#define ok(value,...)
Definition: atltest.h:57
#define GetMessage
Definition: winuser.h:5691
#define msg(x)
Definition: auth_time.c:54

Referenced by START_TEST().

◆ Test_PeekMessage()

void Test_PeekMessage ( HWND  hWnd)

Definition at line 20 of file GetPeekMessage.c.

21 {
22  MSG msg;
23 
25 
26  ok(PeekMessage(&msg, hWnd, 0, 0, PM_NOREMOVE) == 0, "\n");
27  ok(GetLastError() == ERROR_INVALID_WINDOW_HANDLE, "GetLastError() = %lu\n", GetLastError());
28 }
#define PeekMessage
Definition: winuser.h:5731
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
HWND hWnd
Definition: settings.c:17
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define PM_NOREMOVE
Definition: winuser.h:1181
#define ERROR_INVALID_WINDOW_HANDLE
Definition: winerror.h:881
#define SetLastError(x)
Definition: compat.h:417
#define DNS_ERROR_RCODE_NXRRSET
Definition: winerror.h:1855
#define ok(value,...)
Definition: atltest.h:57
#define msg(x)
Definition: auth_time.c:54

Referenced by START_TEST().