Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Project Line Counter Add-In v2.10 for VS.NET and VC6

, 29 Jun 2003
Get statistics about your source code with a click of a button
linecount_dll.zip
LineCount.dll
WWhizInterface.mod
LineCount.chm
linecount_src.zip
LineCount.dsw
LineCount_VC5.dsw
LineCount.dsp
LineCount_VC5.dsp
LineCount.odl
LineCount.def
LineCount.clw
Help
arrowrt.gif
Index.hhk
LineCount.chm
LineCount.hhp
mailto.gif
metl011.gif
PLC.gif
small_exclamation.gif
TOC.hhc
weblink.gif
res
idr_main.ico
project.ico
TBarLrge.bmp
TBarMedm.bmp
title.ico
ExtrnSrc
Release
LineCount.dll
WWhizInterface.mod
LineCount.chm
plc110src.zip
plc111.zip
WWhizInterfaceInstaller210Beta1.exe
LineCount.dll
LineCount.chm
plc111src.zip
WWhizInterfaceInstaller210Beta1.exe
LineCount.dll
LineCount.chm
Source
LineCount.dsw
LineCount_VC5.dsw
LineCount.dsp
LineCount_VC5.dsp
LineCount.odl
LineCount.def
Help
.cvsignore
Index.hhk
LineCount.hhp
PLC.gif
TOC.hhc
arrowrt.gif
mailto.gif
metl011.gif
small_exclamation.gif
weblink.gif
res
TBarLrge.bmp
TBarMedm.bmp
idr_main.ico
project.ico
title.ico
ExtrnSrc
Debug
WWhizInterface2D.mod
plc150.zip
WWhizInterfaceInstaller212.exe
LineCount.dll
LineCount.chm
Reports
SampleAnalysis.xls
Simple-BW.xsl
Simple-Color.xsl
plc150src.zip
WWhizInterfaceInstaller212.exe
LineCount.dll
LineCount.chm
SampleAnalysis.xls
Simple-BW.xsl
Simple-Color.xsl
LineCount.dsw
LineCount.dsp
LineCount.odl
LineCount.def
LineCount.clw
.cvsignore
TOC.hhc
linecount.hhp
arrowrt.gif
Index.hhk
PLC.gif
mailto.gif
small_exclamation.gif
weblink.gif
info_dot_small.gif
TBarLrge.bmp
idr_main.ico
project.ico
HdrDownA.bmp
HdrUpA.bmp
title.ico
info.ico
TBarMedm.bmp
WWhizInterface2D.mod
plc200.zip
LineCount.cab
WWhizInterface30VC6_1016.exe
plc200src.zip
.cvsignore
LineCount.def
LineCount.dsp
LineCount.dsw
LineCount.odl
ResizableLib
.cvsignore
ResizableLib.dsp
ResizableLib.dsw
.cvsignore
Index.hhk
LineCount.hhp
PLC.gif
TOC.hhc
arrowrt.gif
info_dot_small.gif
mailto.gif
small_exclamation.gif
weblink.gif
ObjModelVC6
ObjModelVC7
MSADDNDR.tlh
MSO.tlh
dte.tlh
HdrDownA.bmp
HdrUpA.bmp
LineCountVC6.rgs
LineCountVC7.rgs
TBarLrge.bmp
TBarMedm.bmp
idr_main.ico
info.ico
lcgo.bmp
project.ico
title.ico
WWhizInterface2D.mod
plc210.zip
SetupPLC210.exe
plc210src.zip
.cvsignore
LineCount.def
LineCount.dsp
LineCount.dsw
LineCount.odl
.cvsignore
ResizableLib.dsp
ResizableLib.dsw
.cvsignore
Index.hhk
LineCount.hhp
PLC.gif
TOC.hhc
arrowrt.gif
info_dot_small.gif
mailto.gif
small_exclamation.gif
weblink.gif
MSADDNDR.tlh
MSO.tlh
dte.tlh
HdrDownA.bmp
HdrUpA.bmp
LineCountVC6.rgs
LineCountVC7.rgs
TBarLrge.bmp
TBarMedm.bmp
gallery.xsl
idr_main.ico
info.ico
lcgo.bmp
project.ico
title.ico
WWhizInterface2D.mod
////////////////////////////////////////////////////////////////////
// HHSupp.h : HTML Help Support Module Header File
//

