Make indentation consistent (4 chars).
This commit is contained in:
parent
9d59fb72b1
commit
64852f4b0e
|
@ -27,8 +27,8 @@
|
||||||
|
|
||||||
CHAR STRING_MENU_Xx[] = "MENU_Xx";
|
CHAR STRING_MENU_Xx[] = "MENU_Xx";
|
||||||
|
|
||||||
VOID LANGUAGE_UpdateMenuCheckmarks(VOID) {
|
VOID LANGUAGE_UpdateMenuCheckmarks(VOID)
|
||||||
|
{
|
||||||
if(Globals.bAnalog == TRUE) {
|
if(Globals.bAnalog == TRUE) {
|
||||||
|
|
||||||
/* analog clock */
|
/* analog clock */
|
||||||
|
@ -42,7 +42,6 @@ VOID LANGUAGE_UpdateMenuCheckmarks(VOID) {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
/* digital clock */
|
/* digital clock */
|
||||||
|
|
||||||
CheckMenuItem(Globals.hPropertiesMenu, 0x100,
|
CheckMenuItem(Globals.hPropertiesMenu, 0x100,
|
||||||
|
@ -51,7 +50,6 @@ VOID LANGUAGE_UpdateMenuCheckmarks(VOID) {
|
||||||
MF_BYCOMMAND | MF_CHECKED);
|
MF_BYCOMMAND | MF_CHECKED);
|
||||||
EnableMenuItem(Globals.hPropertiesMenu, 0x103,
|
EnableMenuItem(Globals.hPropertiesMenu, 0x103,
|
||||||
MF_BYCOMMAND);
|
MF_BYCOMMAND);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckMenuItem(Globals.hPropertiesMenu, 0x105, MF_BYCOMMAND |
|
CheckMenuItem(Globals.hPropertiesMenu, 0x105, MF_BYCOMMAND |
|
||||||
|
@ -64,8 +62,8 @@ VOID LANGUAGE_UpdateMenuCheckmarks(VOID) {
|
||||||
(Globals.bDate ? MF_CHECKED : MF_UNCHECKED));
|
(Globals.bDate ? MF_CHECKED : MF_UNCHECKED));
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID LANGUAGE_UpdateWindowCaption(VOID) {
|
VOID LANGUAGE_UpdateWindowCaption(VOID)
|
||||||
|
{
|
||||||
CHAR szCaption[MAX_STRING_LEN];
|
CHAR szCaption[MAX_STRING_LEN];
|
||||||
CHAR szDate[MAX_STRING_LEN];
|
CHAR szDate[MAX_STRING_LEN];
|
||||||
|
|
||||||
|
@ -85,16 +83,13 @@ VOID LANGUAGE_UpdateWindowCaption(VOID) {
|
||||||
lstrcat(szCaption, szDate);
|
lstrcat(szCaption, szDate);
|
||||||
}
|
}
|
||||||
SetWindowText(Globals.hMainWnd, szCaption);
|
SetWindowText(Globals.hMainWnd, szCaption);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID LANGUAGE_LoadMenus(VOID)
|
VOID LANGUAGE_LoadMenus(VOID)
|
||||||
{
|
{
|
||||||
|
|
||||||
CHAR szItem[MAX_STRING_LEN];
|
CHAR szItem[MAX_STRING_LEN];
|
||||||
HMENU hMainMenu;
|
HMENU hMainMenu;
|
||||||
|
|
||||||
|
|
||||||
/* Create menu */
|
/* Create menu */
|
||||||
hMainMenu = LoadMenu(Globals.hInstance, MAKEINTRESOURCE(MAIN_MENU));
|
hMainMenu = LoadMenu(Globals.hInstance, MAKEINTRESOURCE(MAIN_MENU));
|
||||||
Globals.hPropertiesMenu = GetSubMenu(hMainMenu, 0);
|
Globals.hPropertiesMenu = GetSubMenu(hMainMenu, 0);
|
||||||
|
@ -125,7 +120,8 @@ VOID LANGUAGE_DefaultHandle(WPARAM wParam)
|
||||||
{
|
{
|
||||||
if ((wParam >=CL_FIRST_LANGUAGE) && (wParam<=CL_LAST_LANGUAGE))
|
if ((wParam >=CL_FIRST_LANGUAGE) && (wParam<=CL_LAST_LANGUAGE))
|
||||||
LANGUAGE_SelectByNumber(wParam - CL_FIRST_LANGUAGE);
|
LANGUAGE_SelectByNumber(wParam - CL_FIRST_LANGUAGE);
|
||||||
else printf("Unimplemented menu command %i\n", wParam);
|
else
|
||||||
|
printf("Unimplemented menu command %i\n", wParam);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -116,15 +116,16 @@ CHAR szAppRelease[MAX_STRING_LEN];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Handle languages */
|
/* Handle languages */
|
||||||
/* default:
|
/*
|
||||||
|
default:
|
||||||
LANGUAGE_DefaultHandle(wParam);
|
LANGUAGE_DefaultHandle(wParam);
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID MAIN_FileChooseFont(VOID) {
|
VOID MAIN_FileChooseFont(VOID)
|
||||||
|
{
|
||||||
CHOOSEFONT font;
|
CHOOSEFONT font;
|
||||||
LOGFONT lf;
|
LOGFONT lf;
|
||||||
|
|
||||||
|
@ -147,7 +148,6 @@ VOID MAIN_FileChooseFont(VOID) {
|
||||||
if (ChooseFont(&font)) {
|
if (ChooseFont(&font)) {
|
||||||
/* do nothing yet */
|
/* do nothing yet */
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -243,8 +243,8 @@ int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show
|
||||||
Globals.hMainIcon = ExtractIcon(Globals.hInstance,
|
Globals.hMainIcon = ExtractIcon(Globals.hInstance,
|
||||||
Globals.lpszIcoFile, 0);
|
Globals.lpszIcoFile, 0);
|
||||||
|
|
||||||
if (!Globals.hMainIcon) Globals.hMainIcon =
|
if (!Globals.hMainIcon)
|
||||||
LoadIcon(0, MAKEINTRESOURCE(DEFAULTICON));
|
Globals.hMainIcon = LoadIcon(0, MAKEINTRESOURCE(DEFAULTICON));
|
||||||
|
|
||||||
if (!prev){
|
if (!prev){
|
||||||
class.style = CS_HREDRAW | CS_VREDRAW;
|
class.style = CS_HREDRAW | CS_VREDRAW;
|
||||||
|
|
|
@ -42,7 +42,8 @@ int nLastSecond = 60;
|
||||||
|
|
||||||
HandData OldSecond,OldHour,OldMinute;
|
HandData OldSecond,OldHour,OldMinute;
|
||||||
|
|
||||||
int MiddleX(void) {
|
int MiddleX(void)
|
||||||
|
{
|
||||||
int X, diff;
|
int X, diff;
|
||||||
|
|
||||||
X = (Globals.MaxX/2);
|
X = (Globals.MaxX/2);
|
||||||
|
@ -51,7 +52,8 @@ int MiddleX(void) {
|
||||||
return X;
|
return X;
|
||||||
}
|
}
|
||||||
|
|
||||||
int MiddleY(void) {
|
int MiddleY(void)
|
||||||
|
{
|
||||||
int Y, diff;
|
int Y, diff;
|
||||||
|
|
||||||
Y = (Globals.MaxY/2);
|
Y = (Globals.MaxY/2);
|
||||||
|
@ -168,8 +170,8 @@ BOOL UpdateSecondHand(HDC dc,int MidX,int MidY,int XExt,int YExt,WORD Pos)
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DigitalClock(HDC dc) {
|
void DigitalClock(HDC dc)
|
||||||
|
{
|
||||||
CHAR szTime[MAX_STRING_LEN];
|
CHAR szTime[MAX_STRING_LEN];
|
||||||
LPSTR time = szTime;
|
LPSTR time = szTime;
|
||||||
static short xChar, yChar;
|
static short xChar, yChar;
|
||||||
|
@ -190,13 +192,12 @@ void DigitalClock(HDC dc) {
|
||||||
yChar = 100;
|
yChar = 100;
|
||||||
TextOut (dc, xChar, yChar, szTime, strlen (szTime));
|
TextOut (dc, xChar, yChar, szTime, strlen (szTime));
|
||||||
DeleteObject(SelectObject(dc,GetStockObject(NULL_PEN)));
|
DeleteObject(SelectObject(dc,GetStockObject(NULL_PEN)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void AnalogClock(HDC dc) {
|
void AnalogClock(HDC dc)
|
||||||
|
{
|
||||||
SYSTEMTIME st;
|
SYSTEMTIME st;
|
||||||
WORD H, M, S, F;
|
WORD H, M, S, F;
|
||||||
int MidX, MidY, DiffX, DiffY;
|
int MidX, MidY, DiffX, DiffY;
|
||||||
|
@ -231,7 +232,6 @@ void AnalogClock(HDC dc) {
|
||||||
DrawHourHand(dc);
|
DrawHourHand(dc);
|
||||||
}
|
}
|
||||||
DeleteObject(SelectObject(dc,GetStockObject(NULL_PEN)));
|
DeleteObject(SelectObject(dc,GetStockObject(NULL_PEN)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Idle(HDC idc)
|
void Idle(HDC idc)
|
||||||
|
|
Loading…
Reference in New Issue