CEGUI and Window App
Posted: Mon Mar 17, 2008 06:45
Hello all,
I'm a truely newbie. I 've just played around with Ogre and CEGUI for around 3weeks and I can follow all tutorials from CEGUI and Ogre forum.
Now I'm trying to redender the 3D model in a MFC window and I want to use CEGUI for my GUI. But I have some problems as follow:
1. When I resize the main window, CEGUI interface disappears for a while (say around 3 seconds) and then appears again. But the resolutions of window mouse and CEGUI mouse are different.
So how can I tell CEGUI that the window was resized and it should update new size?
2. My current event handling is: the default WndProc() of Window app will receive all events (mouse, key and window events) and then inject to CEGUI. I can see the mouse cursor moves and Hover effect when the mouse is over a button. But I'm so confusing how can I subcribe events from CEGUI widgets (buttons, menu) ??? The event handling scheme used in Example framework doesn't work when I integrated to my application.
In short, could you experts help me to solve:
- Window resizing: how to match CEGUI resolution with actual window resolution?
- How to handle events triggered from CDGUI widgets in my application?
Any clues or sugguestions are highly appreciated.
Thank you so much and please forgive my poor english.
TTK
I'm a truely newbie. I 've just played around with Ogre and CEGUI for around 3weeks and I can follow all tutorials from CEGUI and Ogre forum.
Now I'm trying to redender the 3D model in a MFC window and I want to use CEGUI for my GUI. But I have some problems as follow:
1. When I resize the main window, CEGUI interface disappears for a while (say around 3 seconds) and then appears again. But the resolutions of window mouse and CEGUI mouse are different.
So how can I tell CEGUI that the window was resized and it should update new size?
2. My current event handling is: the default WndProc() of Window app will receive all events (mouse, key and window events) and then inject to CEGUI. I can see the mouse cursor moves and Hover effect when the mouse is over a button. But I'm so confusing how can I subcribe events from CEGUI widgets (buttons, menu) ??? The event handling scheme used in Example framework doesn't work when I integrated to my application.
In short, could you experts help me to solve:
- Window resizing: how to match CEGUI resolution with actual window resolution?
- How to handle events triggered from CDGUI widgets in my application?
Any clues or sugguestions are highly appreciated.
Thank you so much and please forgive my poor english.
TTK