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 » How to call instance in main.cpp
Re: How to call instance in main.cpp [message #5129 is a reply to message #5128] Wed, 06 September 2006 17:17 Go to previous messageGo to previous message
Ulti is currently offline  Ulti
Messages: 108
Registered: September 2006
Experienced Member
well,that's hard to describe,let's see some code:

in main.cpp:
struct App : public TopWindow
{
ULeftCtrl Left;
URightCtrl Right;
....
CppSQLite3DB database;//that is another
String exeDML(const char* szSQL);
//this routine to parse szSQL and record every INSERT or UPDATE with acture ROWID.
....
}
GUI_APP_MAIN
{
App().Run();
}

in LeftCtrl.h(represent Left Pane) somewhere
want to call database.xxx and exeDML()

==================================================
static Vector<Ctrl *> Ctrl::GetTopCtrls();
static Vector<Ctrl *> Ctrl::GetTopWindows();

is that get App struct?

if not this not help,I can define database pointer in LeftCtrl.h and then in App::App() make this pointer point to database,but I got no idea with exeDML.I have to consider trigger or some other way.

[Updated on: Wed, 06 September 2006 17:27]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: always-on-top window
Next Topic: StaticRect blocks mouse events - deliberate?
Goto Forum:
  


Current Time: Mon Jun 17 04:39:57 CEST 2024

Total time taken to generate the page: 0.02146 seconds