分类: C/C++
2007-09-29 10:55:49
this article was contributed by kirk stowell.
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:
#define mfcx_proj #include
in order to statically link to cj60lib, make the following changes:
#define mfcxlib_static #define mfcx_proj #include
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 cframewnd to 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 ccjpagerctrl class, 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 xframewnd extensions. 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! |
acknowledgements:
this would not have been possible without the following authors making their code freely available: