ReactOS  0.4.15-dev-5142-g967f5b9
logonui.c File Reference
#include "logonui.h"
Include dependency graph for logonui.c:

Go to the source code of this file.

Functions

static HDC DrawBaseBackground (HDC hdcDesktop)
 
static VOID DrawLogoffScreen (HDC hdcMem)
 
static BOOL ParseCmdline (int argc, WCHAR *argv[])
 
static VOID Run (VOID)
 
int WINAPI wWinMain (IN HINSTANCE hInst, IN HINSTANCE hPrevInstance, IN LPWSTR lpszCmdLine, IN int nCmdShow)
 

Variables

PINFO g_pInfo = NULL
 

Function Documentation

◆ DrawBaseBackground()

static HDC DrawBaseBackground ( HDC  hdcDesktop)
static

Definition at line 24 of file logonui.c.

25 {
26  HDC hdcMem;
27 
28  hdcMem = NT5_DrawBaseBackground(hdcDesktop);
29 
30  return hdcMem;
31 }
static HDC
Definition: imagelist.c:92
HDC NT5_DrawBaseBackground(HDC hdcDesktop)
Definition: NT5design.c:136
HDC hdcMem
Definition: welcome.c:104

Referenced by Run().

◆ DrawLogoffScreen()

static VOID DrawLogoffScreen ( HDC  hdcMem)
static

Definition at line 34 of file logonui.c.

35 {
36  /* Draw the logoff icon */
37  NT5_CreateLogoffScreen(L"Saving your settings...", hdcMem);
38 }
#define L(x)
Definition: ntvdm.h:50
VOID NT5_CreateLogoffScreen(LPWSTR lpText, HDC hdcMem)
Definition: NT5design.c:125
HDC hdcMem
Definition: welcome.c:104

Referenced by Run().

◆ ParseCmdline()

static BOOL ParseCmdline ( int  argc,
WCHAR argv[] 
)
static

Definition at line 88 of file logonui.c.

89 {
90  return TRUE;
91 }
#define TRUE
Definition: types.h:120

Referenced by wWinMain().

◆ Run()

static VOID Run ( VOID  )
static

Definition at line 94 of file logonui.c.

95 {
96  HWND hDesktopWnd;
97  HDC hdcDesktop, hdcMem;
98 
99  /* Get the screen size */
102 
103  hDesktopWnd = GetDesktopWindow();
104 
105  /* Get the DC for the desktop */
106  hdcDesktop = GetDCEx(hDesktopWnd, NULL, DCX_CACHE);
107  if (hdcDesktop)
108  {
109  /* Initialize the base background onto a DC */
110  hdcMem = DrawBaseBackground(hdcDesktop);
111  if (hdcMem)
112  {
113  /* TEST : Draw logoff screen */
115 
116  /* Blit the off-screen DC to the desktop */
117  BitBlt(hdcDesktop,
118  0,
119  0,
120  g_pInfo->cx,
121  g_pInfo->cy,
122  hdcMem,
123  0,
124  0,
125  SRCCOPY);
126 
127  /* Delete the memory DC */
128  DeleteDC(hdcMem);
129  }
130 
131  /* Release the desktop DC */
132  ReleaseDC(hDesktopWnd, hdcDesktop);
133  }
134 }
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
static HDC
Definition: imagelist.c:92
INT cx
Definition: logonui.h:9
#define SM_CXSCREEN
Definition: winuser.h:953
static HDC DrawBaseBackground(HDC hdcDesktop)
Definition: logonui.c:24
INT cy
Definition: logonui.h:10
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:656
#define SM_CYSCREEN
Definition: winuser.h:954
int WINAPI GetSystemMetrics(_In_ int)
#define DCX_CACHE
Definition: winuser.h:2104
static VOID DrawLogoffScreen(HDC hdcMem)
Definition: logonui.c:34
PINFO g_pInfo
Definition: logonui.c:17
BOOL WINAPI DeleteDC(_In_ HDC)
#define NULL
Definition: types.h:112
#define SRCCOPY
Definition: wingdi.h:333
HDC hdcMem
Definition: welcome.c:104
static VOID NTAPI BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
Definition: common.c:49

Referenced by wWinMain().

◆ wWinMain()

int WINAPI wWinMain ( IN HINSTANCE  hInst,
IN HINSTANCE  hPrevInstance,
IN LPWSTR  lpszCmdLine,
IN int  nCmdShow 
)

Definition at line 137 of file logonui.c.

141 {
142  LPWSTR *lpArgs;
143  INT NumArgs;
144 
145  /* Allocate memory for the data */
148  sizeof(INFO));
149  if (!g_pInfo) return -1;
150 
152 
153  /* Get the command line args */
154  lpArgs = CommandLineToArgvW(lpszCmdLine, &NumArgs);
155  if (lpArgs)
156  {
157  /* Parse the command line */
158  if (ParseCmdline(NumArgs, lpArgs))
159  {
160  /* Start the main routine */
161  Run();
162  }
163  }
164 
165  /* Free the data */
167  0,
168  g_pInfo);
169 
170  return 0;
171 }
struct _INFO * PINFO
static VOID Run(VOID)
Definition: logonui.c:94
HINSTANCE hInstance
Definition: logonui.h:8
int32_t INT
Definition: typedefs.h:58
LPWSTR *WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int *numargs)
Definition: shell32_main.c:80
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
HINSTANCE hInst
Definition: dxdiag.c:13
PINFO g_pInfo
Definition: logonui.c:17
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define INFO(fmt,...)
Definition: debug.h:13
static BOOL ParseCmdline(int argc, WCHAR *argv[])
Definition: logonui.c:88
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:594

Variable Documentation

◆ g_pInfo

PINFO g_pInfo = NULL