MFC expansion library - CJ60LIB (upgrade for Visual C ++ 6.0)

zhaozj2021-02-08  217

The original library (MFCXLIB) has been renamed CJ60LIB, which is to distinguish between a program that uses the old library. This library has the same functionality with the old library, but several extensions are made for Visual C 6.0.

Follow the steps below to set your application using CJ60LIB this MFC extension library:

In your project setting (Project / Setting), select the General tab to ensure that the Microsoft Foundation Class is set to the USE MFC IN A Shared DLL. In your project setting (Project / Setting), select the LINK tab. Set Category to INPUT and add ../lib Add in the Additional Library Path. Still in the Link tab, change category for General. Compile to the ../lib directory for Output Name. This will make it easy to perform and debug because DLL and EXE are in the same directory. For example, it is ../lib/mydeMo.exe. Select the C / C label. Change category for PreProcessor, then add ../include to Additional Include Directories. The last step will add the following two lines to the stdafx.h file, which will enter the external class and can use them throughout your application:

#define mfcx_proj # include

If you want to be static to CJ60LIB, make the following changes:

In your project setting, select the General tag. Make sure the Microsoft Foundation Class is set to Use MFC IN A Static Library. Add the following lines of code in your stdafx.h file, which will cause the library to be static link to your application (make sure to add it before the include statement):

#define mfcxlib_static # define mfcx_proj # include

This library is written for the version of 4.71 or after ComctL32.dll. If you are an old version, you can download the latest version from Microsoft's site.

Classes in CJ60LIB:

CCJButton - (cjbutton.cpp and cjbutton.h)

I wrote this class to initially handle the minimization and closing buttons in the CCJControlbar class. This class can handle flat buttons. I have an extension on this basis. I created an entry that implements a static button control, just as I saw in VisualStudio's Project Settings-> Custom Build tag.

CCJcomboBox - (CJcomboBox.cpp and CJcomboBox.h)

I wrote this class to handle the combination of flat appearance, just as seen in Microsoft's Office Series products. It is easy to use, just replace all CCOMBOBOXs to ccjcomboBox. See here for detailed description using this class.

CCJControlbar - (CJControlBar.cpp and CJControlbar.h)

This class is based on CSIZINGCONTROLBAR classes written by Cristiposea. I have added more appearance to this control, including the minimum and maximization buttons, handles, buttons, pop-up menus support and vertical and horizontal Sizebar pointers. See here using this class.

CCJFrameWnd - (CJFrameWnd.cpp and CJFrameWnd.h) CCJMDIFrameWnd - (CJMDIFrameWnd.cpp and CJMDIFrameWnd.h) CCJDockBar - (CJDockBar.cpp and CJDockBar.h) which covers the main frame window class original layout, thereby allowing the toolbar The three-dimensional appearance is offset. To use these classes, just change the base class by cframewnd to ccjframeWnd when the CMAINFRAME is inherited in the mainfrm.h file. Use ccjmdiframeWnd).

CcjoutLookBar - (cjoutlookbar.cpp and cjoutlookbar.h)

Since the final version of VC5, this class has been modified a lot. I have added the process of the mouse event and modify it to replace the default list box scroll using CCJPagerCtrl.

CCJPAGERCTRL - (CJPagerCtrl.cpp and cjpagerctrl.h)

This class contains the Pager public control. To use it just in your view or dialog box, then specify its sub-window with the hwnd you want to paid to the control. When you create a sub-window, set the Pager for its parent window. See here using this class.

CCJTABCTRLBAR - (CJTabctrlBar.cpp and CjtabCtrlbar.h)

This class is based on the discussion of SIZING TABCONTROLBAR based on Dirk Clemens. I have made some extensions in order to adapt to the changes to the CCJControlbar class because this class is inherited from the CCJControlbar class.

CCJTOOLBAR - (CJToolBar.cpp and CJToolbar.h)

This function I wrote is an extension to the CToolbar class. This class adds the handle to the toolbar, set the font used by the toolbar, draw 3D boundaries similar to Visual Studio and Office products. In addition, I added a method that can add controls on the toolbar (such as a combo box and edit box). To use this class, you can change CToolbar to ccjtoolbar simply.

CCOOLMENUMANAGER - (CoolMenu.cpp, Emboss.cpp and CoolMenu.h) CSUBClassWnd - (Subclass.cpp and Subclass.h)

Writing by Paul Dilascia. Please read the MSJ theme in January 1998. It may be the easiest way I have seen to implement the "Cool" menu (including the drop-down menu of the icon). I made some small enhancements to solve the problem of memory leakage. These classes have been integrated into the XFrameWnd extension. In order to use the "Cool" menu, you only need to add the following code to your CMAINFRAME :: oncreate method:

Cflattoolbar - (FlatBar.cpp and flatbar.h) has an old CMODuleVersion in VC 6.0 - (MODULVER.CPP AND MODULVER.H)

This is my ccjtoolbar base class. This class is written by Paul Dilascia to handle the telescopic and internal problems of most flat tool bars. CModuleVersion is used to check the version of the current public control DLL.

Ccoolbar, Crebarinfo - (Coolbar.cpp and Coolbar.h) is old in VC 6.0.

These codes were originally written by Paul Dilascia. I have made some enhancements for the original code, which are used to create relocated toolbars.

ChyperLink - (HyperLink.cpp and HyperLink.h)

This class is written by Chris Maunder, based on its article about HyperLink control. I use this class to add a hyperlink in the "About" dialog. I made a small modification, that is, the "Gotourl" function changes from the Protected type into public. This will allow the function to be called directly without passing through a static object. These codes can be compiled with any way you want. This document can be distributed with any means without modifying without the memory of this statement and the author's name and all copy rights, this document can be distributed without modification (I have no modification, just translation - webmaster). If the code in this document is used for any business program, the starting flag of the program and the "PORTION Copyright? 1998 Kirk Stowell" must be declared on the dialog and the printed document. Any notice that I am using its email will make me very happy. These requirements are not considered in consideration of a lot of work when writing these codes. This software does not provide any understanding or suggestive guarantee, you must take all the risks using it. The author does not assume any responsibility for data damage and loss due to this product.

thank:

Without the efforts of these people, this code is not possible to be free:

Cristi Posea - For this CSIZINGCONTROLBAR class that is written. Joerg Koenig - For some ideas from his CToolbarex class, I use to make a 3D boundary and use controls in the toolbar. Shekar Narayanan - For his cool menu, I got the inspiration of writing CCJOUTLOOKBAR controls. Dirk Clemens - For his retractable TabControlbar class, my ccjtabctrlbar is based on this. Paul Dilascia - For all outstanding work in MSJ, and he got our source code. Chris Maunder - For his CHYPERLINK control. Zafir Anjum - For building such an excellent website (www.codeguru.com) and makes all the cool MFC resources for us. Thank you for your unable to stop until I upgraded this library for VC6. I thank all these recommendations and emails.

转载请注明原文地址:https://www.9cbs.com/read-3088.html

New Post(0)