ReactOS 0.4.15-dev-7670-g69b08be
PaintDesktop.c File Reference
#include <windows.h>
Include dependency graph for PaintDesktop.c:

Go to the source code of this file.

Macros

#define WIN32_LEAN_AND_MEAN
 

Functions

ATOM MyRegisterClass (HINSTANCE hInstance)
 
BOOL InitInstance (HINSTANCE, int)
 
LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM)
 
int APIENTRY wWinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow)
 

Variables

static HINSTANCE hInst
 
static PWSTR szTitle = L"PaintDesktop"
 
static PWSTR szWindowClass = L"PAINTDESKTOP"
 

Macro Definition Documentation

◆ WIN32_LEAN_AND_MEAN

#define WIN32_LEAN_AND_MEAN

Definition at line 14 of file PaintDesktop.c.

Function Documentation

◆ InitInstance()

BOOL InitInstance ( HINSTANCE  hInstance,
int  nCmdShow 
)

Definition at line 67 of file PaintDesktop.c.

68{
69 HWND hWnd;
70
72
75 if (!hWnd)
76 return FALSE;
77
78 ShowWindow(hWnd, nCmdShow);
80
81 return TRUE;
82}
static HINSTANCE hInst
Definition: PaintDesktop.c:17
static PWSTR szWindowClass
Definition: PaintDesktop.c:19
static PWSTR szTitle
Definition: PaintDesktop.c:18
HWND hWnd
Definition: settings.c:17
HINSTANCE hInstance
Definition: charmap.c:19
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define CreateWindow
Definition: winuser.h:5753
BOOL WINAPI UpdateWindow(_In_ HWND)
#define CW_USEDEFAULT
Definition: winuser.h:225

Referenced by wWinMain().

◆ MyRegisterClass()

ATOM MyRegisterClass ( HINSTANCE  hInstance)

Definition at line 49 of file PaintDesktop.c.

50{
51 WNDCLASS wc;
52
53 wc.style = 0;
55 wc.cbClsExtra = 0;
56 wc.cbWndExtra = 0;
60 wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
61 wc.lpszMenuName = NULL;
63
64 return RegisterClass(&wc);
65}
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM)
Definition: PaintDesktop.c:84
HBRUSH hbrBackground
Definition: winuser.h:3169
HICON hIcon
Definition: winuser.h:3167
HINSTANCE hInstance
Definition: winuser.h:3166
HCURSOR hCursor
Definition: winuser.h:3168
int cbWndExtra
Definition: winuser.h:3165
UINT style
Definition: winuser.h:3162
LPCSTR lpszMenuName
Definition: winuser.h:3170
LPCSTR lpszClassName
Definition: winuser.h:3171
WNDPROC lpfnWndProc
Definition: winuser.h:3163
int cbClsExtra
Definition: winuser.h:3164
#define COLOR_WINDOW
Definition: winuser.h:917
#define IDC_ARROW
Definition: winuser.h:687
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2088
#define IDI_WINLOGO
Definition: winuser.h:709
#define RegisterClass
Definition: winuser.h:5835
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2058

Referenced by wWinMain().

◆ WndProc()

LRESULT CALLBACK WndProc ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 84 of file PaintDesktop.c.

85{
86 switch (message)
87 {
88 case WM_MOVE:
91 break;
92
93 case WM_ERASEBKGND:
95
96 case WM_DESTROY:
98 break;
99
100 default:
102 }
103
104 return 0;
105}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static HDC
Definition: imagelist.c:92
#define DefWindowProc
Definition: ros2win.h:31
Definition: tftpd.h:60
LONG_PTR LRESULT
Definition: windef.h:209
#define WM_ERASEBKGND
Definition: winuser.h:1624
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
BOOL WINAPI PaintDesktop(_In_ HDC)
#define WM_MOVE
Definition: winuser.h:1609
#define WM_DESTROY
Definition: winuser.h:1608
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)

Referenced by MyRegisterClass().

◆ wWinMain()

int APIENTRY wWinMain ( HINSTANCE  hInstance,
HINSTANCE  hPrevInstance,
LPWSTR  lpCmdLine,
int  nShowCmd 
)

This file has no copyright assigned and is placed in the Public Domain. This file is part of the w64 mingw-runtime package. No warranty is given; refer to the file DISCLAIMER.PD within this package.

Definition at line 25 of file PaintDesktop.c.

29{
30 MSG msg;
31
32 UNREFERENCED_PARAMETER(hPrevInstance);
33 UNREFERENCED_PARAMETER(lpCmdLine);
34
36
37 if (!InitInstance (hInstance, nCmdShow))
38 return FALSE;
39
40 while (GetMessage(&msg, NULL, 0, 0))
41 {
44 }
45
46 return (int) msg.wParam;
47}
BOOL InitInstance(HINSTANCE, int)
Definition: PaintDesktop.c:67
ATOM MyRegisterClass(HINSTANCE hInstance)
Definition: PaintDesktop.c:49
#define msg(x)
Definition: auth_time.c:54
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define GetMessage
Definition: winuser.h:5789
#define DispatchMessage
Definition: winuser.h:5764

Variable Documentation

◆ hInst

HINSTANCE hInst
static

Definition at line 17 of file PaintDesktop.c.

Referenced by InitInstance().

◆ szTitle

PWSTR szTitle = L"PaintDesktop"
static

Definition at line 18 of file PaintDesktop.c.

Referenced by InitInstance().

◆ szWindowClass

PWSTR szWindowClass = L"PAINTDESKTOP"
static

Definition at line 19 of file PaintDesktop.c.

Referenced by InitInstance(), and MyRegisterClass().