代码拉取完成,页面将自动刷新
// BrowseForFolerModule.cpp
//
#include "stdafx.h"
#include "BrowseForFolerModule.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
//int BrowseForFolerModule::WM_USER = (int) &H400;
//long BrowseForFolerModule::BFFM_SETSELECTIONA = (long) (WM_USER + 102);
//long BrowseForFolerModule::BFFM_SETSELECTIONW = (long) (WM_USER + 103);
//int BrowseForFolerModule::LPTR = (int) (&H0|&H40);
//void BrowseForFolerModule::CoTaskMemFree(Long ByVal pv)
//{
//}
//Long BrowseForFolerModule::SendMessage(Long ByVal hwnd, Long ByVal wMsg, Long ByVal wParam, Any lParam)
//{
// return (Long)0;
//}
//void BrowseForFolerModule::CopyMemory(Any pDest, Any pSource, Long ByVal dwLength)
//{
//}
//Long BrowseForFolerModule::LocalAlloc(Long ByVal uFlags, Long ByVal uBytes)
//{
// return (Long)0;
//}
//Long BrowseForFolerModule::LocalFree(Long ByVal hMem)
//{
// return (Long)0;
//}
//Long BrowseForFolerModule::BrowseCallbackProcStr(Long ByVal hwnd, Long ByVal uMsg, Long ByVal lParam, Long ByVal lpData)
//{
// return (Long)0;
//}
//Long BrowseForFolerModule::FunctionPointer(Long FunctionAddress)
//{
// return (Long)0;
//}
//String BrowseForFolerModule::BrowseForFolder(Long hwnd, String selectedPath)
//{
//}
int CALLBACK BrowseCallbackProc(HWND hwnd,UINT uMsg,LPARAM lParam,LPARAM lpData)
{
if (uMsg==1){
SendMessage(hwnd,BFFM_SETSELECTION,true,lpData);
}
return 0;
}
void BrowseForFolerModule::BrowseForFoldersFromPathStart(HWND hwnd, CString PathStart, CString &PathSelected)
{
_TCHAR szTmp[MAX_PATH];//用于转换成PathSelected
BROWSEINFO info;
memset(&info,0,sizeof(BROWSEINFO));
info.lpfn=BrowseCallbackProc;
info.hwndOwner=hwnd;
CString str;
str.LoadString(IDS_SELECT_NEED_FILE);
info.lpszTitle = str;//_T("请选择一个AutoPHS需要的文件夹");
//Remove _T('\') at the end of the path if user added it
while(PathStart.Right(1)==_T("\\"))
PathStart.Delete(PathStart.GetLength()-1,1);
info.lParam=(DWORD)(LPCTSTR)PathStart;
SHGetPathFromIDList(SHBrowseForFolder(&info),szTmp);
if (szTmp==_T("")){CString str;
str.LoadString(IDS_NOSELECT_ANYFILE);
MessageBox(hwnd,str,_T("AutoPHS"),MB_OK|MB_TASKMODAL|MB_TOPMOST);
PathSelected=PathStart;
}
else PathSelected=szTmp;
//PathStart.ReleaseBuffer();
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。