Click here to Skip to main content
15,880,543 members
Articles / Programming Languages / C++

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

Rate me:
Please Sign up or sign in to vote.
4.92/5 (38 votes)
29 Jun 2003 447.3K   5.3K   142  
Get statistics about your source code with a click of a button
// AboutDialog.cpp : implementation file
//

#include "stdafx.h"
#include "linecount.h"
#include "AboutDialog.h"
#include "Commands.h"
#include "ExtrnSrc\AICLoader.h"
#include "ExtrnSrc\AddInComm.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAboutDialog dialog


CAboutDialog::CAboutDialog(CWnd* pParent /*=NULL*/)
	: CDialog(CAboutDialog::IDD, pParent)
{
	//{{AFX_DATA_INIT(CAboutDialog)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CAboutDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAboutDialog)
	DDX_Control(pDX, IDC_WWW2, m_WWW2);
	DDX_Control(pDX, IDC_WWW1, m_WWW1);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CAboutDialog, CDialog)
	//{{AFX_MSG_MAP(CAboutDialog)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CAboutDialog message handlers

BOOL CAboutDialog::OnInitDialog() 
{
    int iVerMaj, iVerMin, iVerExtra;
    CString s; //cStr1, cStr2, cStr3;
    char ver[256];

	CDialog::OnInitDialog();

    strcpy(ver, "Build ");
    aiclGetModuleVersion("LineCount.dll", ver + strlen(ver));
    SetVersionStr(IDC_PLC_VER, CString(ver));
	
    // AddInComm Version
    if (!aiclIsAICLoaded())
    {
        s = "Not loaded";
    }
    else
    {
        AICGetDllVersion(iVerMaj, iVerMin, iVerExtra);
        aiclGetModuleVersion("AIC.mod", (LPSTR)ver);
        s.Format("Version %d.%d.%d (%s)", iVerMaj, iVerMin, iVerExtra,
            ver);
    }
    SetVersionStr(IDC_AIC_VER, s);

    // WWhiz! Interface Version
    if (!g_pWWhizInteface)
    {
        s = "Not loaded";
    }
    else
    {
#ifdef _DEBUG
        aiclGetModuleVersion("WWhizInterface2D.mod", (LPSTR)ver);
#else
        aiclGetModuleVersion("WWhizInterface2.mod", (LPSTR)ver);
#endif
        s.Format("Version %s", ver);
    }
    SetVersionStr(IDC_WWI_VER, s);
	
	return TRUE;
}

void CAboutDialog::SetVersionStr(int id, CString& sVer)
{
    CString s1, s2;
    GetDlgItemText(id, s1);
    s2.Format(s1, sVer);
    SetDlgItemText(id, s2);
}

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


Written By
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.

Comments and Discussions