Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
64852f4b
Commit
64852f4b
authored
Jul 11, 2003
by
Richard Cohen
Committed by
Alexandre Julliard
Jul 11, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make indentation consistent (4 chars).
parent
9d59fb72
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
27 deletions
+23
-27
language.c
programs/clock/language.c
+6
-10
main.c
programs/clock/main.c
+9
-9
winclock.c
programs/clock/winclock.c
+8
-8
No files found.
programs/clock/language.c
View file @
64852f4b
...
...
@@ -27,8 +27,8 @@
CHAR
STRING_MENU_Xx
[]
=
"MENU_Xx"
;
VOID
LANGUAGE_UpdateMenuCheckmarks
(
VOID
)
{
VOID
LANGUAGE_UpdateMenuCheckmarks
(
VOID
)
{
if
(
Globals
.
bAnalog
==
TRUE
)
{
/* analog clock */
...
...
@@ -42,7 +42,6 @@ VOID LANGUAGE_UpdateMenuCheckmarks(VOID) {
}
else
{
/* digital clock */
CheckMenuItem
(
Globals
.
hPropertiesMenu
,
0x100
,
...
...
@@ -51,7 +50,6 @@ VOID LANGUAGE_UpdateMenuCheckmarks(VOID) {
MF_BYCOMMAND
|
MF_CHECKED
);
EnableMenuItem
(
Globals
.
hPropertiesMenu
,
0x103
,
MF_BYCOMMAND
);
}
CheckMenuItem
(
Globals
.
hPropertiesMenu
,
0x105
,
MF_BYCOMMAND
|
...
...
@@ -64,8 +62,8 @@ VOID LANGUAGE_UpdateMenuCheckmarks(VOID) {
(
Globals
.
bDate
?
MF_CHECKED
:
MF_UNCHECKED
));
}
VOID
LANGUAGE_UpdateWindowCaption
(
VOID
)
{
VOID
LANGUAGE_UpdateWindowCaption
(
VOID
)
{
CHAR
szCaption
[
MAX_STRING_LEN
];
CHAR
szDate
[
MAX_STRING_LEN
];
...
...
@@ -85,16 +83,13 @@ VOID LANGUAGE_UpdateWindowCaption(VOID) {
lstrcat
(
szCaption
,
szDate
);
}
SetWindowText
(
Globals
.
hMainWnd
,
szCaption
);
}
VOID
LANGUAGE_LoadMenus
(
VOID
)
{
CHAR
szItem
[
MAX_STRING_LEN
];
HMENU
hMainMenu
;
/* Create menu */
hMainMenu
=
LoadMenu
(
Globals
.
hInstance
,
MAKEINTRESOURCE
(
MAIN_MENU
));
Globals
.
hPropertiesMenu
=
GetSubMenu
(
hMainMenu
,
0
);
...
...
@@ -125,7 +120,8 @@ VOID LANGUAGE_DefaultHandle(WPARAM wParam)
{
if ((wParam >=CL_FIRST_LANGUAGE) && (wParam<=CL_LAST_LANGUAGE))
LANGUAGE_SelectByNumber(wParam - CL_FIRST_LANGUAGE);
else printf("Unimplemented menu command %i\n", wParam);
else
printf("Unimplemented menu command %i\n", wParam);
}
*/
...
...
programs/clock/main.c
View file @
64852f4b
...
...
@@ -48,8 +48,8 @@ CLOCK_GLOBALS Globals;
int
CLOCK_MenuCommand
(
WPARAM
wParam
)
{
CHAR
szApp
[
MAX_STRING_LEN
];
CHAR
szAppRelease
[
MAX_STRING_LEN
];
CHAR
szApp
[
MAX_STRING_LEN
];
CHAR
szAppRelease
[
MAX_STRING_LEN
];
switch
(
wParam
)
{
/* switch to analog */
case
0x100
:
{
...
...
@@ -116,15 +116,16 @@ CHAR szAppRelease[MAX_STRING_LEN];
break
;
}
/* Handle languages */
/* default:
/*
default:
LANGUAGE_DefaultHandle(wParam);
*/
*/
}
return
0
;
}
VOID
MAIN_FileChooseFont
(
VOID
)
{
VOID
MAIN_FileChooseFont
(
VOID
)
{
CHOOSEFONT
font
;
LOGFONT
lf
;
...
...
@@ -147,7 +148,6 @@ VOID MAIN_FileChooseFont(VOID) {
if
(
ChooseFont
(
&
font
))
{
/* do nothing yet */
}
}
/***********************************************************************
...
...
@@ -243,8 +243,8 @@ int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show
Globals
.
hMainIcon
=
ExtractIcon
(
Globals
.
hInstance
,
Globals
.
lpszIcoFile
,
0
);
if
(
!
Globals
.
hMainIcon
)
Globals
.
hMainIcon
=
LoadIcon
(
0
,
MAKEINTRESOURCE
(
DEFAULTICON
));
if
(
!
Globals
.
hMainIcon
)
Globals
.
hMainIcon
=
LoadIcon
(
0
,
MAKEINTRESOURCE
(
DEFAULTICON
));
if
(
!
prev
){
class
.
style
=
CS_HREDRAW
|
CS_VREDRAW
;
...
...
programs/clock/winclock.c
View file @
64852f4b
...
...
@@ -42,7 +42,8 @@ int nLastSecond = 60;
HandData
OldSecond
,
OldHour
,
OldMinute
;
int
MiddleX
(
void
)
{
int
MiddleX
(
void
)
{
int
X
,
diff
;
X
=
(
Globals
.
MaxX
/
2
);
...
...
@@ -51,7 +52,8 @@ int MiddleX(void) {
return
X
;
}
int
MiddleY
(
void
)
{
int
MiddleY
(
void
)
{
int
Y
,
diff
;
Y
=
(
Globals
.
MaxY
/
2
);
...
...
@@ -168,8 +170,8 @@ BOOL UpdateSecondHand(HDC dc,int MidX,int MidY,int XExt,int YExt,WORD Pos)
return
rv
;
}
void
DigitalClock
(
HDC
dc
)
{
void
DigitalClock
(
HDC
dc
)
{
CHAR
szTime
[
MAX_STRING_LEN
];
LPSTR
time
=
szTime
;
static
short
xChar
,
yChar
;
...
...
@@ -190,13 +192,12 @@ void DigitalClock(HDC dc) {
yChar
=
100
;
TextOut
(
dc
,
xChar
,
yChar
,
szTime
,
strlen
(
szTime
));
DeleteObject
(
SelectObject
(
dc
,
GetStockObject
(
NULL_PEN
)));
}
void
AnalogClock
(
HDC
dc
)
{
void
AnalogClock
(
HDC
dc
)
{
SYSTEMTIME
st
;
WORD
H
,
M
,
S
,
F
;
int
MidX
,
MidY
,
DiffX
,
DiffY
;
...
...
@@ -231,7 +232,6 @@ void AnalogClock(HDC dc) {
DrawHourHand
(
dc
);
}
DeleteObject
(
SelectObject
(
dc
,
GetStockObject
(
NULL_PEN
)));
}
void
Idle
(
HDC
idc
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment