JunkBox_Win_Lib 1.5.3
Loading...
Searching...
No Matches
CWriteFilesDLG Class Reference

#include <WriteFilesDLG.h>

Inheritance diagram for CWriteFilesDLG:
Collaboration diagram for CWriteFilesDLG:

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 ()
 

Detailed Description

Definition at line 17 of file WriteFilesDLG.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
IDD 

Definition at line 47 of file WriteFilesDLG.h.

47{ IDD = IDD_WFDLG };
#define IDD_WFDLG
Definition resource.h:10

Constructor & Destructor Documentation

◆ CWriteFilesDLG()

CWriteFilesDLG ( LPCTSTR fname,
int fmtm,
int fnum,
int tnum,
CWnd * pParent = NULL )

Definition at line 21 of file WriteFilesDLG.cpp.

22 : CDialog(CWriteFilesDLG::IDD, pParent)
23{
24 //{{AFX_DATA_INIT(CWriteFilesDLG)
25 // メモ - ClassWizard はこの位置にマッピング用のマクロを追加または削除します.
26 //}}AFX_DATA_INIT
27
28 fmtsCMBBox = NULL;
29 fnameEBox = NULL;
30 fromNumEBox = NULL;
31 toNumEBox = NULL;
32 mltSaveCBtn = NULL;
33
34 pWnd = pParent;
35 fName = fname;
36 format = fmt;
37 fromNum = fnum;
38 toNum = tnum;
39 mltSave = FALSE;
40 zSize = abs(tnum - fnum) + 1;
41}

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.

◆ ~CWriteFilesDLG()

~CWriteFilesDLG ( )
virtual

Definition at line 45 of file WriteFilesDLG.cpp.

46{
47}

Member Function Documentation

◆ DoDataExchange()

void DoDataExchange ( CDataExchange * pDX)
protectedvirtual

Definition at line 51 of file WriteFilesDLG.cpp.

52{
53 CDialog::DoDataExchange(pDX);
54 //{{AFX_DATA_MAP(CWriteFilesDLG)
55 // メモ - ClassWizard はこの位置にマッピング用のマクロを追加または削除します.
56 //}}AFX_DATA_MAP
57}

◆ OnBnClickedWfMfl()

void OnBnClickedWfMfl ( )

Definition at line 243 of file WriteFilesDLG.cpp.

244{
246}

References CWriteFilesDLG::setNumBoxState().

Here is the call graph for this function:

◆ OnCbnSelchangeWfFormats()

void OnCbnSelchangeWfFormats ( )

Definition at line 158 of file WriteFilesDLG.cpp.

159{
160 TCHAR buf[LNAME];
161 fmtsCMBBox->GetWindowText(buf, LNAME);
162
163 setDLGState(buf);
165}
void setDLGState(LPCTSTR fmtstr)

References CWriteFilesDLG::fmtsCMBBox, CWriteFilesDLG::setDLGState(), and CWriteFilesDLG::setNumBoxState().

Referenced by CWriteFilesDLG::OnOK().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnInitDialog()

BOOL OnInitDialog ( )
virtual

Definition at line 73 of file WriteFilesDLG.cpp.

