<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Windows &#8211; WilliamKyle&#039;s Home</title>
	<atom:link href="https://www.williamkyle.com.cn/archives/category/windows/feed" rel="self" type="application/rss+xml" />
	<link>https://www.williamkyle.com.cn</link>
	<description>不积跬步，无以至千里；不积小流，无以成江海。</description>
	<lastBuildDate>Fri, 08 Apr 2022 14:37:54 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.2.2</generator>
	<item>
		<title>Visual C++ 6.0 CDialogBar Create 出错解决方案</title>
		<link>https://www.williamkyle.com.cn/archives/141.html</link>
					<comments>https://www.williamkyle.com.cn/archives/141.html#respond</comments>
		
		<dc:creator><![CDATA[WilliamKyle]]></dc:creator>
		<pubDate>Mon, 27 Feb 2012 13:18:53 +0000</pubDate>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[编程]]></category>
		<category><![CDATA[CDialogBar Create]]></category>
		<category><![CDATA[MFC]]></category>
		<category><![CDATA[Visual C++ 6.0]]></category>
		<guid isPermaLink="false">http://www.williamkyle.com.cn/?p=141</guid>

					<description><![CDATA[今天打算弄一个工具栏，于是设计了一个对话框，然后建立一个 CDialogBar 对象，可是在 Create 的 &#8230; <a href="https://www.williamkyle.com.cn/archives/141.html" class="more-link">继续阅读<span class="screen-reader-text">Visual C++ 6.0 CDialogBar Create 出错解决方案</span></a>]]></description>
										<content:encoded><![CDATA[
<p>今天打算弄一个工具栏，于是设计了一个对话框，然后建立一个 CDialogBar 对象，可是在 Create 的时候老是出错，报错地点如下：</p>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="//www.williamkyle.com.cn/wp-content/uploads/ckfinder/images/141.jpg" alt=""/></figure></div>



<pre class="wp-block-code has-dark-gray-color has-text-color"><code lang="cpp" class="language-cpp">File:bardlg.cpp
Line:48</code></pre>



<p>然后看了一下别人的建立过程，发现别人建立对话框的时候，是直接建立的 <strong>IDD_DIALOGBAR</strong> 的对话框，于是比较了 <strong>IDD_DIALOGBAR</strong> 和 <strong>IDD_DIALOG</strong> 的各种参数，发现只要把建立的 <strong>IDD_DIALOG</strong> 对话框的属性改一下就可以了。<br /></p>



<p>样式：下层；边框：无；<br />更多样式：取消可见</p>



<p>其他的设置没有测试，默认的对话框按以上设置之后就能当作工具栏使用了。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.williamkyle.com.cn/archives/141.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Visual C++ 6.0 使用心得</title>
		<link>https://www.williamkyle.com.cn/archives/128.html</link>
					<comments>https://www.williamkyle.com.cn/archives/128.html#respond</comments>
		
		<dc:creator><![CDATA[WilliamKyle]]></dc:creator>
		<pubDate>Sat, 25 Feb 2012 13:18:05 +0000</pubDate>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[编程]]></category>
		<category><![CDATA[Visual C++ 6.0]]></category>
		<guid isPermaLink="false">http://www.williamkyle.com.cn/?p=128</guid>

					<description><![CDATA[Visual C++ 6.0 使用了一段时间了，其中有些东西修改一下能用得更加顺手，于是记录一下。 修改工作空 &#8230; <a href="https://www.williamkyle.com.cn/archives/128.html" class="more-link">继续阅读<span class="screen-reader-text">Visual C++ 6.0 使用心得</span></a>]]></description>
										<content:encoded><![CDATA[
<p>Visual C++ 6.0 使用了一段时间了，其中有些东西修改一下能用得更加顺手，于是记录一下。</p>



<h5 class="wp-block-heading">修改工作空间的图标</h5>



<p>打开注册表，定位到 <strong>HKEY_CLASSES_ROOT\dswfile\DefaultIcon</strong>, 双击默认，然后把 msdev.exe 之后的串删了即可。</p>



<h5 class="wp-block-heading">新建进程打开项目</h5>



<p>直接删除注册表 <strong>HKEY_CLASSES_ROOT\dswfile\shell\&amp;Open with MSDev\ddeexec</strong> 部分，再次打开 dsw 文件的时候就不会把原来开着的项目给关了。</p>



<h5 class="wp-block-heading">Windows 7 下添加文件到项</h5>



<p>首先下载一个插件 <a href="http://www.williamkyle.com.cn/wp-content/uploads/ckfinder/files/FileTool.rar">FileTool</a>，然后解压到文件夹 <strong>C:\Program Files\Microsoft Visual Studio\Common\MSDev98\AddIns</strong>（假设是安装在默认的位置，详情请根据机器调整），然后打开 VC——工具——定制——附加项和宏文件，勾选 <strong>FileTool Developer Studio Add-in</strong>，这时就会出来一个工具条，就可以通过工具条添加、打开文件了。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.williamkyle.com.cn/archives/128.html/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>VC6 下通过 DirectShow 调用摄像头</title>
		<link>https://www.williamkyle.com.cn/archives/117.html</link>
					<comments>https://www.williamkyle.com.cn/archives/117.html#comments</comments>
		
		<dc:creator><![CDATA[WilliamKyle]]></dc:creator>
		<pubDate>Thu, 23 Feb 2012 15:19:08 +0000</pubDate>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[编程]]></category>
		<category><![CDATA[DirectShow]]></category>
		<category><![CDATA[DirectX]]></category>
		<category><![CDATA[MFC]]></category>
		<category><![CDATA[摄像头]]></category>
		<guid isPermaLink="false">http://www.williamkyle.com.cn/?p=117</guid>

					<description><![CDATA[首先，我们下载一下 DirectX 的 SDK 开发包，目前我们可以使用的是 DirectX 9.0 SDK（ &#8230; <a href="https://www.williamkyle.com.cn/archives/117.html" class="more-link">继续阅读<span class="screen-reader-text">VC6 下通过 DirectShow 调用摄像头</span></a>]]></description>
										<content:encoded><![CDATA[
<p>首先，我们下载一下 DirectX 的 SDK 开发包，目前我们可以使用的是 <a href="http://download.microsoft.com/download/7/e/9/7e9f48c6-f28a-469b-9b8e-cc84032efbd4/dxsdk_sum2004.exe">DirectX 9.0 SDK（Summer 2004）</a>之后的版本 DirectShow 已经被分离出去了。下载之后安装，安装前最好把 IDE 都给关了，免得路径没有添加进去。</p>



<h5 class="wp-block-heading"><strong>我们开始设计阶段：</strong></h5>



<p>我们先通过 MFC AppWizard(exe) 建立一个 MFC 的基本对话框，去除默认的两个按钮和文本，然后我们添加一个图像控件、一个组合框、一个按钮，然后设置属性，详情如下：</p>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="//www.williamkyle.com.cn/wp-content/uploads/ckfinder/images/clip_image001.png" alt=""/></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="//www.williamkyle.com.cn/wp-content/uploads/ckfinder/images/clip_image002.png" alt=""/></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="//www.williamkyle.com.cn/wp-content/uploads/ckfinder/images/clip_image003.png" alt=""/></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="//www.williamkyle.com.cn/wp-content/uploads/ckfinder/images/clip_image004.png" alt=""/></figure></div>



<p>然后，我们通过类向导添加成员变量，详情如下：</p>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="//www.williamkyle.com.cn/wp-content/uploads/ckfinder/images/clip_image006.jpg" alt=""/></figure></div>



<h5 class="wp-block-heading"><strong>我们双击 Test</strong><strong>按钮，进入代码编写。</strong></h5>



<p>首先，我们把摄像头的两个文件加到项目路径下，然后再在文件视图里面添加这两个文件进项目。</p>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="//www.williamkyle.com.cn/wp-content/uploads/ckfinder/images/clip_image007.png" alt=""/></figure></div>



<p>然后，我们给窗口类的头文件里面添加引用</p>



<pre class="wp-block-code has-dark-gray-color has-text-color"><code lang="cpp" class="language-cpp">#include "CaptureVideo.h"</code></pre>



<p>接着，给窗口类添加一个私有的成员变量</p>



<pre class="wp-block-code has-dark-gray-color has-text-color"><code lang="cpp" class="language-cpp">private:
         CCaptureVideo m_cap;</code></pre>



<p>然后再在窗口初始化的时候，初始化设备列表</p>



<pre class="wp-block-code has-dark-gray-color has-text-color"><code lang="cpp" class="language-cpp">m_cap.EnumDevices(m_Device.GetSafeHwnd());
m_Device.SetCurSel(0);</code></pre>



<p>然后在按键的时候初始化摄像头就是的</p>



<pre class="wp-block-code has-dark-gray-color has-text-color"><code lang="cpp" class="language-cpp">m_cap.Init(m_Device.GetCurSel(),m_Screen.GetSafeHwnd());
m_OK.EnableWindow(FALSE);</code></pre>



<p>我的设计环境为 Windows 7 SP1 、 Visual C++ 6.0 SP6 ，借鉴的别人的程序，如果有其他问题，欢迎一起讨论。<br /><a href="//www.williamkyle.com.cn/wp-content/uploads/ckfinder/files/Cap.rar">源代码点击下载</a></p>



<hr class="wp-block-separator"/>



<p>关于出现以下错误的解决方案</p>



<pre class="wp-block-code has-dark-gray-color has-text-color"><code lang="bash" class="language-bash">C:\DXSDK\Include\strmif.h(1018) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
C:\DXSDK\Include\strmif.h(1018) : fatal error C1004: unexpected end of file found
CapDlg.cpp
C:\DXSDK\Include\strmif.h(1018) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
C:\DXSDK\Include\strmif.h(1018) : fatal error C1004: unexpected end of file found
CaptureVideo.cpp
C:\DXSDK\Include\strmif.h(1018) : error C2146: syntax error : missing ';' before identifier 'HSEMAPHORE'
C:\DXSDK\Include\strmif.h(1018) : fatal error C1004: unexpected end of file found
Generating Code...
执行 cl.exe 时出错.
</code></pre>



<p>在项目的 StdAfx.cpp 里面加上</p>



<pre class="wp-block-code has-dark-gray-color has-text-color"><code lang="cpp" class="language-cpp">#include "C:\DXSDK\Include\strmif.h"</code></pre>



<p>编译一次就好了，之后注释掉就好了。</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.williamkyle.com.cn/archives/117.html/feed</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
		<item>
		<title>Windows 7 环境下重置图标缓存</title>
		<link>https://www.williamkyle.com.cn/archives/57.html</link>
					<comments>https://www.williamkyle.com.cn/archives/57.html#comments</comments>
		
		<dc:creator><![CDATA[WilliamKyle]]></dc:creator>
		<pubDate>Thu, 02 Feb 2012 01:50:18 +0000</pubDate>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[图标]]></category>
		<category><![CDATA[缓存]]></category>
		<category><![CDATA[脚本]]></category>
		<category><![CDATA[重置]]></category>
		<guid isPermaLink="false">http://www.williamkyle.com.cn/?p=57</guid>

					<description><![CDATA[图标缓存可以加速图标的显示，但是有时，如果图标发生了改变，但是并没有正常显示时，我们需要重建图标的缓存，把如下 &#8230; <a href="https://www.williamkyle.com.cn/archives/57.html" class="more-link">继续阅读<span class="screen-reader-text">Windows 7 环境下重置图标缓存</span></a>]]></description>
										<content:encoded><![CDATA[
<p>图标缓存可以加速图标的显示，但是有时，如果图标发生了改变，但是并没有正常显示时，我们需要重建图标的缓存，把如下代码保存为.cmd 文件运行即可。</p>



<pre class="wp-block-code has-dark-gray-color has-text-color"><code lang="bash" class="language-bash">rem 关闭 Windows 外壳程序 explorer
taskkill /f /im explorer.exe

rem 清理系统图标缓存数据库
attrib -h -s -r "%userprofile%\AppData\Local\IconCache.db"
del /f "%userprofile%\AppData\Local\IconCache.db"
attrib /s /d -h -s -r "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\*"
del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_32.db"
del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_96.db"
del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_102.db"
del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_256.db"
del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_1024.db"
del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_idx.db"
del /f "%userprofile%\AppData\Local\Microsoft\Windows\Explorer\thumbcache_sr.db"

rem 清理 系统托盘记忆的图标
echo y|reg delete "HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v IconStreams
echo y|reg delete "HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify" /v PastIconsStream

rem 重启 Windows 外壳程序 explorer
start explorer</code></pre>



<div class="wp-block-file"><a id="wp-block-file--media-d00b291b-bdf0-4d17-a854-2abd11610ef0" href="https://www.williamkyle.com.cn/wp-content/uploads/2012/02/Reset-Icon-Cache.zip" target="_blank" rel="noreferrer noopener">下载脚本</a></div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.williamkyle.com.cn/archives/57.html/feed</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
