1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: PathDialog.h,v $
6 Date: $Date: 2002-02-25 17:47:20 $
7 Version: $Revision: 1.3 $
9 Copyright (c) 2002 Insight Consortium. All rights reserved.
10 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 //////////////////////////////////////////////////////////////////////////
20 //Written by Nguyen Tan Hung <tanhung@yahoo.com>
21 //////////////////////////////////////////////////////////////////////////
23 #if !defined(AFX_PATHDIALOG_H__0F70BC86_11DB_11D4_B012_0000E8DD8DAA__INCLUDED_)
24 #define AFX_PATHDIALOG_H__0F70BC86_11DB_11D4_B012_0000E8DD8DAA__INCLUDED_
28 #endif // _MSC_VER > 1000
29 // PathDialog.h : header file
35 // CPathDialogSub - intercepts messages from child controls
36 class CPathDialogSub
: public CWnd
40 CPathDialog
* m_pPathDialog
;
42 afx_msg
void OnOK(); // OK button clicked
43 afx_msg
void OnChangeEditPath();
48 /////////////////////////////////////////////////////////////////////////////
53 friend CPathDialogSub
;
56 CPathDialog(LPCTSTR lpszCaption
=NULL
,
57 LPCTSTR lpszTitle
=NULL
,
58 LPCTSTR lpszInitialPath
=NULL
,
59 CWnd
* pParent
= NULL
);
61 CString
GetPathName();
62 virtual int DoModal();
64 static int Touch(LPCTSTR lpPath
, BOOL bValidate
=TRUE
);
65 static int MakeSurePathExists(LPCTSTR lpPath
);
66 static BOOL
IsFileNameValid(LPCTSTR lpFileName
);
67 static int ConcatPath(LPTSTR lpRoot
, LPCTSTR lpMorePath
);
70 static int CALLBACK
BrowseCallbackProc(HWND hwnd
,UINT uMsg
,LPARAM lParam
, LPARAM pData
);
72 LPCTSTR m_lpszCaption
;
73 LPCTSTR m_lpszInitialPath
;
75 TCHAR m_szPathName
[MAX_PATH
];
80 BOOL m_bParentDisabled
;
83 CPathDialogSub m_PathDialogSub
;
87 //{{AFX_INSERT_LOCATION}}
88 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
90 #endif // !defined(AFX_PATHDIALOG_H__0F70BC86_11DB_11D4_B012_0000E8DD8DAA__INCLUDED_)