#ifndef __HHSUPPORT_H
#define __HHSUPPORT_H

#include <afxdlgs.h>


/* ============================================================== []
   Help ID Ranges and Their Meaning
   --------------------------------
   HHSupp defines a few special help ID ranges.  Help topics are 
   displayed differently, depending on which range the help ID 
   falls in:

     0x00000000-0x1FFFFFFF: Text Popups/Default HTML Window Type
         This range plays a double role, depending on the
         context of the help call.
         For dialog/property page controls with help IDs in this 
         range, a text popup is displayed (the control's help ID 
         should match a .Topic entry in the cshelp.txt file).
         When used with ShowHTMLHelp(), or when context help is
         called for a menu item, a full HTML topic will be 
         displayed using the default window type.

         NOTE: The 0x00000000-0x0000FFFF range is used by
         Windows/MFC for menu and dialog control command codes
         (for example, see your project's Resource.h file). 
         You should refrain from defining your own help IDs in 
         this range.

     0x20000000-0x2FFFFFFF: HTML Popups
         This range is reserved for dialog/property-page controls 
         that require a complex (HTML) popup.  This popup is 
         actually a regular HTML page in the .CHM file, but it is 
         displayed in a special window type.
         The default window type name (PopupTopicWnd) should be 
         defined in the help project file.  Alternatively, you can
         use a different window type name for this range by 
         setting the g_pszPopupWinTypeName variable.

     0x30000000-0x30FFFFFF: User Defined/Default Window Type
         The ID numbers in this range use window types registered
         with the RegisterHHWindowType() function.
         The type number is designated in the lower byte of the 
         high word, i.e. the number format is 0x30NNxxxx where NN 
         denotes the type number.
         When NN == 0, the default window type is used.

     0x31000000-0x30FFFFFF: Reserved

     0x40000000-0xFFFFFFFF: Default Window Type
         This range gets no special treatment.  Topics with help 
         IDs in this range are displayed using the .CHM's default 
         window type.
[] ============================================================== */

// g_pszPopupWinTypeName points to the name of the default HH window
// type used with help IDs in the range 0x20000000...0x2FFFFFFF
extern LPCTSTR g_pszPopupWinTypeName;

// true/false: display a popup error message when no help ID is 
// available for a control (default: true)
extern bool g_bHTMLHelp_ShowNoHelpMessage;

// APP_CHM: When passed as the pszFile parameter for HHSupp's 
// implementation of the HtmlHelp() function, the application's
// default .chm file is used.
#define APP_CHM   ((LPCTSTR)-1)


/* ============================================================== []
   WinHelpToHTMLHelp() - Translates MFC WinHelp calls to 
   equivalent HTML Help calls.  Use the ClassWizard to add the
   "WinHelp" message to your application class, and make sure it
   reads:
       WinHelpToHTMLHelp(this, dwData, nCmd); 
[] ============================================================== */

void WinHelpToHTMLHelp(CWinApp *pApp, DWORD dwData, UINT nCmd);


/* ============================================================== []
   ShowHTMLHelp() - Displays a help topic using the rules 
   described above ("Help ID Ranges and Their Meaning").  
[] ============================================================== */

void ShowHTMLHelp(HWND hWnd, DWORD helpID, 
    LPCTSTR pszHelpWndType = NULL, LPCTSTR pszHelpFile = APP_CHM);


/* ============================================================== []
   RegisterHHWindowType() - Registers window type for use with
   the 0x30NN0000 range.  (See "Help ID Ranges and Their Meaning"
   above).
[] ============================================================== */

bool RegisterHHWindowType(int n, LPCTSTR name);


/////////////////////////////////////////////////////////////////////////////
// Help ID Mapping Support

// you must include this macro somewhere in your dialog/prop. page
// definition to enable mapping support
#define DECLARE_HELP_IDS() \
private: \
    static const DWORD m_dwHelpIDs[]; \
protected: \
    virtual const DWORD *GetHelpIDs() { return m_dwHelpIDs; }

