桌面编程

yxp200402 2008-11-07 11:14:28
如何让我的程序界面上显示的图标和WINDOWS桌面上显示的一模一样?包括快捷方式,文件夹和文件等等!
...全文
231 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
autolee 2008-11-21
  • 打赏
  • 举报
回复
牛啊!
vinep 2008-11-18
  • 打赏
  • 举报
回复
只截图,还是要像桌面上一样可以操作。
schlafenhamster 2008-11-08
  • 打赏
  • 举报
回复
这是如何调用
///
int CStep1::GetItemIcon(CString path,UINT uFlags)
{
SHFILEINFO sfi;

SHGetFileInfo((LPCSTR)path,0,&sfi,sizeof(SHFILEINFO),uFlags);

if(sfi.iIcon<0) sfi.iIcon=m_iO82Image;
//
return sfi.iIcon;
}
// for tree
void Cxxxx::GetNormalAndSelectedIcons(CString path,LPTV_ITEM lptvitem)
{
//Note that we don't check the return value here because if GetIcon()
//fails, then we're in big trouble...

lptvitem->iImage = GetItemIcon(path, //SHGFI_PIDL |
SHGFI_SYSICONINDEX | SHGFI_SMALLICON);

lptvitem->iSelectedImage = GetItemIcon(path,// SHGFI_PIDL |
SHGFI_SYSICONINDEX | SHGFI_SMALLICON |
SHGFI_OPENICON);
return;
}
schlafenhamster 2008-11-08
  • 打赏
  • 举报
回复
取系统图标:
void Cxxxx::EnableImages()
{// Get the handle to the system image list, for our icons
HIMAGELIST hImageList;
SHFILEINFO sfi;

hImageList = (HIMAGELIST)SHGetFileInfo((LPCSTR)_T("C:\\"),
0,
&sfi,
sizeof(SHFILEINFO),
SHGFI_SYSICONINDEX | SHGFI_SMALLICON);

if (hImageList)
{// Attach ImageList to TreeView
m_Tree.SendMessage(TVM_SETIMAGELIST,(WPARAM)TVSIL_NORMAL,(LPARAM)hImageList);
// Attach ImageList to ListView
m_List.SendMessage(LVM_SETIMAGELIST,(WPARAM)LVSIL_SMALL,(LPARAM)hImageList);
}
}
jameshooo 2008-11-07
  • 打赏
  • 举报
回复
ExtractAssociatedIcon()

The ExtractAssociatedIcon function first looks for the indexed icon in the file specified by lpIconPath. If the function cannot obtain the icon handle from that file, and the file has an associated executable file, it looks in that executable file for an icon. Associations with executable files are based on file name extensions, are stored in the per-user part of the registry, and can be defined using File Manager's Associate command.
yuhudie203 2008-11-07
  • 打赏
  • 举报
回复

没明白 包括快捷方式,文件夹和文件等等!???
Elysium 2008-11-07
  • 打赏
  • 举报
回复
不乱吗?
Chendy1985 2008-11-07
  • 打赏
  • 举报
回复
同學習~~~
happyness44 2008-11-07
  • 打赏
  • 举报
回复
HWND ChWnd=::GetWindow(hwDesktop,GW_CHILD);
yxp200402 2008-11-07
  • 打赏
  • 举报
回复
SHGetFileInfo这个函数倒是可以取图标
但是链接事件怎么做,思路简单一点的就好!
路人乙2019 2008-11-07
  • 打赏
  • 举报
回复
自已写资源管理器。
CounterHack 2008-11-07
  • 打赏
  • 举报
回复
自己编写浏览器?网上好多示例代码,google...
csgdseed 2008-11-07
  • 打赏
  • 举报
回复
学习
cnzdgs 2008-11-07
  • 打赏
  • 举报
回复
参考一下SHGetFileInfo之类的函数。
palmax 2008-11-07
  • 打赏
  • 举报
