 |
|
 |
thank you wonderful code!
|
|
|
|
 |
|
 |
Thanks for the reply. I do not have Platform SDK but will see if I can get it. Meanwhile, this is from Visual Studio 6.
Thanks! James
--------------------Configuration: FolderDlg - Win32 ReleaseU--------------------
Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
dialog.cpp
C:\_Projects\FolderDlg_Proj\FolderDlg_Proj\dialog.cpp(105) : error C2065: 'ULONG_PTR' : undeclared identifier
C:\_Projects\FolderDlg_Proj\FolderDlg_Proj\dialog.cpp(105) : error C2146: syntax error : missing ';' before identifier 'ulStyle'
C:\_Projects\FolderDlg_Proj\FolderDlg_Proj\dialog.cpp(105) : error C2065: 'ulStyle' : undeclared identifier
C:\_Projects\FolderDlg_Proj\FolderDlg_Proj\dialog.cpp(105) : error C2039: 'GetClassLongPtr' : is not a member of '`global namespace''
C:\_Projects\FolderDlg_Proj\FolderDlg_Proj\dialog.cpp(105) : error C2065: 'GetClassLongPtr' : undeclared identifier
C:\_Projects\FolderDlg_Proj\FolderDlg_Proj\dialog.cpp(107) : error C2039: 'SetClassLongPtr' : is not a member of '`global namespace''
C:\_Projects\FolderDlg_Proj\FolderDlg_Proj\dialog.cpp(107) : error C2065: 'SetClassLongPtr' : undeclared identifier
FilteredFolderDlg.cpp
FolderDlg.cpp
HyperLink.cpp
main.cpp
Generating Code...
Error executing cl.exe.
FolderDlg.exe - 7 error(s), 0 warning(s)
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
Hi,
I love the final result of your work. I am new at the Visual part of the C++ world having done mostly C on micros.
Can you please tell me what version this is set up for?
I am unable to build the application using either Visual Studio 6 or the express version of 2010.
Many thanks!
James
|
|
|
|
 |
|
 |
Please try Platform SDK 2003 or later. If no success could you also provide build output?
#define __ARMEN_H__
|
|
|
|
 |
|
|
 |
|
 |
Hi, when i select "my network places", for example \\10.5.6.91\c$, i cant open this folder because need the user and pass.
How can i solve this problem?
thanks.
|
|
|
|
 |
|
 |
I found a problem: if initial path situated in some other network and you can not reach it, for example \\12.1.100.52\... then DoModal hangs up.
I solved it by adding a check for existance:
VOID CFolderDialog::SetSelection( IN LPCTSTR pszPath )
{
ASSERT( m_hWnd != NULL );
ASSERT( AfxIsValidString( pszPath, MAX_PATH ) );
// Dmitry Barovik. 18.01.2010. Add check for existence
if (PathFileExists(pszPath))
::SendMessage(m_hWnd, BFFM_SETSELECTION, (WPARAM)TRUE, (LPARAM)pszPath);
else
::SendMessage(m_hWnd, BFFM_SETSELECTION, (WPARAM)TRUE, (LPARAM)(_T("")));
}
modified on Monday, January 18, 2010 4:08 AM
|
|
|
|
 |
|
 |
Thanks a lot
Soon I will update the articles and will include your fix with reference to you.
Armen
#define __ARMEN_H__
|
|
|
|
 |
|
 |
I added FolderDlg.h and FolderDlg.cpp and compiled my MFC Dialog project and i got these two linker errors on Visual C++ 2008.
1>Finished searching libraries
1>LINK : warning LNK4098: defaultlib 'mfc90u.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'mfcs90u.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>Finished pass 1
1>Spatial_Vision_DisplayDlg.obj : error LNK2001: unresolved external symbol "public: __thiscall CFolderDialog::CFolderDialog(class ATL::CStringT<char,class StrTraitMFC_DLL<char,class ATL::ChTraitsCRT<char> > > *)" (??0CFolderDialog@@QAE@PAV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z)
1>U:\trunk\UI\Spatial_Vision_Display\Release\Spatial_Vision_Display.exe : fatal error LNK1120: 1 unresolved externals
1>Build log was saved at "file://u:\trunk\UI\Spatial_Vision_Display\Release\BuildLog.htm"
1>Spatial_Vision_Display - 2 error(s), 96 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
I rebuilt after a clean and got the same error.
Can you help me out?
Thanks,
|
|
|
|
 |
|
 |
What is the IUnKnown stand for? IShellBrower or IShellView?
Is there a way that filter the folder and file ,not only for CFileDialog?
|
|
|
|
 |
|
 |
i'm sorry. but i don't know how to use custom filter.
i want to know how can USE_XP_FILTRATION be defined.
i try to define USE_XP_FILTRATION in stdafx.h
but there is an error.
filteredfolderdlg.h(42) : error C2504: 'IFolderFilter' : base class undefined
please help me, thanks.
i'm in vc6.0
|
|
|
|
 |
|
 |
Hello All,
I often capture images from my camera to my PC's hard disk and develop applications to process them. Have you by any chance solved the two problems below that I am really struggling with?
1) I need to browse the contents of my MTP (Media Transport Protocol) supported Camera. Do you have a code exerpt to do that? All I am interested in is getting the list of image files on th camera and dumping them on my harddisk to a specified directory (My Pictures/date-time).
2) As I plug in my SD card or MTP (Media Transport Protocol) supported Camera I just want my application to start, and transfer the files. Do you know how to capture this "plugin" event in tha case of an SD Card and for a MTP (Media Transport Protocol) supported Camera? And read out the drive/device name?
Thanks a lot for your help in automating....
Andrea
|
|
|
|
 |
