|
|
|
|
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 |
|
miles waldron
|
Aug 14, 2008 - 1:21 PM
|
I want my entire application to look professional. Is there some supported method for having a get folders dialog box that looks nice?
|
|
Technical Support
|
Aug 19, 2008 - 1:08 PM
|
Here is the demonstration of beta shell dialogs including a browse for folder dialog:
BetaShellDialogs.zip
|
|
Technical Support
|
Aug 15, 2008 - 3:31 PM
|
Completely new, written from scratch and un-comparable with any existing shell tree/list controls and common file dialog and brows for folder/file dialog will appear in the nearest Prof-UIS version. We can provide you with beta code.
|
|
miles waldron
|
Aug 17, 2008 - 9:58 AM
|
Also, to answer my own question, in case anyone else is interested, this code works pretty well, until the new system dialogs are ready.
/////////////////////////////////////////////////////////////////////////////
// BrowseFolderCallBack
int
CALLBACK BrowseFolderCallBack(HWND hwnd,UINT uMsg,LPARAM lp, LPARAM pData)
{
TCHAR szDir [MAX_PATH];
switch(uMsg) {
SendMessage case BFFM_INITIALIZED: if(GetCurrentDirectory(sizeof(szDir), szDir)) (hwnd, BFFM_SETSELECTION, TRUE, (LPARAM)szDir);
break;
case BFFM_SELCHANGED:
if(SHGetPathFromIDList((LPITEMIDLIST)lp, szDir))
SendMessage (hwnd, BFFM_SETSTATUSTEXT, 0, (LPARAM)szDir);
break;
default:
break;
}
} return(0);
/////////////////////////////////////////////////////////////////////////////
// BrowseFolder
BOOL CMy4150App ::BrowseFolder(const CString& strInDir, CString& strOutDir)
{
BOOL fSuccess = FALSE;
BROWSEINFO bi ;
TCHAR szDir [MAX_PATH];
LPITEMIDLIST pidl ;
LPMALLOC pMalloc ;
if(SUCCEEDED(SHGetMalloc(&pMalloc))) {
ZeroMemory (&bi,sizeof(bi));
bi .hwndOwner = m_pMainWnd->m_hWnd;
bi .pszDisplayName = 0;
bi .pidlRoot = 0;
bi .ulFlags = BIF_RETURNONLYFSDIRS | BIF_STATUSTEXT | BIF_USENEWUI;
bi .lpfn = BrowseFolderCallBack;
SetCurrentDirectory (strInDir);
pidl = SHBrowseForFolder(&bi);
if(pidl) {
if(SHGetPathFromIDList(pidl,szDir))
{
strOutDir = szDir;
fSuccess = TRUE;
}
pMalloc
pMalloc ->Free(pidl); ->Release();
}
}
} return(fSuccess);
|
|