回复
Shell编程
[14本经典Android开发教程]-7-Android编程入门教程 -------------------------------------------------- 本文为以前已经使用Java编程并想开始为Android平台开发的开发者编写。我试着尽可能地多的"展开",在合适的每个地方放上示例代码。我也试着尽可能多的插入很多图片,因为它们可以活跃学习过程和吸引读者眼球。但不庆幸的,不是每样都编上代码;你不得不学习一些Android平台基础原理来完全理解它。那就是在第一页中描述的。没有必要通读所有的那些描述页,但那样较好些。你可以把它当成一种参考。当在"展开"-过程期间你应该读也被说明了。因此你可以直接从HelloWorld--Android方式开始。 -------------------------------------------------- 已上传6本: [14本经典Android开发教程]-1-Android开发从入门到精通 http://download.csdn.net/detail/cleopard/8355245 [14本经典Android开发教程]-2-Android开发手册—API函数详解 http://download.csdn.net/detail/cleopard/8374487 [14本经典Android开发教程]-3-Android SDK 中文开发文档 http://download.csdn.net/detail/cleopard/8380429 [14本经典Android开发教程]-4-Android应用程序开发36技 http://download.csdn.net/detail/cleopard/8380495 [14本经典Android开发教程]-5-linux Android基础知识总结 http://download.csdn.net/detail/cleopard/8380529 [14本经典Android开发教程]-6-Android驱动开发入门及手机案例开发分析教程 http://download.csdn.net/detail/cleopard/8388019 剩余8本稍后上传!@或直接从这里寻找@ http://download.csdn.net/user/cleopard/album @更多@ http://cleopard.download.csdn.net/ 福利 http://xuemeilaile.com 17份软件测试文档 http://download.csdn.net/album/detail/1425 13份WPF经典开发教程 http://download.csdn.net/album/detail/1115 C#资料合辑二[C#桌面编程入门篇] http://download.csdn.net/album/detail/957 C#资料合辑一[C#入门篇] http://download.csdn.net/album/detail/669 [Csharp高级编程(第6版)](共8压缩卷) http://download.csdn.net/album/detail/667 10个[精品资源]Java学习资料合辑[一] http://download.csdn.net/album/detail/663 10个C#Socket编程代码示例 http://download.csdn.net/album/detail/631 6份GDI+程序设计资源整合[全零分] http://download.csdn.net/album/detail/625 2014年移动游戏行业数据分析 http://download.csdn.net/detail/cleopard/8340331 一文读懂2014年全球互联网广告新生态 http://download.csdn.net/detail/cleopard/8340303
[14本经典Android开发教程] 2 Android开发手册 API函数详解 一 TextView的API 1 1 结构 java lang Object android view View android widget TextView 直接子类: Button CheckedTextView Chronometer DigitalClock EditText 间接子类: AutoCompleteTextView CheckBox CompoundButton ExtractEditText MultiAutoCompleteTextView RadioButton ToggleB utton 已上传1本: [14本经典Android开发教程] 1 Android开发从入门到精通 稍后上传剩余12本 http: download csdn net detail cleopard 8355245 @更多@ http: cleopard download csdn net 福利 http: xuemeilaile com @更多@ http: download csdn net user cleopard album 17份软件测试文档 http: download csdn net album detail 1425 13份WPF经典开发教程 http: download csdn net album detail 1115 C#资料合辑二[C#桌面编程入门篇] http: download csdn net album detail 957 C#资料合辑一[C#入门篇] http: download csdn net album detail 669 [Csharp高级编程 第6版 ] 共8压缩卷 http: download csdn net album detail 667 10个[精品资源]Java学习资料合辑[一] http: download csdn net album detail 663 10个C#Socket编程代码示例 http: download csdn net album detail 631 6份GDI+程序设计资源整合[全零分] http: download csdn net album detail 625 2014年移动游戏行业数据分析 http: download csdn net detail cleopard 8340331 一文读懂2014年全球互联网广告新生态 http: download csdn net detail cleopard 8340303">[14本经典Android开发教程] 2 Android开发手册 API函数详解 一 TextView的API 1 1 结构 java lang Object android view View android widget TextView 直接子类: Button CheckedTextView Chronometer DigitalClock EditText 间接子类: AutoCompleteTextView CheckBox CompoundBu [更多]

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