|
 |
Hi there, great class and thank you for writing it.
Is it possible to use this class in a commercial application?
Tnx.
|
|
|
|
 |
|
 |
Hello
Use it freely in any application but please specify credits if possible.
#define __ARMEN_H__
|
|
|
|
 |
|
 |
That's great. I'll have to look into where to put the credits, but I'm sure I can shoehorn them in somewhere
|
|
|
|
 |
|
 |
Compiling...
FileTreeCtrl.cpp
D:\treecontroll\cobatree\FileTreeDialog\FileTreeCtrl.cpp(546) : error C2065: 'StrRetToStr' : undeclared identifier
Error executing cl.exe.
FileTreeDialog.exe - 1 error(s), 0 warning(s)
I need your help why it happen?
Dadang
Dadang
|
|
|
|
 |
|
 |
May be u should get newer Platform SDK ?
#define __ARMEN_H__
|
|
|
|
 |
|
 |
Hi!
In order to successfuly compile the code in Visual C++ 6.0 you must do the following:
In BOOL CDemoDlg::OnInitDialog( VOID ) replace ULONG_PTR with ULONG, ::GetClassLongPtr with ::GetClassLong and ::SetClassLongPtr with ::SetClassLong.
The code should look like this:
BOOL CDemoDlg::OnInitDialog( VOID )
{
CDialog::OnInitDialog();
ULONG ulStyle = ::GetClassLong( GetSafeHwnd(), GCL_STYLE );
if( !( ulStyle & CS_DROPSHADOW ) )
::SetClassLong( GetSafeHwnd(), GCL_STYLE, CS_DROPSHADOW );
........................................................................
That's all.
Best wishes,
Christian.
I am in love with VC++
|
|
|
|
 |
|
 |
May be it is better get newer Platform SDK ?
#define __ARMEN_H__
|
|
|
|
 |
|
 |
Hi Armen!
Yes, you might be right. Perhaps it may be better to get the newer platform SDK but my solution was intended to make the code work without installing the new Platform SDK.
Anyway, thanks for the quick reply.
Best wishes,
Christian.
I am in love with VC++
|
|
|
|
 |
|
 |
Hello,
First thanks for sharing the CFolderDialog code.
I noticed that it has a data member called 'm_hWnd' that "hides" the inherited member 'CWnd::m_hWnd'.
Is this on purpose or mistake .
-- Ricky Marek (AKA: rbid)
-- "Things are only impossible until they are not" --- Jean-Luc Picard
My articles
|
|
|
|
 |
|
 |
Enable the Ok button if the folder contains a particular file:
***************************************************** FolderDlg.cpp ***************************************************** Fix (CFolderDialog::EnableOK(..)): ***************************************************** - ::SendMessage( m_hWnd, BFFM_ENABLEOK, (LPARAM)bEnable, 0L); -> ::SendMessage( m_hWnd, BFFM_ENABLEOK, 0L, (LPARAM)bEnable); Replace (in CFolderDialog::CFolderDialog(..)): ***************************************************** - At the end of CFolderDialog::CFolderDialog(..) if( pszSelPath ) SetSelectedFolder( pszSelPath ); By: lstrcpy(m_InitialFolder,_T("")); if ( pszSelPath ) { if ( lstrlen(pszSelPath) < MAX_PATH ) { lstrcpy( m_InitialFolder, pszSelPath ); } SetSelectedFolder( m_InitialFolder ); } m_bIsFileRequested = FALSE; Add (at the end of CFolderDialog::OnSelChanged(..)): ***************************************************** - UpdateOkButton(szSelFol); Add (in CFolderDialog::OnIUnknown(..)): ***************************************************** - UpdateOkButton(m_InitialFolder); Add the following methods ***************************************************** VOID CFolderDialog::UpdateOkButton( IN LPCTSTR szSelFol ) { // Look if the request filename exist under this path if ( m_bIsFileRequested ) { TCHAR szFullPathName[MAX_PATH]; if ( (lstrlen(szSelFol) + lstrlen(m_strRequestFileName) + 2) > MAX_PATH ) { //Enable the Ok bttn in any cases EnableOK(TRUE); return; } lstrcpy( szFullPathName, szSelFol ); lstrcat( szFullPathName, _T("\\") ); lstrcat( szFullPathName, m_strRequestFileName ); // Try to open the file FILE *hFile; if ( (hFile = _tfopen(szFullPathName,_T("r"))) != NULL ) { // File exist, enable the Ok bttn! EnableOK(TRUE); Invalidate(); RedrawWindow(); fclose(hFile); } else { // File didn't exist, disable the Ok bttn! EnableOK(FALSE); } } else { //Enable the Ok bttn EnableOK(TRUE); } } BOOL CFolderDialog::SetRequestedFileName( IN LPCTSTR pszFileName ) { ASSERT( AfxIsValidString( pszFileName, MAX_PATH ) ); if ( lstrcpy( m_strRequestFileName, pszFileName ) ) { m_bIsFileRequested = TRUE; return (TRUE); } return (FALSE); } ***************************************************** FolderDlg.h ***************************************************** Add private: - BOOL m_bIsFileRequested; - TCHAR m_strRequestFileName[ MAX_PATH ]; - TCHAR m_InitialFolder[ MAX_PATH ]; Add public: - BOOL SetRequestedFileName( IN LPCTSTR pszFileName ); Ivan K.
|
|
|
|
 |
|
 |
Thanks, will update the article soon Ivan Krukoff
#define __ARMEN_H__
|
|
|
|
 |