用文本编辑器打开自己分析一下。
比较好的编辑器可以用pctools类,
金山和华军上都有
比较好的编辑器可以用pctools类,
金山和华军上都有
解决方案 »
- dll返回出错
- 如何让一个tabSheet都没有的pageControl也弹出菜单?popupMenu属性在这种情况下不起作用了
- 高分求AUTOMATION 源码
- Delphi对Xml操作问题??????????????不用XmlDocument构件!!有兴趣可以进来!
- 怎样把'商品编码'里的字符串分解开来,存到一个数组里?
- delphi语法,基础知识给对象赋值的问题
- 如何让ListView中的项目可移动?
- 即时通讯系统( 仿OICQ ) 提供下载
- 如何在显示对计算型的字段进行纵向汇总
- 怎么向数据大表中插入新字段.
- 请问集合类型能否作为函数/过程的形参,或者是返回值?
- 请帮我写一个小程序,要求如下,给五○分
IShellLink::GetIconLocation
IShellLink::GetPath
IShellLink::GetWorkingDirectory下面是 VC 代码(我不会 DELPHI,我想转换过去应当容易):
BOOL CLinkTestDlg::ResolveLink(HWND hwnd, LPCTSTR lpszLinkFile, LPTSTR lpszPath)
{
USES_CONVERSION;
HRESULT hr;
IShellLink *psl;
TCHAR szGotPath[MAX_PATH];
TCHAR szDescription[MAX_PATH];
WIN32_FIND_DATA wfd; *lpszPath = 0; // assume failure // Get a pointer to the IShellLink interface.
hr = CoCreateInstance(CLSID_ShellLink, NULL,
CLSCTX_INPROC_SERVER, IID_IShellLink, (LPVOID *) &psl);
if (SUCCEEDED(hr))
{
IPersistFile *ppf; // Get a pointer to the IPersistFile interface.
hr = psl->QueryInterface(IID_IPersistFile, (void **)&ppf);
if (SUCCEEDED(hr))
{
LPWSTR lpw; // Ensure that the string is Unicode.
lpw = T2W(lpszLinkFile); // Load the shortcut.
hr = ppf->Load(lpw, STGM_READ);
if (SUCCEEDED(hr))
{
// Resolve the link.
hr = psl->Resolve(hwnd, SLR_NO_UI);
if (SUCCEEDED(hr))
{
// Get the path to the link target.
hr = psl->GetPath(szGotPath,
MAX_PATH, (WIN32_FIND_DATA *)&wfd,
SLGP_SHORTPATH );
if (FAILED(hr))
; // Get the description of the target.
hr = psl->GetDescription(szDescription, MAX_PATH);
if (FAILED(hr))
;
lstrcpy(lpszPath, szGotPath);
}
}
// Release the pointer to the IPersistFile interface.
ppf->Release();
}
// Release the pointer to the IShellLink interface.
psl->Release();
}
return hr;
}
另外,用ExtractIcon提取图标时发现,
有时虽然取到HICON,但用Image.picture.assign(HICON)不一定能显示出来,可能跟ICON的属性有关,能否指点一下。