Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Calling windows not in main.cpp
Calling windows not in main.cpp [message #23787] Sun, 22 November 2009 10:44 Go to previous message
Mystery Smith is currently offline  Mystery Smith
Messages: 4
Registered: November 2009
Junior Member
Hi all,

I've run across yet another problem (learning C++/U++ is more difficult than I first imagined.) Because my project is quite large and I'm such a novice, I thought it would be a good idea to separate my code into separate files with intuitive names. I decided to try doing it with my Splash Screen and the code looks like this.

main.cpp

/* BRAIN BOX MAIN.CPP */

#include "BrainBox.h"

....


/* Run the program Loop */
GUI_APP_MAIN
{	
	splashScreen().Run();
	Ctrl::ProcessEvent();

	// Open the mainWindow
    mainWindow().Run();
}


BrainBox.h
#ifndef _BrainBox_BrainBox_h_
#define _BrainBox_BrainBox_h_

#include <CtrlLib/CtrlLib.h>
#include <Core/Core.h>
#include <stdio.h>


using namespace Upp;


//Load Layouts
#define LAYOUTFILE <BrainBox/Layouts.lay>
#include <CtrlCore/lay.h>


// Load Images
#define IMAGECLASS Images
#define IMAGEFILE <BrainBox/images.iml>
#include <Draw/iml.h>




// Declarations
//Guessing some sort of declaration for the function needs to be made here?

#endif


SplashScreen.cpp
/* Splash Screen File */
#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct splashScreen : TopWindow
{
	splashScreen()
	{
		Title("Splash Screen");
		SetRect(0, 0, 200, 300);
	}
};


I can't link these files together and I'm assuming it has something to do with the Header File. Can anybody help? Sorry I'm so bad at this.


Thanks so much, in advance
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem with TopWindow and Widgets using Layout editor
Next Topic: Paint outside Ctrl Rect
Goto Forum:
  


Current Time: Fri Mar 29 03:13:24 CET 2024

Total time taken to generate the page: 0.01181 seconds