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 » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » simple TopWindow... branch GUI_APP_MAIN
simple TopWindow... branch GUI_APP_MAIN [message #212] Sat, 03 December 2005 14:14 Go to previous message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
if it helps for the beginners...
start learning..
Step 1 .the minimal Rolling Eyes ? gui program in U++:
"titleless Window":
#include <CtrlLib/CtrlLib.h>

GUI_APP_MAIN
{
    TopWindow().Run();  //creates, opens and starts pumping messages...
}


2. let's make much more sophisticated- "title1 Window":
#include <CtrlLib/CtrlLib.h>

GUI_APP_MAIN
{
    TopWindow().Title("title1").Run();  //creates window and its title, opens and starts pumping messages...
}


3. "title1 Window, Zoomable,Sizeable":
#include <CtrlLib/CtrlLib.h>

GUI_APP_MAIN
{
    TopWindow().Title("title1").Zoomable().Sizeable().Run();  //creates window and its title, opens and starts pumping messages...
}


4. a) "title1 Window, setRect" this way doesn't work:

#include <CtrlLib/CtrlLib.h>

GUI_APP_MAIN
{
    TopWindow().Title("title1").SetRect(0, 0, 260, 80).Run();  // should create window and its title, open and start pumping messages... but
//error C2228: left of '.Run' must have class/struct/union type
        type is 'void'
}


Why? I don't know. We need to ask the creators...

But it works in the next examples I'm going to put in a different topic. So, watch the space... Cool

Edited:
4 b) "title1 Window, setRect" - it works like this:

#include <CtrlLib/CtrlLib.h>

GUI_APP_MAIN
{
    TopWindow().Title("title1").Run();
    TopWindow().SetRect(0, 0, 260, 80);
}

[Updated on: Sat, 03 December 2005 17:28]

Report message to a moderator

 
Read Message
Read Message
Next Topic: simple TopWindow... branch classWindow : TopWindow
Goto Forum:
  


Current Time: Sun May 12 10:34:30 CEST 2024

Total time taken to generate the page: 0.01776 seconds