Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » {Templates}: A different Complex.upt
{Templates}: A different Complex.upt [message #15299] |
Tue, 15 April 2008 22:55 |
|
tvanriper
Messages: 85 Registered: September 2007 Location: Germantown, MD, USA
|
Member |
|
|
I've had occasion to find myself bitten badly by the starting code provided by Complex.upt, mostly because of the "using namespace Upp;" command written into one of the headers it generates.
So today, I decided to do something about it, and... well... kind of went a little overboard.
On the odd chance someone else may take interest in it, I'm providing it here.
This version of Complex.upt can provide a resource.rc file that will generate an icon for your application, as well as version information. It also moves the dialog's implementation code into its own .cpp file. The language selection controls the language information written into the VERSIONINFO block of the resource file... probably not of interest if you're compiling for Linux.
I have one potentially awful thing I've done in this... the various layouts wind up belonging to the namespace 'Upp' as a consequence of this technique. I view this as preferable to the 'using namespace Upp;' technique in the header, as this prevents name clashes in other tools that I use.
I'm open to suggestions on improving this, but all-in-all, I don't think this is a bad way to start a larger project.
-
Attachment: LComplex.upt
(Size: 3.64KB, Downloaded 474 times)
|
|
|
Goto Forum:
Current Time: Sun Jun 16 15:45:08 CEST 2024
Total time taken to generate the page: 0.01776 seconds
|