📄 mfc 扩展库 - cj60lib ( 针.htm
字号:
<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta name="keywords"content="visual c, mfc, ocx, dll, controls, Outlook, Visual Studio, Internet Explorer, CDialogBar, CControlBar, CToolBar, CFrameWnd, CMDIFrameWnd, CDockBar, CTreeCtrl, CListBox"><title>CodeJockey : Terms of Use</title></head><body bgcolor="#FFFFFF"><!-- FC HP BN1 START --><!-- Please do not remove the line above or the code within this section --><!-- Doing so may cause damage to your pages or insertion of multiple banners--><center><p><table border="0" cellspacing="0" cellpadding="0"><tr><td colspan="11"><img src="http://www.fortunecity.com/console2/newnav/top.gif" height="7" width="555"></td></tr><tr><td><img src="http://www.fortunecity.com/console2/newnav/left.gif" alt="FC Navigation Console" height="60" width="72" border="0" usemap="#fcleft"><map name="fcleft"><area shape="rect" coords="10,43,64,60" href="http://www2.fortunecity.com/cgi-bin/homepage/estate.pl?referer=navbar" target="_top"><area shape="rect" coords="9,21,61,36" href="http://www2.fortunecity.com/cgi-bin/showarea.pl?area=skyscraper&referer=navbar" target="_top"><area shape="rect" coords="8,0,62,15" href="http://www.fortunecity.com" target="_top"><area shape="rect" href="http://www.fortunecity.com" target="_top" coords="0,0,49,49"></map></td><td colspan="9"><A HREF="http://ad.doubleclick.net/jump/fc.us468/member/tech;s1=m;s3=tech;pos=1;tag=g;sz=468x60;mtile=1;num=41217?"><IMG SRC="http://ad.doubleclick.net/ad/fc.us468/member/tech;s1=m;s3=tech;pos=1;tag=g;sz=468x60;mtile=1;num=41217?" border=0 height="60" width="468"></A></td><td><img src="http://www.fortunecity.com/console2/newnav/right.gif" width="15" height="60"></td></tr><tr><td><img src="http://www.fortunecity.com/console2/newnav/left2.gif" height="31" width="72" target="_top"></td><td><img src="http://www.fortunecity.com/console2/newnav/gap1.gif" width="17" height="31"></td><td><a href="http://adex3.flycast.com/server/socket/127.0.0.1:2800/click/FortuneCitycom/NavBar1/41217" target="_top"><img src="http://adex3.flycast.com/server/socket/127.0.0.1:2800/ad/FortuneCitycom/NavBar1/41217" border="0" width="88" height="31"></a></td><td><img src="http://www.fortunecity.com/console2/newnav/gap2.gif" width="24" height="31"></td><td><a href="http://adex3.flycast.com/server/socket/127.0.0.1:2800/click/FortuneCitycom/NavBar2/41217" target="_top"><img src="http://adex3.flycast.com/server/socket/127.0.0.1:2800/ad/FortuneCitycom/NavBar2/41217" border="0" width="88" height="31"></a></td><td><img src="http://www.fortunecity.com/console2/newnav/gap3.gif" width="24" height="31"></td><td><a href="http://adex3.flycast.com/server/socket/127.0.0.1:2800/click/FortuneCitycom/NavBar3/41217" target="_top"><img src="http://adex3.flycast.com/server/socket/127.0.0.1:2800/ad/FortuneCitycom/NavBar3/41217" border="0" width="88" height="31"></a></td><td><img src="http://www.fortunecity.com/console2/newnav/gap4.gif" width="19" height="31"></td><td><a href="http://www2.fortunecity.com/cgi-bin/homepage/navbarforward.cgi?from=nav4&referer=navbare" target="_top"><img src="http://www.fortunecity.com/console2/newnav/button4.gif" border="0" width="88" height="31"></a></td><td><img src="http://www.fortunecity.com/console2/newnav/gap5.gif" width="32" height="31"></td><td><img src="http://www.fortunecity.com/console2/newnav/right2.gif" width="15" height="31"></td></tr></table></p></center><!-- WARNING: under no circumstances remove the line below. Doing so may damage your page.--><!-- FC HP BN1 END --><font face="Verdana,Arial,Helvetica" size="2"><!-- START OF ARTICLE --><h2></font><font size="5" color="#800080">MFC <strong>扩展库</strong> - CJ60Lib ( 针对Visual C++ 6.0进行的升级 )</font><font face="Verdana,Arial,Helvetica" size="2"></h2><p></font><font face="宋体" size="3">原来的库(MFCXLib)已经更名为CJ60Lib,这是为了与那些使用旧库的程序区别开来。本库与旧的库具有同样的功能,但是,针对Visual C++ 6.0作了几个扩展。</font><font face="Verdana,Arial,Helvetica" size="2"></p><p></font><font face="宋体" size="3">请按照下面的步骤来设定你的应用程序使用CJ60Lib这个MFC扩展库:</font><fontsize="2"> </font><font face="Verdana,Arial,Helvetica" size="2"><ul> <li></font><font size="3"><font face="宋体">在你的工程设定(project/setting)中,选择 <b>General</b> 标签,确保 <b>Microsoft Foundation Class </b>被设置成 <b>Use MFC in a shared DLL</b>。</font></li> <li></font><font face="宋体" size="3">在你的工程设定(project/setting)中,</font><font size="3"><font face="宋体">选择 <b>Link</b> 标签。.设置 <b>Category</b> 为<b>Input</b>,并且将 <b>../Lib</b> 添加在 <b>Additional Library Path</b>中。</font></li> <li><font face="宋体">仍然在 <b>Link</b> 标签中,改变 <b>Category</b> 为 <b>General</b>。针对 <b>Output Name</b> (所有的设置),编译到 <b>../Lib</b> 目录。这将使得执行和调试变得容易一些,因为 <b>DLL</b>和 <b>EXE</b> 都处在同一个目录中。<br> 例如为 <b>../Lib/MyDemo.exe</b>。</font></li> <li><font face="宋体">选择 <strong>C/C++</strong>标签。 改变 <strong>Category</strong> 为 <strong>Preprocessor</strong>,然后添加 <strong>../Include </strong>到 <strong>Additional Include Directories</strong>中。</font></li> <li><font face="宋体">最后的一个步骤将添加如下两行到 <b>StdAfx.h</b> 文件中,这将输入外部类并且在你的整个应用程序中都能使用它们:</font></font><font face="Verdana,Arial,Helvetica" size="2"><p></font><font size="2"><!-- start a block of source code --> </font><font face="Verdana,Arial,Helvetica" size="2"><font color="#990000"><b>#define MFCX_PROJ<br> #include <CJ60Lib.h></b></p> </li><!-- end the block of source code --> </font></ul><p></font><font face="宋体" size="3"><b>如果要静态链接到CJ60Lib,请作如下改变:</b></font><fontsize="2"> </font><font face="Verdana,Arial,Helvetica" size="2"><ul> <li></font><font face="宋体" size="3">在你的工程设定中,选择</font><font face="Verdana,Arial,Helvetica" size="3"><b>General</b></font><font size="3">标签。确保 </font><font face="Verdana,Arial,Helvetica" size="3"><b>Microsoft Foundation Class </b></font><font size="3">被设置为 </font><font face="Verdana,Arial,Helvetica" size="3"><b>Use MFC in a static library</b></font><font size="3">。</font><font face="Verdana,Arial,Helvetica" size="3"></li> <li></font><font size="3">在你的</font><font face="Verdana,Arial,Helvetica" size="3"><b>StdAfx.h</b> </font><font size="3">文件中添加下面几行代码,这将导致库静态链接到你的应用程序(确保在</font><font face="Verdana,Arial,Helvetica" size="3">include</font><font size="3">语句之前添加):</font><font face="Verdana,Arial,Helvetica" size="2"><p></font><font size="2"><!-- start a block of source code --> </font><font face="Verdana,Arial,Helvetica" size="2"><font color="#990000"><b>#define MFCXLIB_STATIC</b><br> #define MFCX_PROJ<br> #include <CJ60Lib.h></p> </li><!-- end the block of source code --> </font></ul><p></font><font size="3">这个库是为版本为</font><fontface="Verdana,Arial,Helvetica" size="3">4.71</font><font size="3">或其后的</font><fontface="Verdana,Arial,Helvetica" size="3">comctl32.dll</font><font size="3">而写的。如果你是老版本的,你可以从微软的站点上下载最新版本。</font><fontface="Verdana,Arial,Helvetica" size="3"></p><p></font><b><font size="4">在</font><font face="Verdana,Arial,Helvetica" size="4">CJ60Lib</font><fontsize="4">中的类</font><font face="Verdana,Arial,Helvetica" size="4">:</b></p><p>CCJButton - ( CJButton.cpp </font><font size="4">和 </font><fontface="Verdana,Arial,Helvetica" size="4">CJButton.h )</font><fontface="Verdana,Arial,Helvetica" size="3"></p><blockquote> <p></font><font size="3">我写这个类最初是为了处理在</font><font face="Verdana,Arial,Helvetica" size="3">CCJControlBar</font><font size="3">类中的最小化和关闭按钮。这个类能够处理扁平按钮。我在此基础上作了扩展,创建了一个实现静态按钮控件的条目,就跟在</font><font face="Verdana,Arial,Helvetica" size="3">VisualStudio</font><font size="3">的</font><font face="Verdana,Arial,Helvetica" size="3">Project Settings->Custom Build</font><font size="3">标签中看到的一样。 </font><font face="Verdana,Arial,Helvetica" size="3"></p></blockquote><p><b>CCJComboBox</b> - ( CJComboBox.cpp </font><font size="3">和 </font><fontface="Verdana,Arial,Helvetica" size="3">CJComboBox.h )</p><blockquote> <p></font><font size="3">我写这个类是为了处理扁平外观的组合框,就象在微软的</font><font face="Verdana,Arial,Helvetica" size="3">Office</font><font size="3">系列产品中看到的一样。它很容易使用,只要将所有有</font><font face="Verdana,Arial,Helvetica" size="3">CComboBox</font><font size="3">的地方替换为</font><font face="Verdana,Arial,Helvetica" size="3">CCJComboBox</font><font size="3">即可。关于使用该类的详细说明,参见<a href="flat_combobox.htm">这里</a>。</font><font face="Verdana,Arial,Helvetica" size="3"></p></blockquote><p><b>CCJControlBar</b> - ( CJControlBar.cpp </font><font size="3">和 </font><fontface="Verdana,Arial,Helvetica" size="3">CJControlBar.h )</p><blockquote> <p></font><font size="3">这个类是基于</font><font face="Verdana,Arial,Helvetica" size="3">CristiPosea</font><font size="3">写的</font><font face="Verdana,Arial,Helvetica" size="3">CSizingControlBar</font><font size="3">类基础之上的。 我添加了更多的外观给这个控件,包括最小和最大化按钮、把手、按钮浮动提示、弹出菜单支持和垂直及水平</font><font face="Verdana,Arial,Helvetica" size="3">sizebar</font><font size="3">指针。关于如何使用这个类,参见<a href="controlbar.htm">这里</a>。</font><font face="Verdana,Arial,Helvetica" size="3"></p></blockquote><p><b>CCJFrameWnd</b> - ( CJFrameWnd.cpp </font><font size="3">和 </font><fontface="Verdana,Arial,Helvetica" size="3">CJFrameWnd.h )<br><b>CCJMDIFrameWnd</b> - ( CJMDIFrameWnd.cpp </font><font size="3">和 </font><fontface="Verdana,Arial,Helvetica" size="3">CJMDIFrameWnd.h )<br><b>CCJDockBar</b> - ( CJDockBar.cpp </font><font size="3">和</font><fontface="Verdana,Arial,Helvetica" size="3">CJDockBar.h )</p><blockquote> <p></font><font size="3">这些类覆盖了主框架窗口原来的布局,从而允许对工具条的三维外观进行偏移。要使用这些类,仅仅需要在</font><font face="Verdana,Arial,Helvetica" size="3"><b>Mainfrm.h</b></font><font size="3">文件中在</font><font face="Verdana,Arial,Helvetica" size="3"><b>CMainFrame</b></font><font size="3">的继承时将基类由</font><font face="Verdana,Arial,Helvetica" size="3"><b>CFrameWnd</b></font><font size="3">改为</font><font face="Verdana,Arial,Helvetica" size="3"><b>CCJFrameWnd</b></font><font size="3">(对于多文档界面,使用</font><font face="Verdana,Arial,Helvetica" size="3"><b>CCJMDIFrameWnd</b></font><font size="3">)。</font><font face="Verdana,Arial,Helvetica" size="3"></p></blockquote><p><b>CCJOutlookBar</b> - ( CJOutlookBar.cpp </font><font size="3">和 </font><fontface="Verdana,Arial,Helvetica" size="3">CJOutlookBar.h )</p><blockquote> <p></font><font size="3">自</font><font face="Verdana,Arial,Helvetica" size="3">VC5</font><font size="3">的最后版本以来,这个类被修改了许多。我已经添加了鼠标事件的处理,并且修改它使用</font><font face="Verdana,Arial,Helvetica" size="3"><b>CCJPagerCtrl</b></font><font size="3">而取代使用缺省的列表框滚动条。</font><font face="Verdana,Arial,Helvetica" size="3"></p></blockquote>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -