According to the following:

This is a function of exe calls:
Void OpenDlgSelectDir (const char * prjName, char * re)
{
AFX_MANAGE_STATE (AfxGetStaticModuleState ());
DlgSelectDir DLG.
If (IDOK==DLG. DoModal ())
{
return;
}
}
This is the DLL's code:
#include
BOOL DlgSelectDir: : OnInitDialog ()
{
CDialog: : OnInitDialog ();
//TODO: add additional initialization here
Auto PWND=GetDlgItem (IDC_MFCSHELLTREE1);
PWND CMFCShellTreeCtrl * tree=(CMFCShellTreeCtrl *);
The tree - & gt; SelectPath (" ");
return TRUE;//return TRUE unless you set the focus to a control
//exception: OCX property page should return FALSE
}
Is really a ghost,,
Drew back manually by clicking on the "computer", then click on "the computer", can display properly!
Don't know where is wrong? Ask the great spirit guide!!!!!!
CodePudding user response:
Directly with BrowseForFolder
BOOL CMFCDlgApp: : InitInstance ()
{
.
InitShellManager ();
.
}
Void CMFCDlgDlg: : OnBnclickedButton1 ()
{
If (afxShellManager)
{
Cstrings sOut.
AfxShellManager - & gt; BrowseForFolder (sOut, this);
}
}