mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
[LOGON]
Fix formatting. No code changes. svn path=/trunk/; revision=58366
This commit is contained in:
@@ -31,60 +31,59 @@
|
||||
|
||||
#define RANDOM( min, max ) ((rand() % (int)(((max)+1) - (min))) + (min))
|
||||
|
||||
#define APPNAME _T("Logon")
|
||||
#define APP_TIMER 1
|
||||
#define APP_TIMER_INTERVAL 2000
|
||||
#define APPNAME _T("Logon")
|
||||
#define APP_TIMER 1
|
||||
#define APP_TIMER_INTERVAL 2000
|
||||
|
||||
HBITMAP GetScreenSaverBitmap (void)
|
||||
HBITMAP
|
||||
GetScreenSaverBitmap(VOID)
|
||||
{
|
||||
OSVERSIONINFOEX osvi;
|
||||
OSVERSIONINFOEX osvi;
|
||||
|
||||
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
|
||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||
GetVersionEx ((OSVERSIONINFO *) &osvi);
|
||||
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
|
||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||
GetVersionEx ((OSVERSIONINFO *) &osvi);
|
||||
|
||||
switch(osvi.wProductType)
|
||||
{
|
||||
case VER_NT_WORKSTATION:
|
||||
return LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_WORKSTATION), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
|
||||
break;
|
||||
default:
|
||||
return LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_SERVER), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
|
||||
break;
|
||||
}
|
||||
switch(osvi.wProductType)
|
||||
{
|
||||
case VER_NT_WORKSTATION:
|
||||
return LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_WORKSTATION), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
|
||||
break;
|
||||
default:
|
||||
return LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDB_SERVER), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
LRESULT CALLBACK
|
||||
LRESULT
|
||||
CALLBACK
|
||||
ScreenSaverProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static RECT rect;
|
||||
static HBITMAP bitmap;
|
||||
static RECT rect;
|
||||
static HBITMAP bitmap;
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case WM_CREATE:
|
||||
{
|
||||
bitmap = GetScreenSaverBitmap ();
|
||||
switch (message)
|
||||
{
|
||||
case WM_CREATE:
|
||||
{
|
||||
bitmap = GetScreenSaverBitmap ();
|
||||
if (bitmap == NULL)
|
||||
{
|
||||
MessageBox(hWnd,
|
||||
_T("Fatal Error: Could not load bitmap"),
|
||||
_T("Error"),
|
||||
MB_OK | MB_ICONEXCLAMATION);
|
||||
}
|
||||
|
||||
if(bitmap == NULL)
|
||||
{
|
||||
MessageBox(
|
||||
hWnd,
|
||||
_T("Fatal Error: Could not load bitmap"),
|
||||
_T("Error"),
|
||||
MB_OK | MB_ICONEXCLAMATION);
|
||||
}
|
||||
SetTimer(hWnd,
|
||||
APP_TIMER,
|
||||
APP_TIMER_INTERVAL,
|
||||
NULL);
|
||||
|
||||
SetTimer (
|
||||
hWnd,
|
||||
APP_TIMER,
|
||||
APP_TIMER_INTERVAL,
|
||||
NULL);
|
||||
|
||||
break;
|
||||
}
|
||||
case WM_PAINT:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case WM_PAINT:
|
||||
{
|
||||
BITMAP bm; /* Bitmap structure as seen in bmWidth & bmHeight */
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc;
|
||||
@@ -135,36 +134,40 @@ ScreenSaverProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
EndPaint(hWnd, &ps);
|
||||
break;
|
||||
}
|
||||
}
|
||||
case WM_TIMER:
|
||||
{
|
||||
InvalidateRect(hWnd, NULL, 1);
|
||||
break;
|
||||
}
|
||||
case WM_DESTROY:
|
||||
{
|
||||
KillTimer (hWnd, APP_TIMER);
|
||||
DeleteObject(bitmap);
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
}
|
||||
case WM_DESTROY:
|
||||
{
|
||||
KillTimer(hWnd, APP_TIMER);
|
||||
DeleteObject(bitmap);
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
// Pass Windows Messages to the default screensaver window procedure
|
||||
return DefScreenSaverProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL WINAPI ScreenSaverConfigureDialog(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
BOOL
|
||||
WINAPI
|
||||
ScreenSaverConfigureDialog(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// This function is only called one time before opening the configuration dialog.
|
||||
// Use it to show a message that no configuration is necesssary and return FALSE to indicate that no configuration dialog shall be opened.
|
||||
BOOL WINAPI RegisterDialogClasses(HANDLE hInst)
|
||||
BOOL
|
||||
WINAPI
|
||||
RegisterDialogClasses(HANDLE hInst)
|
||||
{
|
||||
TCHAR szMessage[256];
|
||||
TCHAR szTitle[25];
|
||||
|
||||
Reference in New Issue
Block a user