Revision: 7702 https://osdn.net/projects/ttssh2/scm/svn/commits/7702 Author: zmatsuo Date: 2019-05-21 23:27:19 +0900 (Tue, 21 May 2019) Log Message: ----------- TTProxy 無効化していたフォント関連のソースを削除 Modified Paths: -------------- trunk/TTProxy/ProxyWSockHook.h -------------- next part -------------- Modified: trunk/TTProxy/ProxyWSockHook.h =================================================================== --- trunk/TTProxy/ProxyWSockHook.h 2019-05-21 14:27:08 UTC (rev 7701) +++ trunk/TTProxy/ProxyWSockHook.h 2019-05-21 14:27:19 UTC (rev 7702) @@ -25,21 +25,6 @@ GetI18nStr("TTProxy", key, buf, buf_len, def, UILanguageFile); } -int UTIL_get_lang_font(PCHAR key, HWND dlg, PLOGFONT logfont, HFONT *font) -{ - if (GetI18nLogfont("TTProxy", key, logfont, - GetDeviceCaps(GetDC(dlg),LOGPIXELSY), - UILanguageFile) == FALSE) { - return FALSE; - } - - if ((*font = CreateFontIndirect(logfont)) == NULL) { - return FALSE; - } - - return TRUE; -} - class ProxyWSockHook { public: class MessageShower { @@ -765,44 +750,9 @@ } virtual bool onInitDialog() { char uimsg[MAX_UIMSG], uitmp[MAX_UIMSG]; -// LOGFONT logfont; -// HFONT font; Dialog::onInitDialog(); -#if 0 - font = (HFONT)SendMessage(WM_GETFONT, 0, 0); - GetObject(font, sizeof(LOGFONT), &logfont); - if (UTIL_get_lang_font("DLG_TAHOMA_FONT", HWND(), &logfont, &DlgFont)) { - SendDlgItemMessage(IDC_GRP_COMMON, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_TIMEOUT_LABEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_TIMEOUT, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_TIMEOUT_SECONDS, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_LOGFILE_LABEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_LOGFILE, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_REFER, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_GRP_SOCKS, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_RESOLVE_LABEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(CBS_DROPDOWNLIST, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_GRP_TELNET, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_HOSTNAME_LABEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_HOSTNAME, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_USERNAME_LABEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_USERNAME, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_PASSWORD_LABEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_PASSWORD, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_CONNECTED_LABEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_CONNECTED, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_ERROR_LABEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_ERROR, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDOK, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDCANCEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - } - else { - DlgFont = NULL; - } -#endif - GetWindowText(uitmp, sizeof(uitmp)); UTIL_get_lang_msg("DLG_OTHER_TITLE", uimsg, sizeof(uimsg), uitmp); SetWindowText(uimsg); @@ -908,19 +858,9 @@ logfile = log.GetWindowTextLength() > 0 ? log.GetWindowText() : NULL; -#if 0 - if (DlgFont != NULL) { - DeleteObject(DlgFont); - } -#endif Dialog::onOK(); } virtual void onCancel() { -#if 0 - if (DlgFont != NULL) { - DeleteObject(DlgFont); - } -#endif Dialog::onCancel(); } public: @@ -949,7 +889,6 @@ EditBoxCtrl user; EditBoxCtrl pass; bool lock; -// HFONT DlgFont; protected: virtual bool dispatch(int message, int wParam, long lParam) { if (message == WM_COMMAND) { @@ -971,36 +910,9 @@ } virtual bool onInitDialog() { char uimsg[MAX_UIMSG], uitmp[MAX_UIMSG]; -// LOGFONT logfont; -// HFONT font; Dialog::onInitDialog(); -#if 0 - font = (HFONT)SendMessage(WM_GETFONT, 0, 0); - GetObject(font, sizeof(LOGFONT), &logfont); - if (UTIL_get_lang_font("DLG_TAHOMA_FONT", HWND(), &logfont, &DlgFont)) { - SendDlgItemMessage(IDC_URL_LABEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_URL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_TYPE_LEBEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_TYPE, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_HOSTNAME_LABEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_HOSTNAME, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_PORT_LABEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_PORT, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_USERNAME_LABEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_USERNAME, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_PASSWORD_LABEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_PASSWORD, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDC_OPTIONS, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDOK, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDCANCEL, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - } - else { - DlgFont = NULL; - } -#endif - GetWindowText(uitmp, sizeof(uitmp)); UTIL_get_lang_msg("DLG_SETUP_TITLE", uimsg, sizeof(uimsg), uitmp); SetWindowText(uimsg); @@ -1092,19 +1004,9 @@ return; } } -#if 0 - if (DlgFont != NULL) { - DeleteObject(DlgFont); - } -#endif Dialog::onOK(); } virtual void onCancel() { -#if 0 - if (DlgFont != NULL) { - DeleteObject(DlgFont); - } -#endif Dialog::onCancel(); } void onOptions() { @@ -1209,7 +1111,6 @@ class AboutDialog : public Dialog { private: -// HFONT DlgFont; virtual bool onInitDialog() { String buf; char *buf2; @@ -1216,21 +1117,7 @@ const char *ver; int n, a, b, c, d, len; char uimsg[MAX_UIMSG], uimsg2[MAX_UIMSG], uimsg3[MAX_UIMSG]; -// LOGFONT logfont; -// HFONT font; -#if 0 - font = (HFONT)SendMessage(WM_GETFONT, 0, 0); - GetObject(font, sizeof(LOGFONT), &logfont); - if (UTIL_get_lang_font("DLG_TAHOMA_FONT", HWND(), &logfont, &DlgFont)) { - SendDlgItemMessage(IDC_VERSION, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - SendDlgItemMessage(IDOK, WM_SETFONT, (WPARAM)DlgFont, MAKELPARAM(TRUE,0)); - } - else { - DlgFont = NULL; - } -#endif - GetWindowText(uimsg2, sizeof(uimsg2)); UTIL_get_lang_msg("DLG_ABOUT_TITLE", uimsg, sizeof(uimsg), uimsg2); SetWindowText(uimsg); @@ -1263,11 +1150,6 @@ return true; } virtual void onOK() { -#if 0 - if (DlgFont != NULL) { - DeleteObject(DlgFont); - } -#endif Dialog::onOK(); } public :