74{
75 TCHAR buf[LNAME];
76// memset(buf, 0, LNAME);
77
78 fmtsCMBBox = (CComboBox*)GetDlgItem(IDC_WF_FORMATS);
79 fnameEBox = (CEdit*)GetDlgItem(IDC_WF_FNAME);
80 fromNumEBox = (CEdit*)GetDlgItem(IDC_WF_FROMNUM);
81 toNumEBox = (CEdit*)GetDlgItem(IDC_WF_TONUM);
82 mltSaveCBtn = (CButton*)GetDlgItem(IDC_WF_MFL);
83
84 // ComboBox
85 fmtsCMBBox->AddString(_T(CT_DATA_STR));
86 fmtsCMBBox->AddString(_T(MOON_DATA_STR));
87 fmtsCMBBox->AddString(_T(JPEG_RGB_DATA_STR));
88 fmtsCMBBox->AddString(_T(JPEG_MONO_DATA_STR));
89 fmtsCMBBox->AddString(_T(RAS_DATA_STR));
90
91 CString fmtStr = _T(CT_DATA_STR); //
92 if (format==CT_DATA) fmtStr = _T(CT_DATA_STR); //
93 else if (format==CT_3DM) fmtStr = _T(CT_DATA_STR); //
94 else if (format==MOON_DATA) fmtStr = _T(MOON_DATA_STR); //
95 else if (format==JPEG_RGB_DATA) fmtStr = _T(JPEG_RGB_DATA_STR);
96 else if (format==JPEG_MONO_DATA) fmtStr = _T(JPEG_MONO_DATA_STR);
97 else if (format==RAS_DATA) fmtStr = _T(RAS_DATA_STR);
98 //else if (format==TIFF_DATA) fmtStr = _T(TIFF_DATA_STR);
99 //else if (format==PNG_DATA) fmtStr = _T(PNG_DATA_STR);
100
101 fmtsCMBBox->SelectString(-1, fmtStr);
102 setDLGState((LPCTSTR)fmtStr);
104
105 //
106 if (fName!=_T("")) fnameEBox->SetWindowText(fName);
107
108 sntprintf(buf, LNAME, _T("%d"), fromNum);
109 fromNumEBox->SetWindowText(buf);
110
111 sntprintf(buf, LNAME, _T("%d"), toNum);
112 toNumEBox->SetWindowText(buf);
113
114 mltSaveCBtn->SetCheck(0);
115
116 return TRUE;
117}
#define IDC_WF_TONUM
Definition resource.h:37
#define IDC_WF_MFL
Definition resource.h:38
#define IDC_WF_FORMATS
Definition resource.h:39
#define IDC_WF_FNAME
Definition resource.h:35
#define IDC_WF_FROMNUM
Definition resource.h:36

References IDC_WF_FNAME, IDC_WF_FORMATS, IDC_WF_FROMNUM, IDC_WF_MFL, and IDC_WF_TONUM.

◆ OnOK()

void OnOK ( )
protectedvirtual

Definition at line 131 of file WriteFilesDLG.cpp.

132{
133 TCHAR buf[LNAME];
134// memset(buf, 0, LNAME);
135
136 fnameEBox->GetWindowText(buf, LNAME);
137 fName = buf;
138
139 fromNumEBox->GetWindowText(buf, LNAME);
140 fromNum = ttoi(buf);
141
142 toNumEBox->GetWindowText(buf, LNAME);
143 toNum = ttoi(buf);
144
145 // Format
147
148 // 3D
149 if (!mltSave && zSize>1) {
150 if (format==CT_DATA) format = CT_3DM;
151 }
152
153 CDialog::OnOK();
154}
afx_msg void OnCbnSelchangeWfFormats()

References CWriteFilesDLG::fName, CWriteFilesDLG::fnameEBox, CWriteFilesDLG::format, CWriteFilesDLG::fromNum, CWriteFilesDLG::fromNumEBox, CWriteFilesDLG::mltSave, CWriteFilesDLG::OnCbnSelchangeWfFormats(), CWriteFilesDLG::toNum, CWriteFilesDLG::toNumEBox, and CWriteFilesDLG::zSize.

Here is the call graph for this function:

◆ setDLGState()

void setDLGState ( LPCTSTR fmtstr)

Definition at line 169 of file WriteFilesDLG.cpp.

