Questions tagged [cfiledialog]
51 questions
2
votes
0 answers
Can't edit combo box value in CFiledialog in Windows XP SP3
The Custome FileDialog which I derived from CFiledialog.
In it's OnInitDialog() I updated it's layout to WS_EX_LAYOUTRTL (for arabic) then I set callback method SetChildLayout to Enumerate all child item and set it's layout to WS_EX_LAYOUTRTL.
After…

Indraraj
- 255
- 3
- 13
2
votes
2 answers
mfc CFileDialog using IFileOpenDialog to browse for folder
i found the following code to allow me to browse for a folder
CFileDialog od(TRUE/*bOpenFileDialog*/, NULL, NULL, OFN_HIDEREADONLY |
OFN_OVERWRITEPROMPT , NULL, NULL, 0, TRUE/*bVistaStyle*/);
IFileOpenDialog *…

steveh
- 1,352
- 2
- 27
- 41
1
vote
3 answers
Where should I declare an instance in c++?
Such a newbie question I know but I can't seem to find any answers online. Basically I am using the CFile Dialog and not sure if I should put it in the .cpp file or the header file. Thanks in advance.
CFileDialog( BOOL bOpenFileDialog,
…

bigbaz34
- 385
- 2
- 8
- 27
1
vote
1 answer
(CFileDialog) Is there any way to select multiple files from separate folders, without closing dialog?
I'm trying to utilize one of CFileDialog's parameter OFN_ALLOWMULTISELECT to allow user to select multiple file paths with ctrl+click. However, it doesn't fulfill my goal which is to also make selections from other folders without opening and…

Sin Han Jinn
- 574
- 3
- 18
1
vote
0 answers
How to avoid an Invalid Argument exception when calling SetControlText in a CFileDialog
I inherited some code that is clearly based on this discussion:
cfiledialog and file extension
The code reads:
#define FILE_DIALOG_NAME cmb13
// CStarMaskDlg dialog
/* ------------------------------------------------------------------- */
class…

David Partridge
- 79
- 4
1
vote
2 answers
Customizing CFileDialog error messages
It would be nice if there is a way to customize the CFileDialog error messages.
For example, Entering an invalid drive in the File name edit box causes an error message like below.
I want to show a different error here. Is it possible without…

Ragesh Chakkadath
- 1,521
- 1
- 14
- 32
1
vote
0 answers
Reposition filter controls on CFileDialog
I display a CFileDialog:
CFileDialog dlgImport(TRUE,
_T(".XSL"), _T(""), OFN_ALLOWMULTISELECT | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY, strFilter, this);
ZeroMemory(pszFile, 32767 * sizeof(TCHAR));
dlgImport.m_ofn.lpstrFile =…

Andrew Truckle
- 17,769
- 16
- 66
- 164
1
vote
0 answers
How do you control the size and position of new controls when customising CFileDialog?
I'm customising a CFileDialog "Save As" dialog, using the built in tools. I'm simply adding a new text label (AddText or StartVisualGroup) and a new combo box (AddComboBox). It all works fine, but I don't like the positioning and sizing of the new…

Kyudos
- 625
- 4
- 18
1
vote
1 answer
CFileDialog file name change?
I've successfully subclassed a CFileDialog and added an area with a few controls that control load/save file format using SetTemplate(). My control message handlers are being called correctly.
Depending on the file name typed, my controls may need…

Swiss Frank
- 1,985
- 15
- 33
1
vote
0 answers
CFileDialog shows different contents according to Windows versions
I tried to show only the drives shared with Remote Desktop in a file selection dialog. Below is what I want to show:
(Image) Windows 10 - Only the shared drives are shown.
But the list of the drives and folders in the left pane are different…

nodchip
- 361
- 1
- 3
- 10
1
vote
1 answer
Using CFolderPickerDialog for the purpose of 'Save As' (MFC)
I would like to use a CFolderPickerDialog instance for the purpose of 'Save As'.
In other words, the user will input the name of a (new) folder, which I can then create.
With the CFileDialog base class, this can be done during construction via the…

goodvibration
- 5,980
- 4
- 28
- 61
1
vote
1 answer
CFileDialog - prevent delete
I have a file open/save dialog derived from CFileDialog. Is there anyway to prevent a user from deleting files while browsing using this dialog programmatically? Currently they can right-click and get to the Windows explorer context menu OR just…

JDoe1234
- 11
- 4
1
vote
0 answers
MFC C++ Derived CFileDialog can't tell when filename editbox is edited
I have a custom derived CFileDialog. I can detect when the list control is updated, and the user clicks a file, but I can't find any way to tell when the user just types in the filename. This would be ideal, as based on what file they chooses, it…

Mary Ellen Bench
- 589
- 1
- 8
- 28
1
vote
1 answer
CFile write function
I have got a question about the MFC CFile write function.
I am learning about MFC application and stuck at this Save As and write function.
When I click the TestButton, a save as dialog box would pop out prompting to save as txt file.
void…

Ashton
- 83
- 1
- 3
- 12
1
vote
2 answers
CFileDialog's current directory inconsistent in .exe and .dll
Normally, when you use CFileDialog to open a file multiple times, current directory is maintained. I.e., each time the dialog opens at the directory where previous dialog ended (if it was not cancelled). And this works even if you use different…

Steed
- 1,292
- 1
- 14
- 33