#include <WriteFilesDLG.h>
Public Types | |
enum | { IDD = IDD_WFDLG } |
Public Member Functions | |
CWriteFilesDLG (LPCTSTR fname, int fmtm, int fnum, int tnum, CWnd *pParent=NULL) | |
virtual | ~CWriteFilesDLG () |
void | setDLGState (LPCTSTR fmtstr) |
void | setNumBoxState () |
virtual BOOL | OnInitDialog () |
afx_msg void | OnCbnSelchangeWfFormats () |
afx_msg void | OnBnClickedWfMfl () |
Public Attributes | |
CWnd * | pWnd |
CComboBox * | fmtsCMBBox |
CEdit * | fnameEBox |
CEdit * | fromNumEBox |
CEdit * | toNumEBox |
CButton * | mltSaveCBtn |
CString | fName |
int | format |
int | fromNum |
int | toNum |
int | zSize |
BOOL | mltSave |
Protected Member Functions | |
virtual void | DoDataExchange (CDataExchange *pDX) |
virtual void | OnOK () |
Definition at line 17 of file WriteFilesDLG.h.
anonymous enum |
CWriteFilesDLG | ( | LPCTSTR | fname, | |
int | fmtm, | |||
int | fnum, | |||
int | tnum, | |||
CWnd * | pParent = NULL | |||
) |
Definition at line 21 of file WriteFilesDLG.cpp.
References CWriteFilesDLG::fmtsCMBBox, CWriteFilesDLG::fName, CWriteFilesDLG::fnameEBox, CWriteFilesDLG::format, CWriteFilesDLG::fromNum, CWriteFilesDLG::fromNumEBox, CWriteFilesDLG::mltSave, CWriteFilesDLG::mltSaveCBtn, CWriteFilesDLG::pWnd, CWriteFilesDLG::toNum, CWriteFilesDLG::toNumEBox, and CWriteFilesDLG::zSize.
00022 : CDialog(CWriteFilesDLG::IDD, pParent) 00023 { 00024 //{{AFX_DATA_INIT(CWriteFilesDLG) 00025 // メモ - ClassWizard はこの位置にマッピング用のマクロを追加または削除します. 00026 //}}AFX_DATA_INIT 00027 00028 fmtsCMBBox = NULL; 00029 fnameEBox = NULL; 00030 fromNumEBox = NULL; 00031 toNumEBox = NULL; 00032 mltSaveCBtn = NULL; 00033 00034 pWnd = pParent; 00035 fName = fname; 00036 format = fmt; 00037 fromNum = fnum; 00038 toNum = tnum; 00039 mltSave = FALSE; 00040 zSize = abs(tnum - fnum) + 1; 00041 }
~CWriteFilesDLG | ( | ) | [virtual] |
Definition at line 45 of file WriteFilesDLG.cpp.
void DoDataExchange | ( | CDataExchange * | pDX | ) | [protected, virtual] |
Definition at line 51 of file WriteFilesDLG.cpp.
00052 { 00053 CDialog::DoDataExchange(pDX); 00054 //{{AFX_DATA_MAP(CWriteFilesDLG) 00055 // メモ - ClassWizard はこの位置にマッピング用のマクロを追加または削除します. 00056 //}}AFX_DATA_MAP 00057 }
void OnBnClickedWfMfl | ( | ) |
Definition at line 243 of file WriteFilesDLG.cpp.
References CWriteFilesDLG::setNumBoxState().
00244 { 00245 setNumBoxState(); 00246 }
void OnCbnSelchangeWfFormats | ( | ) |
Definition at line 158 of file WriteFilesDLG.cpp.
References CWriteFilesDLG::fmtsCMBBox, CWriteFilesDLG::setDLGState(), and CWriteFilesDLG::setNumBoxState().
Referenced by CWriteFilesDLG::OnOK().
00159 { 00160 TCHAR buf[LNAME]; 00161 fmtsCMBBox->GetWindowText(buf, LNAME); 00162 00163 setDLGState(buf); 00164 setNumBoxState(); 00165 }
BOOL OnInitDialog | ( | ) | [virtual] |
Definition at line 73 of file WriteFilesDLG.cpp.
References IDC_WF_FNAME, IDC_WF_FROMNUM, and IDC_WF_TONUM.
00074 { 00075 TCHAR buf[LNAME]; 00076 // memset(buf, 0, LNAME); 00077 00078 fmtsCMBBox = (CComboBox*)GetDlgItem(IDC_WF_FORMATS); 00079 fnameEBox = (CEdit*)GetDlgItem(IDC_WF_FNAME); 00080 fromNumEBox = (CEdit*)GetDlgItem(IDC_WF_FROMNUM); 00081 toNumEBox = (CEdit*)GetDlgItem(IDC_WF_TONUM); 00082 mltSaveCBtn = (CButton*)GetDlgItem(IDC_WF_MFL); 00083 00084 // ComboBox 00085 fmtsCMBBox->AddString(_T(CT_DATA_STR)); 00086 fmtsCMBBox->AddString(_T(MOON_DATA_STR)); 00087 fmtsCMBBox->AddString(_T(JPEG_RGB_DATA_STR)); 00088 fmtsCMBBox->AddString(_T(JPEG_MONO_DATA_STR)); 00089 fmtsCMBBox->AddString(_T(RAS_DATA_STR)); 00090 00091 CString fmtStr = _T(CT_DATA_STR); // 00092 if (format==CT_DATA) fmtStr = _T(CT_DATA_STR); // 00093 else if (format==CT_3DM) fmtStr = _T(CT_DATA_STR); // 00094 else if (format==MOON_DATA) fmtStr = _T(MOON_DATA_STR); // 00095 else if (format==JPEG_RGB_DATA) fmtStr = _T(JPEG_RGB_DATA_STR); 00096 else if (format==JPEG_MONO_DATA) fmtStr = _T(JPEG_MONO_DATA_STR); 00097 else if (format==RAS_DATA) fmtStr = _T(RAS_DATA_STR); 00098 //else if (format==TIFF_DATA) fmtStr = _T(TIFF_DATA_STR); 00099 //else if (format==PNG_DATA) fmtStr = _T(PNG_DATA_STR); 00100 00101 fmtsCMBBox->SelectString(-1, fmtStr); 00102 setDLGState((LPCTSTR)fmtStr); 00103 setNumBoxState(); 00104 00105 // 00106 if (fName!=_T("")) fnameEBox->SetWindowText(fName); 00107 00108 sntprintf(buf, LNAME, _T("%d"), fromNum); 00109 fromNumEBox->SetWindowText(buf); 00110 00111 sntprintf(buf, LNAME, _T("%d"), toNum); 00112 toNumEBox->SetWindowText(buf); 00113 00114 mltSaveCBtn->SetCheck(0); 00115 00116 return TRUE; 00117 }
void OnOK | ( | ) | [protected, virtual] |
Definition at line 131 of file WriteFilesDLG.cpp.
References CWriteFilesDLG::fName, CWriteFilesDLG::fnameEBox, CWriteFilesDLG::format, CWriteFilesDLG::fromNum, CWriteFilesDLG::fromNumEBox, CWriteFilesDLG::mltSave, CWriteFilesDLG::OnCbnSelchangeWfFormats(), CWriteFilesDLG::toNum, CWriteFilesDLG::toNumEBox, and CWriteFilesDLG::zSize.
00132 { 00133 TCHAR buf[LNAME]; 00134 // memset(buf, 0, LNAME); 00135 00136 fnameEBox->GetWindowText(buf, LNAME); 00137 fName = buf; 00138 00139 fromNumEBox->GetWindowText(buf, LNAME); 00140 fromNum = ttoi(buf); 00141 00142 toNumEBox->GetWindowText(buf, LNAME); 00143 toNum = ttoi(buf); 00144 00145 // Format 00146 this->OnCbnSelchangeWfFormats(); 00147 00148 // 3D 00149 if (!mltSave && zSize>1) { 00150 if (format==CT_DATA) format = CT_3DM; 00151 } 00152 00153 CDialog::OnOK(); 00154 }
void setDLGState | ( | LPCTSTR | fmtstr | ) |
Definition at line 169 of file WriteFilesDLG.cpp.
References CWriteFilesDLG::format, CWriteFilesDLG::mltSave, CWriteFilesDLG::mltSaveCBtn, and CWriteFilesDLG::zSize.
Referenced by CWriteFilesDLG::OnCbnSelchangeWfFormats().
00170 { 00171 if (zSize==1) { 00172 mltSaveCBtn->EnableWindow(FALSE); 00173 mltSaveCBtn->SetCheck(0); 00174 mltSave = FALSE; 00175 } 00176 00177 if (!tcscmp(str,_T(CT_DATA_STR))) { 00178 if (zSize>1) { 00179 mltSaveCBtn->EnableWindow(TRUE); 00180 } 00181 format = CT_DATA; 00182 } 00183 00184 // 以降3次元データとしては保存不可 00185 else if (!tcscmp(str,_T(MOON_DATA_STR))) { 00186 if (zSize>1) { 00187 mltSaveCBtn->EnableWindow(FALSE); 00188 mltSaveCBtn->SetCheck(1); 00189 mltSave = TRUE; 00190 } 00191 format = MOON_DATA; 00192 } 00193 else if (!tcscmp(str,_T(RAS_DATA_STR))) { 00194 if (zSize>1) { 00195 mltSaveCBtn->EnableWindow(FALSE); 00196 mltSaveCBtn->SetCheck(1); 00197 mltSave = TRUE; 00198 } 00199 format = RAS_DATA; 00200 } 00201 else if (!tcscmp(str,_T(JPEG_MONO_DATA_STR))) { 00202 if (zSize>1) { 00203 mltSaveCBtn->EnableWindow(FALSE); 00204 mltSave = TRUE; 00205 mltSaveCBtn->SetCheck(1); 00206 } 00207 format = JPEG_MONO_DATA; 00208 } 00209 else if (!tcscmp(str,_T(JPEG_RGB_DATA_STR))){ 00210 mltSaveCBtn->EnableWindow(FALSE); 00211 mltSaveCBtn->SetCheck(0); 00212 mltSave = FALSE; 00213 format = JPEG_RGB_DATA; 00214 } 00215 else { 00216 if (zSize>1) { 00217 mltSaveCBtn->EnableWindow(FALSE); 00218 mltSaveCBtn->SetCheck(1); 00219 mltSave = FALSE; 00220 } 00221 format = UN_KNOWN_DATA; 00222 } 00223 }
void setNumBoxState | ( | ) |
Definition at line 227 of file WriteFilesDLG.cpp.
References CWriteFilesDLG::fromNumEBox, CWriteFilesDLG::mltSave, CWriteFilesDLG::mltSaveCBtn, and CWriteFilesDLG::toNumEBox.
Referenced by CWriteFilesDLG::OnBnClickedWfMfl(), and CWriteFilesDLG::OnCbnSelchangeWfFormats().
00227 { 00228 // ナンバーBOXの状態 00229 if (mltSaveCBtn->GetCheck()==1) { 00230 fromNumEBox->EnableWindow(TRUE); 00231 toNumEBox->EnableWindow(TRUE); 00232 mltSave = TRUE; 00233 } 00234 else { 00235 fromNumEBox->EnableWindow(FALSE); 00236 toNumEBox->EnableWindow(FALSE); 00237 mltSave = FALSE; 00238 } 00239 }
CComboBox* fmtsCMBBox |
Definition at line 22 of file WriteFilesDLG.h.
Referenced by CWriteFilesDLG::CWriteFilesDLG(), and CWriteFilesDLG::OnCbnSelchangeWfFormats().
CString fName |
Definition at line 28 of file WriteFilesDLG.h.
Referenced by CWriteFilesDLG::CWriteFilesDLG(), and CWriteFilesDLG::OnOK().
CEdit* fnameEBox |
Definition at line 23 of file WriteFilesDLG.h.
Referenced by CWriteFilesDLG::CWriteFilesDLG(), and CWriteFilesDLG::OnOK().
int format |
Definition at line 29 of file WriteFilesDLG.h.
Referenced by CWriteFilesDLG::CWriteFilesDLG(), CWriteFilesDLG::OnOK(), and CWriteFilesDLG::setDLGState().
int fromNum |
Definition at line 30 of file WriteFilesDLG.h.
Referenced by CWriteFilesDLG::CWriteFilesDLG(), and CWriteFilesDLG::OnOK().
CEdit* fromNumEBox |
Definition at line 24 of file WriteFilesDLG.h.
Referenced by CWriteFilesDLG::CWriteFilesDLG(), CWriteFilesDLG::OnOK(), and CWriteFilesDLG::setNumBoxState().
BOOL mltSave |
Definition at line 33 of file WriteFilesDLG.h.
Referenced by CWriteFilesDLG::CWriteFilesDLG(), CWriteFilesDLG::OnOK(), CWriteFilesDLG::setDLGState(), and CWriteFilesDLG::setNumBoxState().
CButton* mltSaveCBtn |
Definition at line 26 of file WriteFilesDLG.h.
Referenced by CWriteFilesDLG::CWriteFilesDLG(), CWriteFilesDLG::setDLGState(), and CWriteFilesDLG::setNumBoxState().
CWnd* pWnd |
Definition at line 20 of file WriteFilesDLG.h.
Referenced by CWriteFilesDLG::CWriteFilesDLG().
int toNum |
Definition at line 31 of file WriteFilesDLG.h.
Referenced by CWriteFilesDLG::CWriteFilesDLG(), and CWriteFilesDLG::OnOK().
CEdit* toNumEBox |
Definition at line 25 of file WriteFilesDLG.h.
Referenced by CWriteFilesDLG::CWriteFilesDLG(), CWriteFilesDLG::OnOK(), and CWriteFilesDLG::setNumBoxState().
int zSize |
Definition at line 32 of file WriteFilesDLG.h.
Referenced by CWriteFilesDLG::CWriteFilesDLG(), CWriteFilesDLG::OnOK(), and CWriteFilesDLG::setDLGState().