prog_st(st):
My e-mail is [email protected] you !
My e-mail is [email protected] you !
解决方案 »
- ..\..\..\开发库\Include\XX.h的问题
- 怎么样在异步选择的被调监听函数中操作调用函数中的变量
- CEDIT控件中,多行显示文本的每行行高如何计算?
- 求...支持RS232和以太网通迅的网络编程思路!急...
- 困扰了2天求爷爷告奶奶都还没有解决的GINA问题,请各位大侠帮忙
- 请问一下C++ 跟VC有什么关系??新手来的
- 高分求原码
- 菜鸟问题:怎样使启动程序时窗口最大化
- MFC中有内存泄漏怎么办?
- ListView怎么改变显示模式?(就是哪个CListCtrl).见笑了,不过我只学了一个月的VC,帮帮忙。
- 请教:Out of band data --- 详细内容请进,很简单的,你也必须掌握的...
- 如何将类型库文件(TLB)作为一个资源,包含在组件DLL文件中.
或者程序员大本营.
[email protected]
if (afxData.bWin4)
{
LPMALLOC pMalloc;
/* Gets the Shell's default allocator */
if (::SHGetMalloc(&pMalloc) == NOERROR)
{
BROWSEINFO bi;
char pszBuffer[MAX_PATH];
LPITEMIDLIST pidl;
// Get help on BROWSEINFO struct - it's got all the bit settings.
bi.hwndOwner = GetSafeHwnd();
bi.pidlRoot = NULL;
bi.pszDisplayName = pszBuffer;
bi.lpszTitle = _T("Select a Starting Directory");
bi.ulFlags = BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS;
bi.lpfn = NULL;
bi.lParam = 0;
// This next call issues the dialog box.
if ((pidl = ::SHBrowseForFolder(&bi)) != NULL)
{
if (::SHGetPathFromIDList(pidl, pszBuffer))
{
// At this point pszBuffer contains the selected path */.
DoingSomethingUseful(pszBuffer);
}
// Free the PIDL allocated by SHBrowseForFolder.
pMalloc->Free(pidl);
}
// Release the shell's allocator.
pMalloc->Release();
}
} Note This code will work on Windows 95 or higher only—it's part of the shell.