Click here to Skip to main content
13,138,694 members (49,070 online)
Click here to Skip to main content
Articles » Database » Database » General » Downloads


37 bookmarked
Posted 6 Jan 2005

PostgreSQL/libpqxx Class Generator

, 18 Aug 2006
Automated generation of PostgreSQL data transfer classes.
 pgpqgen.cpp  -  This file contains the entry point, and the code that
                 creates the main property sheet window and calls its
				 DoModal method.

 begin     : December 2004
 copyright : (C) 2004-2006 by Phil Cairns
 email     :
 $Id: pgpqgen.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!

#include "stdafx.h"

#include <atlframe.h>
#include <atlctrls.h>
#include <atldlgs.h>

#include "resource.h"

#include "GlobalData.h"
#include "PGWizConnect.h"
#include "PGWizTarget.h"
#include "PGWizTables.h"
#include "PGWizGenerate.h"

CAppModule _Module;

// Run method creates and executes the property sheet (Modally)
int Run(LPTSTR /*lpstrCmdLine*/ = NULL, int nCmdShow = SW_SHOWDEFAULT)
	CMessageLoop theLoop;

	CPropertySheet sheet(_T("PostgreSQL libpqxx-based Class Generator"));
	PGWizConnect page1;
	PGWizTarget page2;
	PGWizTables page3;
	PGWizGenerate page4;



	return 0;

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_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...

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