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.
Subject |
Author |
Date |
|
Ulrich Heinicke
|
Oct 3, 2008 - 1:19 PM
|
Hi, i write a folder select dialog using the class CExtShellTreeCtrl from the beta Shellcontrol for 08/28. My question is how to retrieve the fullpath of the selected folder. Do you have a new version of the ShellControls ? Thanks Ulrich
|
|
Technical Support
|
Oct 4, 2008 - 1:07 PM
|
The following code retrieves the path from a tree item: CExtShellTreeCtrl * pShellTreeCtrl = . . .
HTREEITEM hti = . . .
CExtTreeCtrl::TREEITEMINFO_t & _TII = pShellTreeCtrl->TreeItemInfoGet( hti );
CExtShellItemData * pShellItemData = (CExtShellItemData*)_TII.m_lParam;
ASSERT( pShellItemData != NULL );
CString str = pShellItemData->m_pidlAbsolute.GetPath(); But the path may be an empty string for tree items which do not represent file system locations. All the tree items have a display name. You may need to show the display name of a shell item instead of the full path: if( strPath.IsEmpty() )
str = pShellItemData->m_pidlAbsolute.GetDisplayNameOf(); Additionally, we have finished working on shell related part of Prof-UIS, including file and browse for folder dialogs: http://www.prof-uis.com/download/forums/NewControls10.zipIf the code above fails to compile with your version of Prof-UIS, please drop us an e-mail to the support mail box so we will provide you with the update.
|
|