Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » How to customize "File Open" dialog? Collapse All
Subject Author Date
Anil Siddhpura Jan 30, 2009 - 11:30 PM

Hi,


How to customize "Open File" dialog?


I am using CExtShellDialogFile class instead of CFileDialog class of windows. I want to make this "Open file" dialog readonly. And user can only access "removable drives" through this dialog. So how to customize like this?


Regards,


Apurv Shah


 

roman davis Feb 10, 2021 - 1:39 AM

I have been working on Computer for ten years and I have a great idea about saving the files and about customize them because I have to save data as a record. Now I am marketing for https://www.theacademicpapers.co.uk/dissertation-writing-services-uk.php which is the best writing company in the UK for those students who are facing many problems in the completion of their thesis.

Dixie Weber Jan 16, 2021 - 12:52 AM
Mohammed Moss Dec 29, 2020 - 4:20 AM

Text reports and all other modalities are covered for the aimed items for humans. The change of the https://assignmentman.co.uk/buy-assignment/ is fit for the goals. The round of applause is a field for the anticipation for the goals and regular features of the service.

Anil Siddhpura Feb 26, 2009 - 11:45 PM

Hi,


No, it’s different email-id. But you have replied to that id so many times. Just this time I did not get reply. So i am again droping a mail. Please reply to me with update source code.


Regards,


Apurv Shah

Technical Support Feb 26, 2009 - 1:25 PM

We didn’t receive your e-mail. Did you send it using the same mail box return address as you used for registering on this web site?

Anil Siddhpura Feb 25, 2009 - 10:33 PM

Hi,


As you said I had drop you an email for updated source code. But I still not got any reply for that. Please reply me as it’s urgent for me.


 


 

Technical Support Feb 12, 2009 - 12:02 PM

Thank you for reporting the editor issue. To fix it, please update the .../Prof-UIS/Src/ExtEdit.cpp and .../Prof-UIS/Include/ExtEdit.h files from the following ZIP file:

http://www.prof-uis.com/download/forums/tmp/Updated_CExtEditBase_285_2.zip

We added m_dwAttributeFilterAny, m_dwAttributeFilterAllPresent and m_dwAttributeFilterAllAbsent properties to the CExtShellComboBox class. The same properties are present in the CExtShellListCtrl and CExtShellTreeCtrl classes. So, now the CExtShellComboBox class can filter shell items as well as the CExtShellListCtrl and CExtShellTreeCtrl classes can do and you can specify the SFGAO_REMOVABLE flag in the CExtShellComboBox::m_dwAttributeFilterAllPresent property to make the shell combo box displaying removable drives only. You can drop us an e-mail so we will provide you with a source code update for the shell classes.

Anil Siddhpura Feb 11, 2009 - 12:34 AM

Hi,

Thanks for your help.

Yes i know it displays the read-only file names editor but still i can edit the name of file in that editor.

Also,
there is a Look in "Combobox" in that Open file dialog & it displays all Drives of computer starting from Desktop. I want to show only removable drives in this combobox as well. So how to do this?

Regards,
Apurv Shah

Technical Support Feb 9, 2009 - 5:15 AM

We run the ProfUIS_Controls sample application, selected the File Dialog page, checked the Read-only file name(s) edit check box and clicked the Show Prof-UIS File dialog button. The displayed file dialog had the read-only file names editor. We are sorry, but the CExtShellDialogFile requires a small improvement for displaying custom shell root item in its tree control. Please add the following public property into it:

   CExtPIDL m_pidlRoot;

Then please the following line in the CExtShellDialogFile::OnInitDialog() method:
   m_wndShellTree.RefreshShellRoot();

And replace it with the following code:
   if( ! m_pidlRoot.IsEmpty() )
                        m_wndShellTree.RefreshShellRoot( m_pidlRoot.GetPtr() );
            else
                        m_wndShellTree.RefreshShellRoot();

Now the CExtShellDialogFile class can be configured for displaying custom shell root:
   VERIFY( dlgShellFile.m_pidlRoot.GetSpecialFolderLocation( m_hWnd, CSIDL_DRIVES ) );

We also added two new flag properties into the the CExtShellDialogFile class: m_bEnableButtonCreateNewFolder and m_bEnableButtonDelete. They allow to disable dialog buttons like you requested. Please drop us an e-mail and we will provide you with the source code update.

Anil Siddhpura Feb 3, 2009 - 10:00 PM

Hi,


Please reply me. It’s urgent for me.


Regards,


Apurv Shah

Anil Siddhpura Feb 2, 2009 - 3:00 AM

Hi,


Thanks for your reply.


As you said I tried to set "My Computer" as root item, but it’s not working and still the Desktop is root item.


Also, i set  CExtShellDialogFile::m_bReadOnlyFileNamesEdit to true, but still i can change the name of file in that Editbox.


There are Create new folder & delete buttons in Open File dialog. I don’t want to show these buttons to user or can i disable these buttons?


Regards,


Apurv Shah


 

Technical Support Feb 1, 2009 - 11:46 AM

The CExtShellDialogFile::m_bReadOnlyFileNamesEdit property allows you to make read-only the single line file name editor inside the shell file dialog. The CExtShellDialogFile::m_bShowFileNamesEdit property allows you to hide the file name editor. The CExtShellDialogFile::m_wndShellTree and CExtShellDialogFile::m_wndShellList properties are public and you can access them. They are the CExtShellTreeCtrl and CExtShellListCtrl controls created inside the shell file dialog. Both these classes have three DWORD properties containing combinations of the SFGAO_*** flags defined in the shell related part of Win32 API for filtering shell items: m_dwAttributeFilterAny, m_dwAttributeFilterAllPresent and m_dwAttributeFilterAllAbsent. The m_dwAttributeFilterAllPresent and m_dwAttributeFilterAllAbsent are initially zero. You need to assign the SFGAO_REMOVABLE flag to the m_dwAttributeFilterAllPresent property of the CExtShellDialogFile::m_wndShellTree property. As result, tree control will display only removable drives. You can also assign PIDL of the My Computer shell item to the CExtShellTreeCtrl::m_pidlRoot property and, as result, the My Computer shell item will be used as root item instead of the Desktop item. Here is how to compute it:
CExtPIDL pidlMyComputer;
VERIFY( pidlMyComputer.GetSpecialFolderLocation( m_hWnd, CSIDL_DRIVES ) );