ReactOS 0.4.16-dev-306-g647d351
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,
35 /* make sure we pass an invalid handle to GetMessage/PeekMessage */
36 ok(DestroyWindow(hWnd), "\n");
37
40}
void Test_PeekMessage(HWND hWnd)
void Test_GetMessage(HWND hWnd)
#define ok(value,...)
Definition: atltest.h:57
HWND hWnd
Definition: settings.c:17
#define NULL
Definition: types.h:112
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define L(x)
Definition: ntvdm.h:50
#define GetModuleHandle
Definition: winbase.h:3852
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 CW_USEDEFAULT
Definition: winuser.h:225
BOOL WINAPI DestroyWindow(_In_ 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}
#define msg(x)
Definition: auth_time.c:54
#define SetLastError(x)
Definition: compat.h:752
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define ERROR_INVALID_WINDOW_HANDLE
Definition: winerror.h:881
#define DNS_ERROR_RCODE_NXRRSET
Definition: winerror.h:1855
#define GetMessage
Definition: winuser.h:5802

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:5842
#define PM_NOREMOVE
Definition: winuser.h:1198

Referenced by START_TEST().