Hy, i have used this for my own openfile dialog. Now i have problems, when my app is running under Vista and W7. Anybody has an idea, of improving my software to run under Vista? I am using MSVC 2008 C++ MFC Thanks Bodo
ReplyOriginally posted by: Kazima
Thank you.
Is there any way you can disable the up one level button through policy editor or regedit.
Originally posted by: Ryan J O'Boril
1. add these global variables in CCustomFileDlg.cpp:
HWND hWndList = NULL;
////////////////////////////////////////////
2. then, in the hook function, add a line to store the listview handle:
if(strcmp(_strlwr(szClassName), _T("syslistview32")) == 0)
/////////////////////////////////////////////
3. do the same thing with the edit box:
if(strcmp(_strlwr(szClassName), _T("edit")) == 0)
//rest of code .......
//////////////////////////////////////////////
4. Finally, right before the hook function returns, add this line:
if (GetFocus() == hWndList)
i hope this helps someone who had the same problem i had. in closing, i would just like to say that MFC sucks ass hardcore.
_ryan
here is a slick (IMHO) solution to the problem of the user being able to click in the list view and press the backspace key to go up a directory:
HWND hWndEdit = NULL;
{
hWndList = x -> hwnd; //store listview handle
//rest of code .......
{
hWndEdit = x->hwnd;
SetFocus(hWndEdit);
Basically, the user must first click in the listview to give it the focus before they can press backspace to go up a directory. This modification puts the focus back on the edit box whenever the listview has the focus. Since the list view never has the focus, the user can never use backspace to go up a directory.
Originally posted by: prasanna
how to use CFileDialog class ,such that it provide a way for the user to select a file from the displayed items.
we should get the name of file &path
please reply soon
Thank's in advance
Originally posted by: Lolo
user still can access directory if he presses the backspace key
ReplyOriginally posted by: Vo Thanh Hoa
I can change all the texts in the appearance of the File Dialog ( "Look in", "OK", "Cancel") to my own texts. But I can not catch the message box showing up when you enter a wrong path to customize it.
I have try many ways without success ( message handle "OnFileNameOK", hook procedure in OPENFILESTRUTURE)
Originally posted by: piperatom
By far the best approach to messing around with common dialogs.
The hook part has been really described well.
Thanks mate!
Originally posted by: Roman Panlyuk
I'd like to customize Open/Save dialogs so that I could browse web directories af if they were files. All I need is to be able to intercept ChengeDir action and fill it with my own items. I do not see any events for doung this. Am I bnlind or this is impossible.
Please also answer to e-mail john@eleks.lviv.ua
Thanks,
Roman
Originally posted by: Klaus Bucher
Klaus
This article demonstrates very best how to use hook-
functions to manipulate the CommomDialog�s. To this example
: it�s always possible to go up a folder by the backspace.
To forbid this, you have to install another hook
(WH_KEYBOARD) to catch the backspace.
On my side, I expandend the example so that the initial
folder is a virtual-root-folder. The user can go down to
subfolders, and go back up maximal to the initial folder.
Thank you Shanker
Originally posted by: Niall
I am trying to find the ID's for the toolbar buttons
in the top right hand corner of the dialog e.g.
the Move Up button of the commom File Open Dialog