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 » Community » Newbie corner » How to access sub window information in other functions?
icon5.gif  How to access sub window information in other functions? [message #33218] Sun, 17 July 2011 12:43 Go to next message
silverx is currently offline  silverx
Messages: 62
Registered: March 2011
Member

In function, Subwindow1::OpenSubwindow() I great a second window, known as dlg2, using

WithTheSubWindow<TopWindow> dlg2;
CtrlLayoutOK(dlg2, "This is the subwindow");

Which opens fine. And I can access that window as dlg2 only in this function. How do I access things in that window in another function else where. Like I have a button that gets the size of the window. It calls another functions, but when I type in dlg2. I get nothing. I have tried all kinds of things, but nothing seems to get me to that window so I can change things on it like labels or get information from it.

How can I access this window from another function.

I have attached the complete code if that helps.

david

Re: How to access sub window information in other functions? [message #33219 is a reply to message #33218] Sun, 17 July 2011 14:13 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

Let test this modifications


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
Re: How to access sub window information in other functions? [message #33220 is a reply to message #33219] Sun, 17 July 2011 14:23 Go to previous messageGo to next message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

Use button "Generate code" in layout designer...

index.php?t=getfile&id=3383&private=0


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
icon7.gif  Re: How to access sub window information in other functions? [message #33221 is a reply to message #33219] Sun, 17 July 2011 14:34 Go to previous messageGo to next message
silverx is currently offline  silverx
Messages: 62
Registered: March 2011
Member
That works great. Thank you.

I tried it make it a separate class before with a separate .h file, but it had too many errors in it so I went back to the way it is now.

Again this works.
Re: How to access sub window information in other functions? [message #33224 is a reply to message #33221] Sun, 17 July 2011 16:37 Go to previous message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

This button auto generate class definition, that compile without errors.

SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}
Previous Topic: umk is a virus! according to avira
Next Topic: Is their a way to have code execute if the window size is changed?
Goto Forum:
  


Current Time: Fri Apr 26 12:33:33 CEST 2024

Total time taken to generate the page: 0.03442 seconds