Set cstring getwindowtext11/11/2022 ![]() ![]() 00103 // The normal edit control (edt1) where the file name is entered is hidden and replaced 00104 // by a "subclassed" edit control (IDC_DIR) of class CDirEdit (derived from CEdit). 00075 // 00076 // Example: 00077 // 00078 // // Called when the Browse button is clicked in CMyDialog 00079 // void CMyDialog::OnBrowseDir() 00080 // 00095 // 00096 // 00097 // INTERNAL DESIGN 00098 // - 00099 // 00100 // The following changes are made to the controls in the standard file open dialog: 00101 // 00102 // The "Open" button is hidden and replaced with another button (IDC_OPEN). 00063 // 00064 // pParentWnd 00065 // A pointer to the dialog parent window. ![]() If NULL is used (the default) then only the 00062 // "no files" entry and an "all files" entry are provided. 00060 // Note that an extra entry is always added that allows the user to hide the 00061 // display of all files. See lpszFilter 00059 // in the documentation for the CFileDialog constructor for more info. 00056 // 00057 // lpszFilter 00058 // The string pairs that specify the file filters to use. 00055 // See lpstrInitialDir in the Win32 documentation for OPENFILENAME for more info. If NULL then the current directory is used. 00048 // 00049 // 00050 // CDirDialog::CDirDialog(LPCTSTR lpstrInitialDir = NULL, 00051 // LPCTSTR lpszFilter = NULL, CWnd* pParentWnd = NULL) 00052 // 00053 // lpstrInitialDir 00054 // The initial directory. If DoModal() return IDOK you can then 00047 // call GetPath() to obtain the name of the directory that the user selected. 00045 // 00046 // Call DoModal() to activate the dialog. For example, to change the 00044 // text that appears in the title bar of the dialog use m_ofn.lpstrTitle. If necessary 00042 // you may then modify values in the m_ofn member of the CFileDialog base class 00043 // (see the Win32 documentation for OPENFILENAME). 00040 // 00041 // Create a CDirDialog object using the constructor described below. Include DirDialog.h 00039 // in the source file(s) where you want to use the CDirDialog class. 00033 // Double-clicking a directory name changes to that directory as normal. When files are 00032 // displayed double clicking of them is ignored (unlike the normal File Open dialog). The normal "Files of Type:" drop down list is available but it has an 00031 // extra entry "Show Folders Only" that is selected by default. 00028 // 00029 // When selecting a directory you would normally not want to see files, but you may on 00030 // occasion. ![]() These characters 00027 // are selected so that the user can type something else and it they will be ignored. If the contents of the 00025 // edit box are the first character(s) of one unique existing directory then the 00026 // rest of the directory name is added to the end of the edit box. 00022 // 00023 // When the user enters other characters and the contents don't end in a backslash 00024 // then automatic directory name completion is attempted. The same is done if 00020 // the user presses the Enter key except that if the directory does not exist the 00021 // user is asked if they want to create it. When the user 00018 // enters a backslash (\) as the last character in the edit control the display is 00019 // changed to show the contents of the directory if it exists. To say that this is 00017 // the directory they want the user must click the "Open" button. 00011 // 00012 // USER INTERFACE 00013 // - 00014 // 00015 // For example, the user can double click on a directory name or type it into the 00016 // edit control to open it in the directory listing display. This dialog has the advantages of the standard 00009 // file open dialog (resizeable, ability to create/delete directories etc) but is 00010 // customized for the selection of a directory rather than a file. 00001 //: 00002 // \file 00003 // \brief creates a directory browsing dialog, it allows to choose both directories and files 00004 // \author Gamze Tunali, LEMS, Brown University 00005 // \date 00006 // 00007 // The CDirDialog class implements a directory selection dialog by deriving from the file 00008 // selection dialog class (CFileDialog). ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |