CProgressTextDLG Class Reference

#include <ProgressTextDLG.h>

List of all members.

Public Types

enum  { IDD = IDD_PROGTEXT }

Public Member Functions

 CProgressTextDLG (LPCTSTR tn=NULL, BOOL edp=FALSE, CWnd *pParent=NULL)
 CProgressTextDLG (UINT nIDTemplate, LPCTSTR tn=NULL, BOOL edp=FALSE, CWnd *pParent=NULL)
virtual ~CProgressTextDLG ()
BOOL OnInitDialog ()
virtual void Start (int m=100, char *tn=NULL)
virtual void Stop ()
virtual void SetPos (int pos)
virtual void StepIt (int n=1)
virtual void SetTitle (char *tn)
void DispCounter (int n)

Public Attributes

CWnd * pWnd
UINT dialogID
CString title
BOOL enableDisPatcher
CStatic * dCounter

Protected Member Functions

virtual void DoDataExchange (CDataExchange *pDX)
virtual BOOL OnCommand (WPARAM wParam, LPARAM lParam)

Detailed Description

テキストカウンタ:

n<0 で SetPos(n) は "-----" を表示

Definition at line 27 of file ProgressTextDLG.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
IDD 

Definition at line 56 of file ProgressTextDLG.h.

00056 { IDD = IDD_PROGTEXT };


Constructor & Destructor Documentation

CProgressTextDLG ( LPCTSTR  tn = NULL,
BOOL  edp = FALSE,
CWnd *  pParent = NULL 
)

Definition at line 22 of file ProgressTextDLG.cpp.

References CProgressTextDLG::dCounter, CProgressTextDLG::dialogID, CProgressTextDLG::enableDisPatcher, CProgressTextDLG::IDD, CProgressTextDLG::pWnd, and CProgressTextDLG::title.

00023     : CDialog(CProgressTextDLG::IDD, pParent)
00024 {
00025     //{{AFX_DATA_INIT(CProgressTextDLG)
00026         // メモ - ClassWizard はこの位置にマッピング用のマクロを追加または削除します.
00027     //}}AFX_DATA_INIT
00028 
00029     dialogID = CProgressTextDLG::IDD;
00030     pWnd     = pParent;
00031     title    = tn;
00032     enableDisPatcher = edp;
00033     dCounter = NULL;
00034 }

CProgressTextDLG ( UINT  nIDTemplate,
LPCTSTR  tn = NULL,
BOOL  edp = FALSE,
CWnd *  pParent = NULL 
)

Definition at line 38 of file ProgressTextDLG.cpp.

References CProgressTextDLG::dCounter, CProgressTextDLG::dialogID, CProgressTextDLG::enableDisPatcher, CProgressTextDLG::pWnd, and CProgressTextDLG::title.

00039         : CDialog(nIDTemplate, pParent)
00040 {
00041     dialogID = nIDTemplate;
00042     pWnd     = pParent;
00043     title    = tn;
00044     enableDisPatcher = edp;
00045     dCounter = NULL;
00046 }

virtual ~CProgressTextDLG (  )  [inline, virtual]

Definition at line 41 of file ProgressTextDLG.h.

References CProgressTextDLG::Stop().

00041 { Stop();}

Here is the call graph for this function:


Member Function Documentation

void DispCounter ( int  n  ) 

Definition at line 170 of file ProgressTextDLG.cpp.

References CProgressTextDLG::dCounter.

Referenced by CProgressTextDLG::SetPos(), and CProgressTextDLG::StepIt().

00171 {
00172     if (n<0) dCounter->SetWindowText(_T("-----"));
00173     else {
00174         TCHAR buf[LNAME];
00175 //      memset(buf, 0, LNAME);
00176         sntprintf(buf, LNAME, _T("%d") , n);
00177         dCounter->SetWindowText(buf);
00178     }
00179 }

Here is the caller graph for this function:

void DoDataExchange ( CDataExchange *  pDX  )  [protected, virtual]

Definition at line 50 of file ProgressTextDLG.cpp.

00051 {
00052     CDialog::DoDataExchange(pDX);
00053     //{{AFX_DATA_MAP(CProgressTextDLG)
00054         // メモ - ClassWizard はこの位置にマッピング用のマクロを追加または削除します.
00055     //}}AFX_DATA_MAP
00056 }

BOOL OnCommand ( WPARAM  wParam,
LPARAM  lParam 
) [protected, virtual]

Definition at line 154 of file ProgressTextDLG.cpp.

References IDS_STR_CANCELING.

00155 {
00156     if (wParam==IDCANCEL) {
00157         cancel = true;
00158         CString mesg;
00159         mesg.LoadString(IDS_STR_CANCELING);
00160         SetWindowText(mesg);
00161     }
00162 
00163     return TRUE;
00164 
00165 //  return CDialog::OnCommand(wParam, lParam);
00166 }

BOOL OnInitDialog (  ) 

Definition at line 70 of file ProgressTextDLG.cpp.

References IDC_PROGTEXT_MSG.

00071 {
00072     dCounter = (CStatic*)GetDlgItem(IDC_PROGTEXT_MSG);
00073     return TRUE;
00074 }

void SetPos ( int  pos  )  [virtual]

Definition at line 121 of file ProgressTextDLG.cpp.

References CProgressTextDLG::DispCounter(), and CProgressTextDLG::enableDisPatcher.

00122 {
00123     pos = num;
00124     DispCounter(pos);
00125 
00126     if (enableDisPatcher) DisPatcher();
00127 }

Here is the call graph for this function:

void SetTitle ( char *  tn  )  [virtual]

Definition at line 133 of file ProgressTextDLG.cpp.

References jbxwl::mbs2ts(), and CProgressTextDLG::title.

00134 {
00135     if (tn!=NULL) title = mbs2ts(tn);
00136     if (start) SetWindowText(title);
00137 }

Here is the call graph for this function:

void Start ( int  m = 100,
char *  tn = NULL 
) [virtual]

Definition at line 81 of file ProgressTextDLG.cpp.

References CProgressTextDLG::dialogID, jbxwl::mbs2ts(), CProgressTextDLG::pWnd, and CProgressTextDLG::title.

00082 {
00083     cancel = false;
00084     max = m;
00085 
00086     Create(dialogID, pWnd);
00087     ShowWindow(SW_SHOW);
00088     if (tn!=NULL) title = mbs2ts(tn);
00089     if (!title.IsEmpty()) SetWindowText(title);
00090     start = true;
00091 
00092 //  DispCounter(0);
00093 }

Here is the call graph for this function:

void StepIt ( int  n = 1  )  [virtual]

Definition at line 111 of file ProgressTextDLG.cpp.

References CProgressTextDLG::DispCounter(), and CProgressTextDLG::enableDisPatcher.

00112 {
00113     pos += n;
00114     DispCounter(pos);
00115 
00116     if (enableDisPatcher) DisPatcher();
00117 }

Here is the call graph for this function:

void Stop (  )  [virtual]

Definition at line 99 of file ProgressTextDLG.cpp.

References CProgressTextDLG::title.

Referenced by CProgressTextDLG::~CProgressTextDLG().

00100 {
00101     pos   = 0;
00102     title = _T("");
00103     cancel = false;
00104     start  = false;
00105 
00106     DestroyWindow();
00107 }

Here is the caller graph for this function:


Member Data Documentation

CStatic* dCounter
UINT dialogID
CWnd* pWnd
CString title

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

Generated on 15 Nov 2023 for JunkBox_Win_Lib by  doxygen 1.6.1