ENH: mark some vars as advanced (and resort the list)
[cmake.git] / Source / MFCDialog / PathDialog.h
blob704f96bb310c412dee735b3f1b11c21a3fd5dd6f
1 /*=========================================================================
3 Program: Insight Segmentation & Registration Toolkit
4 Module: $RCSfile: PathDialog.h,v $
5 Language: C++
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 //////////////////////////////////////////////////////////////////////////
18 //PathDialog.h file
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_
26 #if _MSC_VER > 1000
27 #pragma once
28 #endif // _MSC_VER > 1000
29 // PathDialog.h : header file
31 #include "shlobj.h"
33 class CPathDialog;
35 // CPathDialogSub - intercepts messages from child controls
36 class CPathDialogSub : public CWnd
38 friend CPathDialog;
39 public:
40 CPathDialog* m_pPathDialog;
41 protected:
42 afx_msg void OnOK(); // OK button clicked
43 afx_msg void OnChangeEditPath();
44 DECLARE_MESSAGE_MAP()
45 private:
48 /////////////////////////////////////////////////////////////////////////////
49 // CPathDialog dialog
51 class CPathDialog
53 friend CPathDialogSub;
54 // Construction
55 public:
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);
69 private:
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];
77 BROWSEINFO m_bi;
78 HWND m_hWnd;
79 CWnd* m_pParentWnd;
80 BOOL m_bParentDisabled;
81 BOOL m_bGetSuccess;
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_)