// use these two macros to declare your ID map, i.e.
//      BEGIN_HELP_IDS(CMyDialog)
//          IDC_LEFT,   IDH_DIRECTIONS,
//          IDC_RIGHT,  IDH_DIRECTIONS
//      END_HELP_IDS()
#define BEGIN_HELP_IDS(theClass) \
    const DWORD theClass::m_dwHelpIDs[] = {
#define END_HELP_IDS() \
    ,0 , 0 };


/////////////////////////////////////////////////////////////////////////////
// Common definitions for HTML Help base classes

#define DECLARE_HTMLHELPBASE(classname, baseclass)                 \
protected:                                                         \
    afx_msg BOOL OnHelpInfo(HELPINFO* pHelpInfo);                  \
	afx_msg void OnContextMenu(CWnd*, CPoint point);               \
    afx_msg LRESULT OnCommandHelp(WPARAM wParam, LPARAM lParam);   \
    afx_msg void OnIDHelp();                                       \
    DECLARE_MESSAGE_MAP()                                          \
                                                                   \
    DECLARE_HELP_IDS();                                            \
                                                                   \
    DECLARE_DYNCREATE(classname)                                   \
                                                                   \
public:                                                            \
    bool m_bAllowImplicit;                                         \
    int  m_iHelpID;                                                \
                                                                   \
    classname() : baseclass() {}
    


/////////////////////////////////////////////////////////////////////////////
// CHHDialog

class CHHDialog : public CDialog
{
// Construction
public:
    CHHDialog(UINT nIDTemplate, CWnd* pParent = NULL,
        bool bAllowImplicit = true, int iHelpID = -1) :
        m_bAllowImplicit(bAllowImplicit), m_iHelpID(iHelpID),
        CDialog(nIDTemplate, pParent) {}

    DECLARE_HTMLHELPBASE(CHHDialog, CDialog);
};


/////////////////////////////////////////////////////////////////////////////
// CHHPropPage

class CHHPropPage : public CPropertyPage
{
// Construction
public:
    CHHPropPage(UINT nIDTemplate, bool bAllowImplicit = true, 
        int iHelpID = -1, UINT nIDCaption = 0) : 
        m_bAllowImplicit(bAllowImplicit), m_iHelpID(iHelpID),
        CPropertyPage(nIDTemplate, nIDCaption) { CommonInit(); }

    CHHPropPage(LPCTSTR lpszTemplateName, bool bAllowImplicit = true, 
        int iHelpID = -1, UINT nIDCaption = 0) : 
        m_bAllowImplicit(bAllowImplicit), m_iHelpID(iHelpID),
        CPropertyPage(lpszTemplateName, nIDCaption) {CommonInit();}

    DECLARE_HTMLHELPBASE(CHHPropPage, CPropertyPage);

protected:
    void CommonInit();
};

/////////////////////////////////////////////////////////////////////////////
// CHHPropSheet

class CHHPropSheet : public CPropertySheet
{
	DECLARE_DYNAMIC(CHHPropSheet)
public:
	CHHPropSheet(UINT nIDCaption, CWnd* pParentWnd = NULL, 
        UINT iSelectPage = 0, int iHelpID = -1) : 
        m_iHelpID(iHelpID),
        CPropertySheet(nIDCaption, pParentWnd, iSelectPage) {}
	CHHPropSheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, 
        UINT iSelectPage = 0, int iHelpID = -1) :
        m_iHelpID(iHelpID),
        CPropertySheet(pszCaption, pParentWnd, iSelectPage) {}

    int m_iHelpID;

	virtual int DoModal();

    // NOTE: This function is *not* virtual in the base class, so
    // calling ((CPropertySheet *)mysheet)->AddPage() will not set
    // set the help ID correctly for pages created after DoModal().
    // Instead, use ((CHHPropSheet *)mysheet)->AddPage()
    void AddPage(CHHPropPage* pPage);

protected:
	DECLARE_MESSAGE_MAP()
    virtual BOOL OnInitDialog();
};

/////////////////////////////////////////////////////////////////////////////


#endif // __HHSUPPORT_H

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Oz Solomon
Experion
Canada Canada
You may know Oz from his WndTabs days. Oz has long since left client side development to work on web technologies and to consult in the R&D management field.

| Advertise | Privacy | Mobile
Web02 | 2.8.141022.2 | Last Updated 30 Jun 2003
Article Copyright 2000 by Oz Solomon
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid