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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
344 additions
and
348 deletions
+344
-348
language.c
programs/clock/language.c
+41
-45
main.c
programs/clock/main.c
+142
-142
winclock.c
programs/clock/winclock.c
+161
-161
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 */
...
...
@@ -40,9 +40,8 @@ VOID LANGUAGE_UpdateMenuCheckmarks(VOID) {
EnableMenuItem
(
Globals
.
hPropertiesMenu
,
0x103
,
MF_BYCOMMAND
|
MF_GRAYED
);
}
else
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,68 +62,66 @@ VOID LANGUAGE_UpdateMenuCheckmarks(VOID) {
(
Globals
.
bDate
?
MF_CHECKED
:
MF_UNCHECKED
));
}
VOID
LANGUAGE_UpdateWindowCaption
(
VOID
)
{
CHAR
szCaption
[
MAX_STRING_LEN
];
CHAR
szDate
[
MAX_STRING_LEN
];
LPSTR
date
=
szDate
;
VOID
LANGUAGE_UpdateWindowCaption
(
VOID
)
{
CHAR
szCaption
[
MAX_STRING_LEN
];
CHAR
szDate
[
MAX_STRING_LEN
];
SYSTEMTIME
st
;
LPSYSTEMTIME
lpst
=
&
st
;
LPSTR
date
=
szDate
;
GetLocalTime
(
&
st
);
GetDateFormat
(
LOCALE_USER_DEFAULT
,
LOCALE_SLONGDATE
,
lpst
,
NULL
,
date
,
MAX_STRING_LEN
);
SYSTEMTIME
st
;
LPSYSTEMTIME
lpst
=
&
st
;
/* Set frame caption */
LoadString
(
Globals
.
hInstance
,
0x10C
,
szCaption
,
sizeof
(
szCaption
));
if
(
Globals
.
bDate
)
{
lstrcat
(
szCaption
,
" - "
);
lstrcat
(
szCaption
,
szDate
);
}
SetWindowText
(
Globals
.
hMainWnd
,
szCaption
);
GetLocalTime
(
&
st
);
GetDateFormat
(
LOCALE_USER_DEFAULT
,
LOCALE_SLONGDATE
,
lpst
,
NULL
,
date
,
MAX_STRING_LEN
);
/* Set frame caption */
LoadString
(
Globals
.
hInstance
,
0x10C
,
szCaption
,
sizeof
(
szCaption
));
if
(
Globals
.
bDate
)
{
lstrcat
(
szCaption
,
" - "
);
lstrcat
(
szCaption
,
szDate
);
}
SetWindowText
(
Globals
.
hMainWnd
,
szCaption
);
}
VOID
LANGUAGE_LoadMenus
(
VOID
)
{
CHAR
szItem
[
MAX_STRING_LEN
];
HMENU
hMainMenu
;
CHAR
szItem
[
MAX_STRING_LEN
];
HMENU
hMainMenu
;
/* Create menu */
hMainMenu
=
LoadMenu
(
Globals
.
hInstance
,
MAKEINTRESOURCE
(
MAIN_MENU
));
/* Create menu */
hMainMenu
=
LoadMenu
(
Globals
.
hInstance
,
MAKEINTRESOURCE
(
MAIN_MENU
));
Globals
.
hPropertiesMenu
=
GetSubMenu
(
hMainMenu
,
0
);
Globals
.
hLanguageMenu
=
GetSubMenu
(
hMainMenu
,
1
);
Globals
.
hInfoMenu
=
GetSubMenu
(
hMainMenu
,
2
);
SetMenu
(
Globals
.
hMainWnd
,
hMainMenu
);
SetMenu
(
Globals
.
hMainWnd
,
hMainMenu
);
/* Destroy old menu */
if
(
Globals
.
hMainMenu
)
DestroyMenu
(
Globals
.
hMainMenu
);
Globals
.
hMainMenu
=
hMainMenu
;
/* specific for Clock: */
/* Destroy old menu */
if
(
Globals
.
hMainMenu
)
DestroyMenu
(
Globals
.
hMainMenu
);
Globals
.
hMainMenu
=
hMainMenu
;
LANGUAGE_UpdateMenuCheckmarks
();
LANGUAGE_UpdateWindowCaption
();
/* specific for Clock: */
Globals
.
hSystemMenu
=
GetSystemMenu
(
Globals
.
hMainWnd
,
TRUE
);
LANGUAGE_UpdateMenuCheckmarks
();
LANGUAGE_UpdateWindowCaption
();
/* FIXME: Append a SEPARATOR to Globals.hSystemMenu here */
Globals
.
hSystemMenu
=
GetSystemMenu
(
Globals
.
hMainWnd
,
TRUE
);
/* FIXME: Append a SEPARATOR to Globals.hSystemMenu here */
LoadString
(
Globals
.
hInstance
,
0x10D
,
szItem
,
sizeof
(
szItem
));
AppendMenu
(
Globals
.
hSystemMenu
,
MF_STRING
|
MF_BYCOMMAND
,
1000
,
szItem
);
LoadString
(
Globals
.
hInstance
,
0x10D
,
szItem
,
sizeof
(
szItem
));
AppendMenu
(
Globals
.
hSystemMenu
,
MF_STRING
|
MF_BYCOMMAND
,
1000
,
szItem
);
}
/*
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);
if ((wParam >=CL_FIRST_LANGUAGE) && (wParam<=CL_LAST_LANGUAGE))
LANGUAGE_SelectByNumber(wParam - CL_FIRST_LANGUAGE);
else
printf("Unimplemented menu command %i\n", wParam);
}
*/
...
...
programs/clock/main.c
View file @
64852f4b
This diff is collapsed.
Click to expand it.
programs/clock/winclock.c
View file @
64852f4b
This diff is collapsed.
Click to expand it.
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