mfc extension library - cj60lib ( updated for visual c++ 6.0 )

The original library (mfcxlib) was renamed to cj60lib, in order to break any links that may have been established with any applications using the old library, and to establish a version control system. the library has the same functioinality as the old one, however, there have been several enhancements for compatibility with visual c++ 6.0.

follow these steps to setup your application to use cj60lib mfc extension library:

  • in your project settings, select the general tab. make sure that microsoft foundation class is set to use mfc in a shared dll.
  • in your project settings, select the link tab. set the category to input, and add ../lib to additional library path.
  • while still in the link tab, change category to general. for output name (all configurations), build to the ../lib directory. this makes the execution and debugging easier, since both dll and exe are located in the same directory. an example of this would be: ../lib/mydemo.exe.
  • select the c/c++ tab next. change category to preprocessor, and add ../include to additional include directories.
  • the last step would be to add the following two lines of code to your stdafx.h header file, which will import all exported classes, and grant access to your entire application:
		

in order to statically link to cj60lib, make the following changes:

  • in your project settings, select the general tab. make sure that microsoft foundation class is set to use mfc in a static library.
  • add the following additional line of code to your stdafx.h header file, which will cause the library to link statically with your application ( make sure you do this prior to the include statement ):
		

this library was written for version 4.71 or later of comctl32.dll. if you have an older version, you can download the latest version from the microsoft site.

classes found in cj60lib:

 ccjbutton - ( cjbutton.cpp and cjbutton.h )

i wrote this class the originally handle the minimize and close buttons found in the ccjcontrolbar class. this class handles flat style buttons. i have expanded upon this and created an article which implements the static button control as seen in the project settings->custom build tab in visualstudio.

 ccjcombobox - ( cjcombobox.cpp and cjcombobox.h )

i wrote this class to handle the flat looking combo boxes as seen in the microsoft office products. its easy to use, simply replace any occurance of ccombobox, with ccjcombobox.

 ccjcontrolbar - ( cjcontrolbar.cpp and cjcontrolbar.h )

this class is based upon the csizingcontrolbar class written by cristiposea. i added a more authentic look to the control, including a minimize and maximize button, grippers button tooltips, popup menu support, and verticle and horizontal sizebar cursors.

 ccjframewnd - ( cjframewnd.cpp and cjframewnd.h )
ccjmdiframewnd - ( cjmdiframewnd.cpp and cjmdiframewnd.h )
ccjdockbar - ( cjdockbar.cpp and cjdockbar.h )

these classes override the default main frame layout to allow an offset for the 3d look added to the toolbars. to use these classes, simply change cframewndto ccjframewnd where cmainframe is derived from in the mainfrm.h file (use ccjmdiframewnd for mdi applications).

 ccjoutlookbar - ( cjoutlookbar.cpp and cjoutlookbar.h )

this class has changed quite a bit since the last release for vc5. i have added message handlers for mouse events, and modified it to use the ccjpagerctrlclass, instead of the default list box scroll bars.

 ccjpagerctrl - ( cjpagerctrl.cpp and cjpagerctrl.h )

this class wraps the pager common control. to use it simple create it within your view or dialog box, and set the child window with the hwnd of the control you wish pagged. when creating the child window, set the pager as its parent.

 ccjtabctrlbar - ( cjtabctrlbar.cpp and cjtabctrlbar.h )

this class is based upon dirk clemens article sizing tabcontrolbar. i have made some enhancements to the code to accomindate the modifications i made to the ccjcontrolbar class, which this class inherits from.

 ccjtoolbar - ( cjtoolbar.cpp and cjtoolbar.h )

i wrote this class to extend the ctoolbar class. this class adds a gripper to the toolbar, sets the font the toolbar will use, draws the 3d borders for the look and feel of the visual studio and office products. additionally i have add a method which allows controls to be added to the toolbar such as combo and edit boxes. to use this toolbar class, simply change ctoolbar to ccjtoolbar.

 ccoolmenumanager -( coolmenu.cpp, emboss.cpp and coolmenu.h )
csubclasswnd -( subclass.cpp and subclass.h )

this code was written by paul dilascia. check out the january 98' issue of msj. it is probably the easiest implementation for cool menus ( pulldown menus with icons ) that i have seen. some minor enhancements have been made to fix memory leak problems. these classes have been integrated into the xframewndextensions. in order to use cool menus, simply add the following code to your cmainframe::oncreate method:

 cflattoolbar - ( flatbar.cpp and flatbar.h ) obsolete with vc 6.0
cmoduleversion - ( modulver.cpp and modulver.h )

this is the base class that my ccjtoolbar derives from. this class was written by paul dilascia, and handles most of the sizing and internal issues with flat toolbars. cmoduleversion is used to check the current version of the common control dll. cflattoolbar is a composite of the october 97 and august 98 issuses of microsoft journal.

 ccoolbar, crebarinfo - ( coolbar.cpp and coolbar.h ) obsolete with vc 6.0

this code was originally written by paul dilascia. i have made some enhancements to the original code, these are the classes that are used to create the rebar bands as seen in the internet explorer 4 style ui article int the advanced ui section.

 chyperlink - ( hyperlink.cpp and hyperlink.h )

this class was written by chris maunder, from his article hyperlink control. i am using this class in order to add hyperlinks to the about dialogs in most of my articles. i have made on minor change to this class which changes the "gotourl" method from protected to public. this allows the routine to be called directly, without having to go through a static object.

this code may be used in compiled form in any way you desire. this file may be redistributed unmodified by any means providing it is not sold for profit without the authors written consent, and providing that this notice and the authors name and all copyright notices remains intact. if the source code in this file is used in any commercial application then a statement along the lines of "portions copyright 1998 kirk stowell" must be included in the startup banner, "about" box or printed documentation. an email letting me know that you are using it would be nice as well. that's not much to ask considering the amount of work that went into this.

