mirror of
https://github.com/reactos/reactos.git
synced 2025-08-01 23:42:56 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
69
modules/rostests/tests/capclock/capclock.c
Normal file
69
modules/rostests/tests/capclock/capclock.c
Normal file
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* DESCRIPTION: Simple Win32 Caption Clock
|
||||
* PROJECT : ReactOS (test applications)
|
||||
* AUTHOR : Emanuele Aliberti
|
||||
* DATE : 2003-09-03
|
||||
* LICENSE : GNU GPL v2.0
|
||||
*/
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
|
||||
UINT Timer = 1;
|
||||
|
||||
static INT_PTR CALLBACK DialogFunc(HWND,UINT,WPARAM,LPARAM);
|
||||
static VOID CALLBACK TimerProc(HWND,UINT,UINT_PTR,DWORD);
|
||||
|
||||
|
||||
INT WINAPI WinMain (HINSTANCE hinst, HINSTANCE hinstPrev, LPSTR lpCmdLine, INT nCmdShow)
|
||||
{
|
||||
WNDCLASS wc;
|
||||
|
||||
ZeroMemory (& wc, sizeof wc);
|
||||
wc.lpfnWndProc = DefDlgProc;
|
||||
wc.cbWndExtra = DLGWINDOWEXTRA;
|
||||
wc.hInstance = hinst;
|
||||
wc.hCursor = LoadCursor(NULL, (LPCTSTR)IDC_ARROW);
|
||||
wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
|
||||
wc.lpszClassName = "CapClock";
|
||||
RegisterClass (& wc);
|
||||
return DialogBox(hinst, MAKEINTRESOURCE(2), NULL, DialogFunc);
|
||||
|
||||
}
|
||||
static int InitializeApp (HWND hDlg,WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
Timer = SetTimer (hDlg,Timer,1000,TimerProc);
|
||||
TimerProc (hDlg,0,0,0);
|
||||
return 1;
|
||||
}
|
||||
static INT_PTR CALLBACK DialogFunc (HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
InitializeApp(hwndDlg,wParam,lParam);
|
||||
return TRUE;
|
||||
case WM_CLOSE:
|
||||
KillTimer (hwndDlg,Timer);
|
||||
EndDialog(hwndDlg,0);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
static VOID CALLBACK TimerProc (HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
|
||||
{
|
||||
CHAR text [20];
|
||||
SYSTEMTIME lt;
|
||||
|
||||
GetLocalTime (& lt);
|
||||
wsprintf (
|
||||
text,
|
||||
"%d-%02d-%02d %02d:%02d:%02d",
|
||||
lt.wYear,
|
||||
lt.wMonth,
|
||||
lt.wDay,
|
||||
lt.wHour,
|
||||
lt.wMinute,
|
||||
lt.wSecond);
|
||||
SetWindowText (hwnd, text);
|
||||
}
|
||||
/* EOF */
|
BIN
modules/rostests/tests/capclock/capclock.ico
Normal file
BIN
modules/rostests/tests/capclock/capclock.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 766 B |
18
modules/rostests/tests/capclock/capclock.rc
Normal file
18
modules/rostests/tests/capclock/capclock.rc
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include <windows.h>
|
||||
|
||||
#define REACTOS_STR_FILE_DESCRIPTION "ReactOS W32 Caption Clock\0"
|
||||
#define REACTOS_STR_INTERNAL_NAME "capclock\0"
|
||||
#define REACTOS_STR_ORIGINAL_FILENAME "capclock.exe\0"
|
||||
#include <reactos/version.rc>
|
||||
|
||||
/* Icons */
|
||||
|
||||
1 ICON "capclock.ico"
|
||||
|
||||
/* Dialogs */
|
||||
|
||||
2 DIALOG 6, 18, 132, 0
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
FONT 8, "Microsoft Sans Serif"
|
||||
BEGIN
|
||||
END
|
Loading…
Add table
Add a link
Reference in a new issue