170{
171 if (zSize==1) {
172 mltSaveCBtn->EnableWindow(FALSE);
173 mltSaveCBtn->SetCheck(0);
174 mltSave = FALSE;
175 }
176
177 if (!tcscmp(str,_T(CT_DATA_STR))) {
178 if (zSize>1) {
179 mltSaveCBtn->EnableWindow(TRUE);
180 }
181 format = CT_DATA;
182 }
183
184 // 以降3次元データとしては保存不可
185 else if (!tcscmp(str,_T(MOON_DATA_STR))) {
186 if (zSize>1) {
187 mltSaveCBtn->EnableWindow(FALSE);
188 mltSaveCBtn->SetCheck(1);
189 mltSave = TRUE;
190 }
191 format = MOON_DATA;
192 }
193 else if (!tcscmp(str,_T(RAS_DATA_STR))) {
194 if (zSize>1) {
195 mltSaveCBtn->EnableWindow(FALSE);
196 mltSaveCBtn->SetCheck(1);
197 mltSave = TRUE;
198 }
199 format = RAS_DATA;
200 }
201 else if (!tcscmp(str,_T(JPEG_MONO_DATA_STR))) {
202 if (zSize>1) {
203 mltSaveCBtn->EnableWindow(FALSE);
204 mltSave = TRUE;
205 mltSaveCBtn->SetCheck(1);
206 }
207 format = JPEG_MONO_DATA;
208 }
209 else if (!tcscmp(str,_T(JPEG_RGB_DATA_STR))){
210 mltSaveCBtn->EnableWindow(FALSE);
211 mltSaveCBtn->SetCheck(0);
212 mltSave = FALSE;
213 format = JPEG_RGB_DATA;
214 }
215 else {
216 if (zSize>1) {
217 mltSaveCBtn->EnableWindow(FALSE);
218 mltSaveCBtn->SetCheck(1);
219 mltSave = FALSE;
220 }
221 format = UN_KNOWN_DATA;
222 }
223}

References CWriteFilesDLG::format, CWriteFilesDLG::mltSave, CWriteFilesDLG::mltSaveCBtn, and CWriteFilesDLG::zSize.

Referenced by CWriteFilesDLG::OnCbnSelchangeWfFormats().

Here is the caller graph for this function:

◆ setNumBoxState()

void setNumBoxState ( )

Definition at line 227 of file WriteFilesDLG.cpp.

227 {
228 // ナンバーBOXの状態
229 if (mltSaveCBtn->GetCheck()==1) {
230 fromNumEBox->EnableWindow(TRUE);
231 toNumEBox->EnableWindow(TRUE);
232 mltSave = TRUE;
233 }
234 else {
235 fromNumEBox->EnableWindow(FALSE);
236 toNumEBox->EnableWindow(FALSE);
237 mltSave = FALSE;
238 }
239}

References CWriteFilesDLG::fromNumEBox, CWriteFilesDLG::mltSave, CWriteFilesDLG::mltSaveCBtn, and CWriteFilesDLG::toNumEBox.

Referenced by CWriteFilesDLG::OnBnClickedWfMfl(), and CWriteFilesDLG::OnCbnSelchangeWfFormats().

Here is the caller graph for this function:

Member Data Documentation

◆ fmtsCMBBox

CComboBox* fmtsCMBBox

◆ fName

CString fName

Definition at line 28 of file WriteFilesDLG.h.

Referenced by CWriteFilesDLG::CWriteFilesDLG(), and CWriteFilesDLG::OnOK().

◆ fnameEBox

CEdit* fnameEBox

Definition at line 23 of file WriteFilesDLG.h.

Referenced by CWriteFilesDLG::CWriteFilesDLG(), and CWriteFilesDLG::OnOK().

◆ format

◆ fromNum

int fromNum

Definition at line 30 of file WriteFilesDLG.h.

Referenced by CWriteFilesDLG::CWriteFilesDLG(), and CWriteFilesDLG::OnOK().

◆ fromNumEBox

CEdit* fromNumEBox

◆ mltSave

◆ mltSaveCBtn

CButton* mltSaveCBtn

◆ pWnd

CWnd* pWnd

Definition at line 20 of file WriteFilesDLG.h.

Referenced by CWriteFilesDLG::CWriteFilesDLG().

◆ toNum

int toNum

Definition at line 31 of file WriteFilesDLG.h.

Referenced by CWriteFilesDLG::CWriteFilesDLG(), and CWriteFilesDLG::OnOK().

◆ toNumEBox

CEdit* toNumEBox

◆ zSize


The documentation for this class was generated from the following files: