Click here to Skip to main content
15,908,776 members
Everything / CFileDialog

CFileDialog

CFileDialog

Great Reads

by .dan.g.
Displaying the 'new' Vista/Windows 7 File Dialog in 'old' MFC Apps

Latest Articles

by .dan.g.
Displaying the 'new' Vista/Windows 7 File Dialog in 'old' MFC Apps

All Articles

Sort by Score

CFileDialog 

13 Nov 2011 by .dan.g.
Displaying the 'new' Vista/Windows 7 File Dialog in 'old' MFC Apps
3 Feb 2017 by Maximilien
If I have a CFileDialog with multiple file extensions (filters), is there a way to have it change the filename change its extension depending on the selected filter ?if I have (simplified) the following filter "*.txt;*.xls;*.jpg;*.cpp" and in the file dialog I have a default file name...
3 Jul 2012 by Kyudos
Arrgh! Turns out it wasn't broken after all! Except that under XP, customising CFileDialog automatically resizes the Dlg, and Vista+ doesn't. My check boxes were there, I just had to manually make the dialog bigger so I could see them.
12 Jun 2014 by David O'Neil
The problem you are having is probably using Multi-Byte characters in a Unicode build. If that is the issue, you may be able to solve it by setting your project to use Multi-Byte characters instead. (I believe MFC will switch between the types appropriately, but I'm not sure because I've never...
10 Jul 2023 by Richard MacCutchan
The IFileDialog interface creates a stand-alone (i.e. modeless) dialog that is not connected to the application's Window. So it will be displayed at whatever position is chosen by the system. It seems I was wrong, due to an incorrect...
20 Jul 2011 by krmed
For your default file name, don't supply an extension. Instead of "myfile.txt" simply use "myfile". This way (if your filter is set up correctly) the proper extension will be applied when the user presses OK.A typical filter string would be more like...
31 May 2012 by Sandeep Mewara
It does not work like this here.Here is what is expected of enquirers:1. TRY first what you want to do! You may find that it's not that hard.2. Formulate what was done by you that looks like an issue/not working. Try them and tell if you face issues.Members will be more than happy...
22 Aug 2013 by Member 10198541
I have embedded the skinmagic file SMF into the MFC MainFrame file. This is a SDI program. And there appears some strange phonomenon. I use the OPENFILENAME struture to open file, and it popup a dialog which is with the same skin with the mainframe. But this dialog has a button name HELP bottom...
12 Jun 2014 by Sergey Alexandrovich Kryukov
In addition to Solution 1, on "_T" generic types: this CodeProject article provides a good explanation: What are TCHAR, WCHAR, LPSTR, LPWSTR, LPCTSTR (etc.)?[^].—SA
3 Apr 2015 by N3KK
Hi there,I have my application launching through System Tray.But whenever I open Browse window in it it gives error that "C:\Windows\System32\config\systemprofile\Desktop refers to location that is unavailable"what could be possible reason ? how to resolve?
5 Apr 2015 by N3KK
I am starting my application by a Service. Now When I want to save afile, I tried using CFileDialog. but when ever I select "desktop" itprompts a message as "C:Windows\system32\config\systemprofile\desktop"refers to location that iss unavailable. It could be hard drive on thiscomputer,...
4 Apr 2015 by OriginalGriff
Now check your spelling:"C:\document and setting\networkService"Is not the same as "C:\Documents and Settings\NetworkService"And there is unlikely to be a "Desktop" folder in either of them!So if you are trying to set the file dialog to the Desktop, you would be better off getting the...
5 Apr 2015 by Richard MacCutchan
The Desktop directory is part of the user profile. Starting an application from a service means that it does not have a user profile and therefore no desktop.
12 Apr 2015 by N3KK
I got the solution for my problem hereLaunch your application in Vista under the local system account without the UAC popup[^]any suggestions in the code are always welcome :)Problem was, When I was launching my application through services, process was getting created in the context...
27 Oct 2017 by KarstenK
The CFileDialog is a bit tricky, so I remember messing around with it some years ago. I think the article Displaying the 'new' Vista/Windows 7 File Dialog shows what solved my problems or the broader article XFileDialog - Customizing CFileDialog with its links should finally help you. If you...
27 Oct 2017 by Richard MacCutchan
Strangely enough nothing has changed since you posted this same question at How to Disable open drop down - ATL / WTL / STL Discussion Boards[^] and Vista Goodies in C++: Using the New Vista File Dialogs[^]. Please do not repost, but reply to people who have alreay offered suggestions.
6 Jul 2023 by Kyudos
It's a somewhat minor niggle - but whenever I use a resizable IFileDialog (a new "Vista style" CFileDialog) it doesn't open centred in the specified parent window. It looks like it is centring to some default size, but not accounting for the...
2 Jul 2012 by Kyudos
In my MFC app (from VC6) I have a class dervied from CFileDialog for the purposes of customisation. I add a couple of check boxes in OnInitDialog and everything USED to work OK - on XP.Now, compiling in VS2010 on Win7, this method no longer works and I guess I need to use...
12 Jun 2014 by Member 10446157
So I run coding based on 2008 coding in visual 2012. So I havent found any example on how to write it in visual 2012. The errorgaschedule\gaschedule\childview.cpp(333): error C2664: 'Configuration::ParseFile' : cannot convert parameter 1 from 'wchar_t *' to 'char *' Types...
27 Oct 2017 by yaswanthdasari
Hi, I am using CFiledialog's vista style to have the latest style of the windows, In win 10 its working good where as in Win 7 Ultimate. I'm getting a warning message like the media is write protected. I don't want the default drop down for open button in this application. if its not...