Click here to Skip to main content
12,447,096 members (51,967 online)
Click here to Skip to main content
Articles » Database » Database » General » Downloads


35 bookmarked

PostgreSQL/libpqxx Class Generator

, 18 Aug 2006
Automated generation of PostgreSQL data transfer classes.
 pgpqtest.cpp - Standard WTL main file. The only addition here is that we
				tell the DataManager singleton that we've finished with it,
				and it should be destroyed.

 begin     : August 2006
 copyright : (C) 2006 by Phil Cairns
 email     :
 $Id: pgpqtest.cpp 2080 2006-08-18 01:53:19Z phil $

 This code may be used in compiled form in any way you desire (including
 commercial use). The code 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.

 This software is provided "as is" without express or implied warranty. Use
 it at your own risk!
// $Id: pgpqtest.cpp 2080 2006-08-18 01:53:19Z phil $

#include "stdafx.h"

#include "resource.h"

#include "pgpqtestView.h"
#include "aboutdlg.h"
#include "MainFrm.h"
#include "DataManager.h"

CAppModule _Module;

int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
	CMessageLoop theLoop;

	CMainFrame wndMain;

	if (wndMain.CreateEx() == NULL)
		ATLTRACE(_T("Main window creation failed!\n"));
		return 0;


	int nRet = theLoop.Run();

	return nRet;

int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPTSTR lpstrCmdLine, int nCmdShow)
	HRESULT hRes = ::CoInitialize(NULL);

	// If you are running on NT 4.0 or higher you can use the following call instead to 
	// make the EXE free threaded. This means that calls come in on a random RPC thread.

	// this resolves ATL window thunking problem when Microsoft Layer for Unicode (MSLU) is used
	::DefWindowProc(NULL, 0, 0, 0L);

	AtlInitCommonControls(ICC_COOL_CLASSES | ICC_BAR_CLASSES);	// add flags to support other controls

	hRes = _Module.Init(NULL, hInstance);

	int nRet = Run(lpstrCmdLine, nCmdShow);



	return nRet;

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.


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


About the Author

Australia Australia
No Biography provided

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160811.3 | Last Updated 18 Aug 2006
Article Copyright 2005 by _oti
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid