Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Method to Open a New Layout Window
Method to Open a New Layout Window [message #1414] |
Fri, 03 March 2006 01:52 |
Justin
Messages: 57 Registered: March 2006 Location: Orange County California
|
Member |
|
|
Hey everyone,
I am new at U++ in addition to being fairly new at C++. I have written some Win32 API applications using straight C before, but nothing fancy. I am trying to Open a layout window that was created by pressing a button. What method would I use to display the 'modify' layout after pressing the OK button on the 'ExampleLayout' layout?
Thanks in advance.
Justin
***header file*******
#ifndef _Example_Example_h
#define _Example_Example_h
#include <CtrlLib/CtrlLib.h>
#define LAYOUTFILE <Example/Example.lay>
#include <CtrlCore/lay.h>
class Example : public WithExampleLayout<TopWindow> {
public:
Withmodify<ParentCtrl> modify;
typedef Example CLASSNAME;
Example();
void Compute();
};
#endif
***cpp File**********
#include "Example.h"
void Example::Compute()
{
/*
I want this code to open another layout window
*/
}
Example::Example()
{
CtrlLayout(*this, "Window title");
btnOK <<= THISBACK(Compute);
}
GUI_APP_MAIN
{
Example().Run();
}
***Layout File*******
LAYOUT(ExampleLayout, 404, 276)
ITEM(Button, btnOK, SetLabel(t_("&OK")).LeftPosZ(84, 180).TopPosZ(92, 104))
END_LAYOUT
LAYOUT(modify, 512, 316)
ITEM(Button, btnNew, SetLabel(t_("&OK")).LeftPosZ(84, 180).TopPosZ(92, 104))
END_LAYOUT
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Thu Apr 25 08:28:54 CEST 2024
Total time taken to generate the page: 0.06867 seconds
|