Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/teraterm/addsetting.cpp

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

revision 8143 by yasuhide, Sat Sep 14 09:45:58 2019 UTC revision 8147 by maya, Sat Sep 14 11:11:21 2019 UTC
# Line 955  BOOL CVisualPropPageDlg::OnCommand(WPARA Line 955  BOOL CVisualPropPageDlg::OnCommand(WPARA
955                          }                          }
956                          return TRUE;                          return TRUE;
957    
958                  case IDC_COLOR_RED | (EN_KILLFOCUS << 16):                  case IDC_COLOR_RED | (EN_CHANGE << 16) :
959                  case IDC_COLOR_GREEN | (EN_KILLFOCUS << 16):                  case IDC_COLOR_GREEN | (EN_CHANGE << 16) :
960                  case IDC_COLOR_BLUE | (EN_KILLFOCUS << 16):                  case IDC_COLOR_BLUE | (EN_CHANGE << 16) :
961                          {                          {
962                                  BYTE r, g, b;                                  int r, g, b;
                                 char buf[8];  
963    
964                                  sel = GetCurSel(IDC_ANSI_COLOR);                                  sel = GetCurSel(IDC_ANSI_COLOR);
965                                  if (sel < 0 && sel > sizeof(ts.ANSIColor)-1) {                                  if (sel < 0 && sel > sizeof(ts.ANSIColor)-1) {
966                                          return TRUE;                                          return TRUE;
967                                  }                                  }
968    
969                                  GetDlgItemTextA(IDC_COLOR_RED, buf, sizeof(buf));                                  r = GetDlgItemInt(IDC_COLOR_RED);
970                                  r = atoi(buf);                                  if (r < 0) {
971                                            r = 0;
972                                    }
973                                    else if (r > 255) {
974                                            r = 255;
975                                    }
976                                    SetDlgItemNum(IDC_COLOR_RED, r);
977    
978                                  GetDlgItemTextA(IDC_COLOR_GREEN, buf, sizeof(buf));                                  g = GetDlgItemInt(IDC_COLOR_GREEN);
979                                  g = atoi(buf);                                  if (g < 0) {
980                                            g = 0;
981                                    }
982                                    else if (g > 255) {
983                                            g = 255;
984                                    }
985                                    SetDlgItemNum(IDC_COLOR_GREEN, g);
986    
987                                  GetDlgItemTextA(IDC_COLOR_BLUE, buf, sizeof(buf));                                  b = GetDlgItemInt(IDC_COLOR_BLUE);
988                                  b = atoi(buf);                                  if (b < 0) {
989                                            b = 0;
990                                    }
991                                    else if (b > 255) {
992                                            b = 255;
993                                    }
994                                    SetDlgItemNum(IDC_COLOR_BLUE, b);
995    
996                                    // OK を押さなくても設定が保存されている
997                                  ts.ANSIColor[sel] = RGB(r, g, b);                                  ts.ANSIColor[sel] = RGB(r, g, b);
998    
                                 // 255を超えたRGB値は補正されるので、それをEditに表示する (2007.2.18 maya)  
                                 SetupRGBbox(sel);  
   
999                                  ::InvalidateRect(GetDlgItem(IDC_SAMPLE_COLOR), NULL, TRUE);                                  ::InvalidateRect(GetDlgItem(IDC_SAMPLE_COLOR), NULL, TRUE);
1000                          }                          }
1001                          return TRUE;                          return TRUE;

Legend:
Removed from v.8143  
changed lines
  Added in v.8147

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