this software is provided "as is" without express or implied warranty. use it at your own risk!
the author accepts no liability for any damage/loss of business that this product may cause.


acknowledgements:

this would not have been possible without the following authors making their code freely available:

  • cristi posea - for writing such a cool csizingcontrolbar class.
  • joerg koenig - for some ideas i got for the 3d borders and using controls in toolbars from his cool ctoolbarex class.
  • shekar narayanan - for his cool looking menu which inspired me to write the ccjoutlookbar control.
  • dirk clemens - for his sizing tabcontrolbar class which i based ccjtabctrlbar on.
  • paul dilascia - for all of his great work at msj, and making his source code availiable to us.
  • chris maunder - for use of his chyperlink control, and for letting me use his disclaimers.
  • zafir anjum - for putting together such an excellent site (www.codeguru.com), and making all those cool mfc resources availiable.
  • and to the rest of you for not letting me rest until i updated this library for vc6. i appreciate all of the suggestions and email.
时间: 2024-09-26 20:18:49

mfc extension library - cj60lib ( updated for visual c++ 6.0 )的相关文章

MFC 扩展库 - CJ60Lib

原来的库(MFCXLib)已经更名为CJ60Lib,这是为了与那些使用旧库的程序区别开来.本库与旧的库具有同样的功能,但是,针对Visual C++ 6.0作了几个扩展. 请按照下面的步骤来设定你的应用程序使用CJ60Lib这个MFC扩展库: 在你的工程设定(project/setting)中,选择 General 标签,确保 Microsoft Foundation Class 被设置成 Use MFC in a shared DLL. 在你的工程设定(project/setting)中, 选

关于Visual C++ 6.0的调试技巧和经验总结

用VC来写程序,有时总是出这样那样的问题,没办法只能自己上网查资料来解决,在这里把自己常见的问题和一些技巧贴出来分享给大家,希望对大家有用,也省去大家再去搜索的烦恼--     1.如何在Release状态下进行调试     Project->Setting=>ProjectSetting对话框,选择Release状态.C/C++标签中的Category选General,Optimizations选Disable(Debug),Debut info选Program Database.在Link

转msdn: Visual InterDev 6.0 versus FrontPage 2000: Your Choice [2]

frontpage|interdev|visual       Figure 6: The Project Deployment Explorer         Visual InterDev also contains the Document Outline page and the Project Deployment Explorer. You can control a site from this Explorer, and change deployment mode in a

Visual C++ 6.0编程实现打印功能

Visual C++6.0是开发Windows应用程序的强大工具,但是要通过它实现程序的打印功能, 一直是初学者的一个难点,经常有朋友询问如何在VC中实现打印功能,他们往往感到在MFC提 供的框架内实现这个问题很复杂,不知道如何下手.本例针对这个问题,介绍一种简单的方 法实现文字串的打印功能,读者朋友可以在此基础上稍微改动一下,就可以实现文件.图像的 打印功能. 一.实现方法 在Windows操作系统下,显示器.打印机和绘图仪都 被视为输出设备,正常情况下,系统默认的输出设备是显示器.要使用打印

《Visual C++ 开发从入门到精通》——1.2 Visual C++ 6.0开发环境

1.2 Visual C++ 6.0开发环境 知识点讲解:光盘\视频\PPT讲解(知识点)\第1章\Visual C++ 6.0开发环境介绍.mp4 学习任何一门程序语言,都需要遵循图1-12所示的过程.本节将介绍Visual C++ 6.0集成开发环境的基本知识. 图1-12 学习一门语言的过程 1.2.1 熟悉集成开发环境 在打开Visual C++ 6.0后,需要熟悉Visual C++ 6.0这个集成开发环境.首先从Windows操作系统中选择"开始"→"程序&quo

《Visual C++ 开发从入门到精通》——第1章 Visual C++ 6.0的最初印象1.1 Visual C++ 6.0概述

1.1 Visual C++ 6.0概述 知识点讲解:光盘视频PPT讲解(知识点)第1章Visual C++ 6.0介绍.mp4 Visual C++ 6.0是一个强大的可视化软件开发环境,通过它可以快速编写出各种C/C++程序.从数据库应用程序到网络应用程序,从图形.图像绘制到多媒体编程,从基本的对话框.单文档.多文档应用程序到动态链接库,再到ActiveX控件.总之,通过Visual C++ 6.0这一工具,可以实现上述各类程序. 1.1.1 Visual C++ 6.0的特点Visual

转msdn: Visual InterDev 6.0 versus FrontPage 2000: Your Choice [1]

frontpage|interdev|visual Visual InterDev 6.0 versus FrontPage 2000: Your Choice Alexander Maltsev   Visual InterDev 6.0 and FrontPage 2000 are two tools used by Web professionals, but they offer complementary functions. The best one to choose depend

Visual Basic 6.0 控件和 .NET 控件的区别

visual|控件|区别 Visual Basic 6.0 控件和 .NET 控件的区别 摘要:本文简单介绍了 Microsoft Visual Basic 6.0 中的标准控件和等效的 Microsoft .NET 控件. 目标 了解哪些 Visual Basic 6.0 ActiveX 控件在 .NET 中具有等效控件. 了解 .NET 控件中哪些属性发生了变化. 了解 .NET 中有哪些新控件. 前提条件 要彻底理解本文内容,需要满足以下条件: 了解什么是 ActiveX 控件. 使用 V

Visual Basic 6.0 控件和 .NET 控件的区别后记

visual|控件|区别 Public Class frmTest    Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code "     Public Sub New()        MyBase.New()         'Windows 窗体设计器必需此调用.        InitializeComponent()         '调用 InitializeCom