diff -uNr org/dll/hdd.c new/dll/hdd.c --- org/dll/hdd.c Sun May 18 23:10:04 2003 +++ new/dll/hdd.c Sun May 20 01:04:40 2007 @@ -35,7 +35,7 @@ ULONGLONG GetDiskSpace(int nDrive, ULONGLONG *nFree) { char szDrive[5]; - ULARGE_INTEGER useByte, allByte, freeByte; + ULARGE_INTEGER useByte = {0}, allByte = {0}, freeByte = {0}; wsprintf(szDrive, "%c:\\", nDrive + 'A'); GetDiskFreeSpaceEx(szDrive, &useByte, &allByte, &freeByte); diff -uNr org/dll/startbtn.c new/dll/startbtn.c --- org/dll/startbtn.c Sat May 31 11:01:10 2003 +++ new/dll/startbtn.c Sun May 20 01:11:49 2007 @@ -695,6 +695,9 @@ // strcpy(logfont.lfFaceName, "Franklin Gothic Medium"); strcpy(logfont.lfFaceName, StartFontName); +/// GetMyRegStr(NULL, "StartButtonFont", logfont.lfFaceName, 80, StartFontName); +// MessageBeep(MB_ICONWARNING); + hfont = CreateFontIndirect(&logfont); SelectObject(hdc, hfont); //キャプションの幅を得る @@ -719,6 +722,8 @@ ncm.cbSize = sizeof(ncm); SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0); ncm.lfCaptionFont.lfWeight = FW_BOLD; +/// GetMyRegStr(NULL, "StartButtonFont", ncm.lfCaptionFont.lfFaceName, 80, ""); +// MessageBeep(MB_ICONERROR); hfont = CreateFontIndirect(&(ncm.lfCaptionFont)); SelectObject(hdc, hfont); //キャプションの幅を得る @@ -951,7 +956,29 @@ ncm.cbSize = sizeof(ncm); SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0); - ncm.lfCaptionFont.lfWeight = FW_BOLD; + + { + char ts[80]; + if(GetMyRegStr(NULL, "StartButtonFontName", ts, 80, "")) // 定義されてるなら。 + { + //MessageBeep(MB_ICONASTERISK); + strcpy(ncm.lfCaptionFont.lfFaceName, ts); + ncm.lfCaptionFont.lfCharSet = DEFAULT_CHARSET; + + if(GetMyRegLong(NULL, "StartButtonFontBold", TRUE)) + ncm.lfCaptionFont.lfWeight = FW_BOLD; + else + ncm.lfCaptionFont.lfWeight = FW_NORMAL; + ncm.lfCaptionFont.lfItalic = (BOOL)GetMyRegLong(NULL, "StartButtonFontItalic", FALSE); + + if(GetMyRegLong(NULL, "StartButtonFontSize", 12)) + ncm.lfCaptionFont.lfHeight = GetMyRegLong(NULL, "StartButtonFontSize", 12); + }else + { + ncm.lfCaptionFont.lfWeight = FW_BOLD; + } + } + hStartBtnFont = CreateFontIndirect(&(ncm.lfCaptionFont)); SelectObject(hdc, hStartBtnFont); diff -uNr org/envmaker.bat new/envmaker.bat --- org/envmaker.bat Thu Jan 01 09:00:00 1970 +++ new/envmaker.bat Sat May 19 02:44:53 2007 @@ -0,0 +1,3 @@ +PATH %PATH%;C:\Program Files\Microsoft Visual Studio\VC98\BIN;C:\Program Files\Microsoft Visual Studio\COMMON\MSDEV98\BIN +SET INCLUDE=C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE +SET LIB=C:\Program Files\Microsoft Visual Studio\VC98\LIB diff -uNr org/exe/main.c new/exe/main.c --- org/exe/main.c Sun May 25 00:39:28 2003 +++ new/exe/main.c Mon Jul 16 10:28:59 2007 @@ -105,6 +105,7 @@ { MOUSEFUNC_NETINIT, IDS_NETINIT, TTB_LABEL("Network Initialization") }, { MOUSEFUNC_DELUS, IDS_DELUS, TTB_LABEL("Delete User Strings") }, { MOUSEFUNC_FILELIST, IDS_FILELIST, TTB_LABEL("File List Menu") }, + { MOUSEFUNC_ERASECB, IDS_ERASECB, TTB_LABEL("Erase Clipboard") }, }; MOUSE_FUNC_INFO *GetMouseFuncList(void) @@ -342,7 +343,8 @@ else if(wParam == IDTIMER_MONOFF) { KillTimer(hwnd, wParam); - SendMessage(GetDesktopWindow(), WM_SYSCOMMAND, SC_MONITORPOWER, 2); +// SendMessage(GetDesktopWindow(), WM_SYSCOMMAND, SC_MONITORPOWER, 2); + SendMessage(g_hwndClock, WM_SYSCOMMAND, SC_MONITORPOWER, 2); } return 0; diff -uNr org/exe/mouse.c new/exe/mouse.c --- org/exe/mouse.c Mon Mar 03 00:51:02 2003 +++ new/exe/mouse.c Mon Jul 16 10:28:59 2007 @@ -628,7 +628,8 @@ wsprintf(entry, "%d%dDelay", btn, clk); delay = GetMyRegLong(reg_section, entry, 0); if (delay == 0) - SendMessage(GetDesktopWindow(), WM_SYSCOMMAND, SC_MONITORPOWER, 2); +// SendMessage(GetDesktopWindow(), WM_SYSCOMMAND, SC_MONITORPOWER, 2); + SendMessage(g_hwndClock, WM_SYSCOMMAND, SC_MONITORPOWER, 2); else SetTimer(hwnd, IDTIMER_MONOFF, delay * 1000, NULL); break; @@ -708,6 +709,16 @@ showUserMenu(hwnd, 0, tPoint.x, tPoint.y, btn, clk); break; } + case MOUSEFUNC_ERASECB: + if(OpenClipboard(g_hwndClock)) + { + EmptyClipboard(); + CloseClipboard(); + }else + { + MessageBox(g_hwndClock, "Clipboard open failed", "TClock", MB_ICONERROR | MB_OK); + } + break; } } diff -uNr org/exe/pageskin.c new/exe/pageskin.c --- org/exe/pageskin.c Fri May 30 14:58:28 2003 +++ new/exe/pageskin.c Sat May 19 03:43:14 2007 @@ -57,12 +57,16 @@ // 「ビットマップ」「キャプション」テキストボックス case IDC_FILESTART: case IDC_CAPTIONSTART: + case IDC_FONTNAMESTART: + case IDC_FONTSIZESTART: case IDC_FILEMENU: case IDC_FILETBG: if(code == EN_CHANGE) SendPSChanged(hDlg); break; // スタートボタンのテキストを書式解析 + case IDC_FONTBOLDSTART: + case IDC_FONTITALICSTART: case IDC_CHK_ISFORMAT: SendPSChanged(hDlg); break; @@ -144,6 +148,17 @@ GetMyRegStr("", "StartButtonCaption", s, 80, MyString(IDS_START)); SetDlgItemText(hDlg, IDC_CAPTIONSTART, s); + GetMyRegStr("", "StartButtonFontName", s, 256, ""); + SetDlgItemText(hDlg, IDC_FONTNAMESTART, s); + + GetMyRegStr("", "StartButtonFontSize", s, 16, ""); + SetDlgItemText(hDlg, IDC_FONTSIZESTART, s); + + CheckDlgButton(hDlg, IDC_FONTBOLDSTART, + GetMyRegLong("", "StartButtonFontBold", TRUE)); + CheckDlgButton(hDlg, IDC_FONTITALICSTART, + GetMyRegLong("", "StartButtonFontItalic", FALSE)); + CheckDlgButton(hDlg, IDC_CHK_ISFORMAT, GetMyRegLong("", "StartButtonIsFormat", FALSE)); @@ -201,6 +216,18 @@ GetDlgItemText(hDlg, IDC_CAPTIONSTART, s, 80); SetMyRegStr("", "StartButtonCaption", s); + + GetDlgItemText(hDlg, IDC_FONTNAMESTART, s, 256); + SetMyRegStr("", "StartButtonFontName", s); + + GetDlgItemText(hDlg, IDC_FONTSIZESTART, s, 16); + SetMyRegStr("", "StartButtonFontSize", s); + + SetMyRegLong("", "StartButtonFontBold", + IsDlgButtonChecked(hDlg, IDC_FONTBOLDSTART)); + + SetMyRegLong("", "StartButtonFontItalic", + IsDlgButtonChecked(hDlg, IDC_FONTITALICSTART)); SetMyRegLong("", "StartButtonIsFormat", IsDlgButtonChecked(hDlg, IDC_CHK_ISFORMAT)); diff -uNr org/exe/tclock.h new/exe/tclock.h --- org/exe/tclock.h Fri Mar 07 11:34:22 2003 +++ new/exe/tclock.h Sat May 19 02:44:53 2007 @@ -90,6 +90,7 @@ #define MOUSEFUNC_DELUS 25 #define MOUSEFUNC_FILELIST 26 #define MOUSEFUNC_OPENFILE 100 +#define MOUSEFUNC_ERASECB 27 typedef struct{ BYTE key; diff -uNr org/exe/tclock.mak new/exe/tclock.mak --- org/exe/tclock.mak Mon Mar 03 23:00:24 2003 +++ new/exe/tclock.mak Sat May 19 02:44:53 2007 @@ -14,7 +14,7 @@ RESFILE=tclock.res RESOURCEH=..\language\resource.h -OBJS=propdlg.obj page.obj pagecolor.obj pageformat.obj \ +OBJS=pageanalog.obj propdlg.obj page.obj pagecolor.obj pageformat.obj \ pageformat2.obj pagealarm.obj alarmday.obj autoexecday.obj autoexechour.obj\ autoexecmin.obj pagemouse.obj pagetooltip.obj pageskin.obj pagegraph.obj\ pagetaskbar.obj pagedesktop.obj pagesntp.obj pageautoexec.obj pagemisc.obj\ @@ -65,6 +65,8 @@ $(CC) $(COPT)$@ $(SRCDIR)\propdlg.c page.obj: $(SRCDIR)\page.c $(SRCDIR)\tclock.h $(RESOURCEH) $(CC) $(COPT)$@ $(SRCDIR)\page.c +pageanalog.obj: $(SRCDIR)\pageanalog.c $(SRCDIR)\tclock.h $(RESOURCEH) + $(CC) $(COPT)$@ $(SRCDIR)\pageanalog.c pagecolor.obj: $(SRCDIR)\pagecolor.c $(SRCDIR)\tclock.h $(RESOURCEH) $(CC) $(COPT)$@ $(SRCDIR)\pagecolor.c pageformat.obj: $(SRCDIR)\pageformat.c $(SRCDIR)\tclock.h $(RESOURCEH) diff -uNr org/language/langja.rc new/language/langja.rc --- org/language/langja.rc Sat May 31 13:23:10 2003 +++ new/language/langja.rc Sat May 19 03:43:14 2007 @@ -31,7 +31,7 @@ IDR_MENU MENU DISCARDABLE BEGIN - POPUP "TClcok" + POPUP "TClock" BEGIN MENUITEM "日付と時刻の調整(&A)", IDC_DATETIME MENUITEM "重ねて表示(&C)", IDC_CASCADE @@ -402,41 +402,49 @@ CONTROL "書式展開する",IDC_CHK_ISFORMAT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,142,40,54,10 CONTROL "スタートメニューを改造する",IDC_STARTMENU,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,12,61,104,8 - RTEXT "ビットマップ",IDC_LABFILEMENU,8,77,38,8 - EDITTEXT IDC_FILEMENU,49,74,107,13,ES_AUTOHSCROLL - PUSHBUTTON "...",IDC_SANSHOMENU,157,74,12,13 - RTEXT "色",IDC_LABCOLMENU,8,94,38,8 - COMBOBOX IDC_COLMENU,49,92,76,120,CBS_DROPDOWNLIST | + BS_AUTOCHECKBOX | WS_TABSTOP,9,70,104,8 + RTEXT "ビットマップ",IDC_LABFILEMENU,5,86,38,8 + EDITTEXT IDC_FILEMENU,46,83,107,13,ES_AUTOHSCROLL + PUSHBUTTON "...",IDC_SANSHOMENU,154,83,12,13 + RTEXT "色",IDC_LABCOLMENU,5,103,38,8 + COMBOBOX IDC_COLMENU,46,101,76,120,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "...",IDC_CHOOSECOLMENU,127,92,12,13 + PUSHBUTTON "...",IDC_CHOOSECOLMENU,124,101,12,13 CONTROL "並べる",IDC_TILEMENU,"Button",BS_AUTOCHECKBOX | - WS_TABSTOP,144,94,42,10 + WS_TABSTOP,141,103,42,10 CONTROL "時計の背景に画像を使用する",IDC_TRAYBG,"Button", - BS_AUTOCHECKBOX | WS_TABSTOP,12,115,96,9 - RTEXT "ビットマップ",IDC_LABTB1,9,133,38,8 - EDITTEXT IDC_FILETBG,49,131,107,13,ES_AUTOHSCROLL - PUSHBUTTON "...",IDC_SANSHOTBG,157,131,12,13 - RTEXT "画像上端",IDC_LABTB2,22,153,29,8 - EDITTEXT IDC_TBGUP,55,151,28,13,ES_AUTOHSCROLL + BS_AUTOCHECKBOX | WS_TABSTOP,9,124,96,9 + RTEXT "ビットマップ",IDC_LABTB1,6,142,38,8 + EDITTEXT IDC_FILETBG,46,140,107,13,ES_AUTOHSCROLL + PUSHBUTTON "...",IDC_SANSHOTBG,154,140,12,13 + RTEXT "画像上端",IDC_LABTB2,19,162,29,8 + EDITTEXT IDC_TBGUP,52,160,28,13,ES_AUTOHSCROLL CONTROL "",IDC_SPINTBGU,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | - UDS_ARROWKEYS,83,151,9,13 - RTEXT "画像下端",IDC_LABTB3,96,153,31,8 - EDITTEXT IDC_TBGDOWN,131,151,28,13,ES_AUTOHSCROLL + UDS_ARROWKEYS,80,160,9,13 + RTEXT "画像下端",IDC_LABTB3,93,162,31,8 + EDITTEXT IDC_TBGDOWN,128,160,28,13,ES_AUTOHSCROLL CONTROL "",IDC_SPINTBGD,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | - UDS_ARROWKEYS,159,151,9,13 - RTEXT "画像左端",IDC_LABTB4,21,173,30,8 - EDITTEXT IDC_TBGLEFT,55,171,28,13,ES_AUTOHSCROLL + UDS_ARROWKEYS,156,160,9,13 + RTEXT "画像左端",IDC_LABTB4,18,182,30,8 + EDITTEXT IDC_TBGLEFT,52,180,28,13,ES_AUTOHSCROLL CONTROL "",IDC_SPINTBGL,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | - UDS_ARROWKEYS,83,171,9,13 - RTEXT "画像右端",IDC_LABTB5,98,173,29,8 - EDITTEXT IDC_TBGRIGHT,131,171,28,13,ES_AUTOHSCROLL + UDS_ARROWKEYS,80,180,9,13 + RTEXT "画像右端",IDC_LABTB5,95,182,29,8 + EDITTEXT IDC_TBGRIGHT,128,180,28,13,ES_AUTOHSCROLL CONTROL "",IDC_SPINTBGR,"msctls_updown32",UDS_WRAP | UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | - UDS_ARROWKEYS,159,171,9,13 + UDS_ARROWKEYS,156,180,9,13 + RTEXT "フォント",IDC_LABFILESTART2,15,59,33,8 + EDITTEXT IDC_FONTNAMESTART,50,55,85,13,ES_AUTOHSCROLL + PUSHBUTTON "...",IDC_SANSHOFONTSTART,185,55,12,13 + EDITTEXT IDC_FONTSIZESTART,140,55,15,13,ES_AUTOHSCROLL + CONTROL "B",IDC_FONTBOLDSTART,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,160,55,21,10 + CONTROL "I",IDC_FONTITALICSTART,"Button",BS_AUTOCHECKBOX | + WS_TABSTOP,160,70,18,10 END IDD_PAGEGRAPH DIALOG DISCARDABLE 0, 0, 210, 200 @@ -650,7 +658,7 @@ IDD_PAGEABOUT DIALOGEX 0, 0, 210, 200 STYLE DS_CONTROL | WS_CHILD -FONT 9, "MS UI Gothic" +FONT 9, "MS UI Gothic", 0, 0, 0x1 BEGIN ICON 0,IDC_ABOUTICON,11,12,20,20 LTEXT "Kazubon 1997-2001",IDC_STATIC,111,22,59,8 @@ -1308,6 +1316,11 @@ IDS_TASKBAR "改造" IDS_MISC "その他" IDS_PROP_COLOR "色とフォント" +END + +STRINGTABLE DISCARDABLE +BEGIN + IDS_ERASECB "クリップボードを消去" END #endif // 日本語 resources diff -uNr org/language/resource.h new/language/resource.h --- org/language/resource.h Fri May 30 01:19:02 2003 +++ new/language/resource.h Sat May 19 03:43:14 2007 @@ -59,6 +59,7 @@ #define IDS_VOL2 55 #define IDS_MONOFFD 56 #define IDS_CDDRV 57 +#define IDS_ERASECB 128 #define IDS_BMPFILE 58 #define IDS_BMPICONFILE 59 @@ -367,6 +368,13 @@ // skin +#define IDC_LABFILESTART2 3000 +#define IDC_FONTNAMESTART 3001 +#define IDC_SANSHOFONTSTART 3002 +#define IDC_FONTSIZESTART 3003 +#define IDC_FONTBOLDSTART 3004 +#define IDC_FONTITALICSTART 3005 + #define IDC_STARTBTN 1501 #define IDC_LABFILESTART 1502 #define IDC_FILESTART 1503 diff -uNr org/language/resrc1.h new/language/resrc1.h --- org/language/resrc1.h Fri May 30 01:18:12 2003 +++ new/language/resrc1.h Sat May 19 03:43:14 2007 @@ -9,7 +9,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1007 +#define _APS_NEXT_CONTROL_VALUE 1002 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif diff -uNr org/make_vc6.bat new/make_vc6.bat --- org/make_vc6.bat Thu Jan 01 09:00:00 1970 +++ new/make_vc6.bat Sat May 19 02:44:53 2007 @@ -0,0 +1,3 @@ +call envmaker.bat +nmake -f tclock2ch.mak all +pause