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  |
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
|
|
|
Goto Forum:
Current Time: Tue Apr 29 01:34:27 CEST 2025
Total time taken to generate the page: 0.00846 seconds
|