如何在MS Windows上枚举桌面图标! [英] How to enum desktop icons on MS Windows!

查看:175
本文介绍了如何在MS Windows上枚举桌面图标!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在,我需要枚举桌面上的所有"ICON",例如我的电脑"和其他.lnk.
之后,我将把图标绘制到HDC上并获取图像数据,我还需要.lnk的dest文件..
我该怎么办?

我读了一些有关Windows Shell的内容,但我仍然不知道该怎么办..


感谢您的帮助!

Now I need to enum all the "ICON" on the desktop such as "My Computer" and other .lnk s.
After that I will draw the ICONS to a HDC and get the image data,also,I need the dest file of the .lnk s..
How could I do ?

I read some about Windows shell but I still don''t know what to do ..


Thanks for any help!

推荐答案

要查找.lnk文件,请使用此%userprofile%\ desktop \ *.lnk
FindFirstFile函数
FindNextFile函数
FindClose函数

操纵.lnk文件
Shell链接

您可能需要
EnumResourceTypes函数
EnumResTypeProc回调函数

绘制设备上下文
DrawIcon函数
DrawIconEx函数
To find the .lnk files use this %userprofile%\desktop\*.lnk
FindFirstFile function
FindNextFile function
FindClose function

To manipulate .lnk files
Shell Links

You may need
EnumResourceTypes function
EnumResTypeProc callback function

To draw to device context
DrawIcon function
DrawIconEx function


这篇关于如何在MS Windows上枚举桌面图标!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