Develop and Download Open Source Software

Browse Subversion Repository

Diff of /branches/ssh_chacha20poly1305/ttssh2/ttxssh/ttxssh.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7706 by zmatsuo, Tue May 21 15:20:52 2019 UTC revision 7714 by zmatsuo, Mon May 27 13:23:19 2019 UTC
# Line 105  static HICON SecureSmallIcon = NULL; Line 105  static HICON SecureSmallIcon = NULL;
105  static HICON SecureNotifyIcon = NULL;  static HICON SecureNotifyIcon = NULL;
106  static HICON OldNotifyIcon = NULL;  static HICON OldNotifyIcon = NULL;
107    
 static HFONT DlgAboutTextFont;  
   
108  static TInstVar *pvar;  static TInstVar *pvar;
109    
110  typedef struct {  typedef struct {
# Line 2446  static LRESULT CALLBACK AboutDlgEditWind Line 2444  static LRESULT CALLBACK AboutDlgEditWind
2444  static BOOL CALLBACK TTXAboutDlg(HWND dlg, UINT msg, WPARAM wParam,  static BOOL CALLBACK TTXAboutDlg(HWND dlg, UINT msg, WPARAM wParam,
2445                                   LPARAM lParam)                                   LPARAM lParam)
2446  {  {
2447            static HFONT DlgAboutTextFont;
2448    
2449          switch (msg) {          switch (msg) {
2450          case WM_INITDIALOG:          case WM_INITDIALOG:
2451                  // Edit controlは等幅フォントで表示したいので、別設定情報からフォントをセットする。                  // Edit controlは等幅フォントで表示したいので、別設定情報からフォントをセットする。
2452                  // (2014.5.5. yutaka)                  // (2014.5.5. yutaka)
2453                  if (!UTIL_get_lang_font("DLG_ABOUT_FONT", dlg, NULL, &DlgAboutTextFont, pvar)) {                  DlgAboutTextFont = UTIL_get_lang_fixedfont(dlg, pvar->ts->UILanguageFile);
                         // 読み込めなかった場合は等幅フォントを指定する。  
                         // エディットコントロールはダイアログと同じフォントを持っており  
                         // 等幅フォントではないため。  
                         LOGFONTA logfont = {0};  
                         strncpy_s(logfont.lfFaceName, sizeof(logfont.lfFaceName), "Courier New", _TRUNCATE);  
                         logfont.lfCharSet = 0;  
                         logfont.lfHeight = MulDiv(8, GetDeviceCaps(GetDC(dlg),LOGPIXELSY) * -1, 72);  
                         logfont.lfWidth = 0;  
                         DlgAboutTextFont = CreateFontIndirect(&logfont);        // エラー時 NULL  
                 }  
2454                  if (DlgAboutTextFont != NULL) {                  if (DlgAboutTextFont != NULL) {
2455                          SendDlgItemMessage(dlg, IDC_ABOUTTEXT, WM_SETFONT, (WPARAM)DlgAboutTextFont, MAKELPARAM(TRUE,0));                          SendDlgItemMessage(dlg, IDC_ABOUTTEXT, WM_SETFONT, (WPARAM)DlgAboutTextFont, MAKELPARAM(TRUE,0));
2456                  }                  }
# Line 2496  static BOOL CALLBACK TTXAboutDlg(HWND dl Line 2486  static BOOL CALLBACK TTXAboutDlg(HWND dl
2486                  switch (LOWORD(wParam)) {                  switch (LOWORD(wParam)) {
2487                  case IDOK:                  case IDOK:
2488                          EndDialog(dlg, 1);                          EndDialog(dlg, 1);
                         if (DlgAboutTextFont != NULL) {  
                                 DeleteObject(DlgAboutTextFont);  
                         }  
2489                          return TRUE;                          return TRUE;
2490                  case IDCANCEL:                  /* there isn't a cancel button, but other Windows                  case IDCANCEL:                  /* there isn't a cancel button, but other Windows
2491                                                                     UI things can send this message */                                                                     UI things can send this message */
2492                          EndDialog(dlg, 0);                          EndDialog(dlg, 0);
                         if (DlgAboutTextFont != NULL) {  
                                 DeleteObject(DlgAboutTextFont);  
                         }  
2493                          return TRUE;                          return TRUE;
2494                  case IDC_FP_HASH_ALG_MD5:                  case IDC_FP_HASH_ALG_MD5:
2495                          about_dlg_set_abouttext(pvar, dlg, SSH_DIGEST_MD5);                          about_dlg_set_abouttext(pvar, dlg, SSH_DIGEST_MD5);
# Line 2515  static BOOL CALLBACK TTXAboutDlg(HWND dl Line 2499  static BOOL CALLBACK TTXAboutDlg(HWND dl
2499                          return TRUE;                          return TRUE;
2500                  }                  }
2501                  break;                  break;
2502    
2503            case WM_DESTROY:
2504                    if (DlgAboutTextFont != NULL) {
2505                            DeleteObject(DlgAboutTextFont);
2506                            DlgAboutTextFont = NULL;
2507                    }
2508                    break;
2509    
2510            case WM_DPICHANGED:
2511                    if (DlgAboutTextFont != NULL) {
2512                            DeleteObject(DlgAboutTextFont);
2513                    }
2514                    DlgAboutTextFont = UTIL_get_lang_fixedfont(dlg, pvar->ts->UILanguageFile);
2515                    if (DlgAboutTextFont != NULL) {
2516                            SendDlgItemMessage(dlg, IDC_ABOUTTEXT, WM_SETFONT, (WPARAM)DlgAboutTextFont, MAKELPARAM(TRUE,0));
2517                    }
2518                    return FALSE;
2519          }          }
2520    
2521          return FALSE;          return FALSE;

Legend:
Removed from v.7706  
changed lines
  Added in v.7714

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26