Posts tagged shdocvw

Unable to get running user’s MyDocuments folder due to security interference

I was trying to retrieve the running user’s MyDocuments folder in a WinForms application via

To my surprise, it returned an empty string.

Read more ...


Better Late Than Never

This post originally appeared on Joycode on Sept 17 2004.

在文件选择对话框和浏览器中都可以显示文件夹视图,但是有时需要对显示的方式进行控制,例如在文件选择对话框初始化时设置显示方式为详细资料视图或者缩略图视图,有的时候需要用程序来选择一些项目,例如在文件选择对话框中添加全选按钮,或者打开文件所在文件夹并且选中指定文件。

Read more ...


How to restart Windows Explorer programmatically using Restart manager

You can download source code of this post at jiangsheng/Samples

For shell extension programmers, restart Windows Explorer is one of steps in their setup programs. A programmer may also want to force some shell setting changes that would only be read by Explorer on start up. For example, this posts is inspired by a programmer who want to toggle task bar layout automatically depending on the screen resolution, and is used to demonstrate the new Windows Vista restart manager API like RmStartSession, RmRegisterResources, RmGetList, RmShutdown, RmRestart and RmEndSession.

Read more ...


What is the Windows API for

There are the questions programmers ask frequently. This faq does not contain sample code, readers should use keywords (showing in bold, such as function names, CLSIDs or interface names) to find complete solutions elsewhere.

Q: What is the Windows API for the Start Menu?

Read more ...


Talking about Windows XP APIs

Photobucket has deactivated the accounts of all free users and I have no idea what was in there now. Therefore I cannot find what this post was talking about. Probably the API for various parts of Windows.

image1 http://feed728.photobucket.com/flash/rss_slideshow.swf?rssFeed=http://feed728.photobucket.com/albums/ww283/jiangsheng/Windows%2520XP/feed.rss` <http://feed728.photobucket.com/flash/rss_slideshow.swf?rssFeed=http://feed728.photobucket.com/albums/ww283/jiangsheng/Windows%2520XP/feed.rss>`__` <http://feed728.photobucket.com/flash/rss_slideshow.swf?rssFeed=http://feed728.photobucket.com/albums/ww283/jiangsheng/Windows%2520XP/feed.rss>`__image2image3

Read more ...


创建和自动化Internet Explorer和资源管理器窗口

下载示例工程 - 34 Kb jiangsheng/Samples

我在很久之前就开始用程序自动化Shell窗口——主要对象是IE窗口。有时浏览器控件或者MFC类CHTMLView可以满足我的需要,但是很多时候我需要从头嵌入浏览器控件并且尽可能模拟IE的行为,例如实现IDocHostUIHandler来启用自动完成功能。一个很自然的替代方案是直接操作IE窗口。

Read more ...


编程控制活动桌面,用ActiveX控件来增强桌面的功能

活动桌面处理和一个例子 (https://web.archive.org/web/20010503055645/http://www.vckbase.com/vckbase/vckbase10/vc/nonctrls/atlcomocx_02/1002001.htm)讲述了使用IActiveDesktop接口可以做到的事情。

活动桌面允许在桌面上显示HTML网页,这也意味着我们可以在桌面上的项目中以在网页中使用ActiveX控件来对网页进行扩展的方式来提供丰富的内容。但是不建议在桌面上使用不安全的控件,例如Windows Media Player 6.0。

Read more ...


使用虚列表和自画实现文件夹的缩略图显示

本示例演示了列表控件的虚列表和自画功能,也演示了一些系统外壳的函数和接口的使用方法。

单击 jiangsheng/Samples 下载本文的代码。如果在编译示例程序的时候出现问题,你需要去http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ 升级你的头文件和库文件

Read more ...