ReactOS  0.4.14-dev-49-gfb4591c
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 
71  hInst = hInstance;
72 
75  if (!hWnd)
76  return FALSE;
77 
78  ShowWindow(hWnd, nCmdShow);
80 
81  return TRUE;
82 }
#define TRUE
Definition: types.h:120
#define CreateWindow
Definition: winuser.h:5655
BOOL WINAPI UpdateWindow(_In_ HWND)
HWND hWnd
Definition: settings.c:17
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
HINSTANCE hInstance
Definition: charmap.c:20
#define CW_USEDEFAULT
Definition: winuser.h:225
smooth NULL
Definition: ftsmooth.c:416
static PWSTR szTitle
Definition: PaintDesktop.c:18
static HINSTANCE hInst
Definition: PaintDesktop.c:17
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
static PWSTR szWindowClass
Definition: PaintDesktop.c:19

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;
54  wc.lpfnWndProc = WndProc;
55  wc.cbClsExtra = 0;
56  wc.cbWndExtra = 0;
57  wc.hInstance = hInstance;
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
int cbClsExtra
Definition: winuser.h:3139
LPCSTR lpszMenuName
Definition: winuser.h:3145
HBRUSH hbrBackground
Definition: winuser.h:3144
#define COLOR_WINDOW
Definition: winuser.h:908
int cbWndExtra
Definition: winuser.h:3140
HINSTANCE hInstance
Definition: charmap.c:20
HCURSOR hCursor
Definition: winuser.h:3143
smooth NULL
Definition: ftsmooth.c:416
#define IDI_WINLOGO
Definition: winuser.h:704
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2074
LPCSTR lpszClassName
Definition: winuser.h:3146
UINT style
Definition: winuser.h:3137
HINSTANCE hInstance
Definition: winuser.h:3141
WNDPROC lpfnWndProc
Definition: winuser.h:3138
#define IDC_ARROW
Definition: winuser.h:682
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
Definition: cursoricon.c:2044
#define RegisterClass
Definition: winuser.h:5737
static PWSTR szWindowClass
Definition: PaintDesktop.c:19
HICON hIcon
Definition: winuser.h:3142

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:
94  return (LRESULT)PaintDesktop((HDC)wParam);
95 
96  case WM_DESTROY:
97  PostQuitMessage(0);
98  break;
99 
100  default:
102  }
103 
104  return 0;
105 }
Definition: tftpd.h:59
#define TRUE
Definition: types.h:120
static HDC
Definition: imagelist.c:92
BOOL WINAPI UpdateWindow(_In_ HWND)
HWND hWnd
Definition: settings.c:17
#define WM_MOVE
Definition: winuser.h:1592
WPARAM wParam
Definition: combotst.c:138
smooth NULL
Definition: ftsmooth.c:416
#define DefWindowProc
Definition: ros2win.h:31
#define WM_DESTROY
Definition: winuser.h:1591
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
BOOL WINAPI PaintDesktop(_In_ HDC)
#define WM_ERASEBKGND
Definition: winuser.h:1607
LONG_PTR LRESULT
Definition: windef.h:209
LPARAM lParam
Definition: combotst.c:139
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)

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 }
#define DispatchMessage
Definition: winuser.h:5666
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
HINSTANCE hInstance
Definition: charmap.c:20
smooth NULL
Definition: ftsmooth.c:416
BOOL InitInstance(HINSTANCE, int)
Definition: PaintDesktop.c:67
ATOM MyRegisterClass(HINSTANCE hInstance)
Definition: PaintDesktop.c:49
#define GetMessage
Definition: winuser.h:5691
#define msg(x)
Definition: auth_time.c:54

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().