Align only works after Window resized

Sapd

25-12-2011 17:43:58

Hello,

I'm trying to make a button which is aligned at center and has an offset of 100,100:

MyGUI::ButtonPtr button = mGUI->createWidget<MyGUI::Button>("Button", 100, 100, 300, 26, MyGUI::Align::Center, "Main");
button->setCaption("test");
button->eventMouseButtonClick += MyGUI::newDelegate(this, &MainMenu::buttonclick);

But when i start my application, the Textbox is aligned at left top corner, therefore default.
When i now resize my Window, then the TextBox is in the Center of the Screen, but does not have an offset any more.
Does someone know how to fix it?

And i have a secound Problem, i get linker Warnings, i compiled mygui statically:

1>menuframelistener.obj : warning LNK4217: locally defined symbol ?initialise@Gui@MyGUI@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z (public: void __thiscall MyGUI::Gui::initialise(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported in function "public: __thiscall MainMenu::MainMenu(class Ogre::RenderWindow *,class Ogre::Camera *,class Ogre::Viewport *)" (??0MainMenu@@QAE@PAVRenderWindow@Ogre@@PAVCamera@2@PAVViewport@2@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ??0Gui@MyGUI@@QAE@XZ (public: __thiscall MyGUI::Gui::Gui(void)) imported in function "public: __thiscall MainMenu::MainMenu(class Ogre::RenderWindow *,class Ogre::Camera *,class Ogre::Viewport *)" (??0MainMenu@@QAE@PAVRenderWindow@Ogre@@PAVCamera@2@PAVViewport@2@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ??0LogManager@MyGUI@@QAE@XZ (public: __thiscall MyGUI::LogManager::LogManager(void)) imported in function "public: __thiscall MyGUI::OgrePlatform::OgrePlatform(void)" (??0OgrePlatform@MyGUI@@QAE@XZ)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ?createDefaultSource@LogManager@MyGUI@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z (public: void __thiscall MyGUI::LogManager::createDefaultSource(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported in function "public: void __thiscall MyGUI::OgrePlatform::initialise(class Ogre::RenderWindow *,class Ogre::SceneManager *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?initialise@OgrePlatform@MyGUI@@QAEXPAVRenderWindow@Ogre@@PAVSceneManager@4@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ?getInstance@LogManager@MyGUI@@SAAAV12@XZ (public: static class MyGUI::LogManager & __cdecl MyGUI::LogManager::getInstance(void)) imported in function "public: void __thiscall MyGUI::OgrePlatform::initialise(class Ogre::RenderWindow *,class Ogre::SceneManager *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?initialise@OgrePlatform@MyGUI@@QAEXPAVRenderWindow@Ogre@@PAVSceneManager@4@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ??1Gui@MyGUI@@UAE@XZ (public: virtual __thiscall MyGUI::Gui::~Gui(void)) imported in function "public: virtual void * __thiscall MyGUI::Gui::`scalar deleting destructor'(unsigned int)" (??_GGui@MyGUI@@UAEPAXI@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ??1UString@MyGUI@@QAE@XZ (public: __thiscall MyGUI::UString::~UString(void)) imported in function "public: void __thiscall MainMenu::buttonclick(class MyGUI::Widget *)" (?buttonclick@MainMenu@@QAEXPAVWidget@MyGUI@@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ?getOnlyText@EditBox@MyGUI@@QAE?AVUString@2@XZ (public: class MyGUI::UString __thiscall MyGUI::EditBox::getOnlyText(void)) imported in function "public: void __thiscall MainMenu::buttonclick(class MyGUI::Widget *)" (?buttonclick@MainMenu@@QAEXPAVWidget@MyGUI@@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ?asUTF8@UString@MyGUI@@QBEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ (public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __thiscall MyGUI::UString::asUTF8(void)const ) imported in function "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl MyGUI::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > &,class MyGUI::UString const &)" (??6MyGUI@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV12@ABVUString@0@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ??0UString@MyGUI@@QAE@PBD@Z (public: __thiscall MyGUI::UString::UString(char const *)) imported in function "private: void __thiscall MainMenu::setupGUI(void)" (?setupGUI@MainMenu@@AAEXXZ)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ??0Align@MyGUI@@QAE@W4Enum@01@@Z (public: __thiscall MyGUI::Align::Align(enum MyGUI::Align::Enum)) imported in function "private: void __thiscall MainMenu::setupGUI(void)" (?setupGUI@MainMenu@@AAEXXZ)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ?injectKeyPress@InputManager@MyGUI@@QAE_NUKeyCode@2@I@Z (public: bool __thiscall MyGUI::InputManager::injectKeyPress(struct MyGUI::KeyCode,unsigned int)) imported in function "public: virtual void __thiscall MainMenu::keyPressed(class OIS::KeyEvent const &)" (?keyPressed@MainMenu@@UAEXABVKeyEvent@OIS@@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ?getInstance@?$Singleton@VInputManager@MyGUI@@@MyGUI@@SAAAVInputManager@2@XZ (public: static class MyGUI::InputManager & __cdecl MyGUI::Singleton<class MyGUI::InputManager>::getInstance(void)) imported in function "public: virtual void __thiscall MainMenu::keyPressed(class OIS::KeyEvent const &)" (?keyPressed@MainMenu@@UAEXABVKeyEvent@OIS@@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ??0KeyCode@MyGUI@@QAE@W4Enum@01@@Z (public: __thiscall MyGUI::KeyCode::KeyCode(enum MyGUI::KeyCode::Enum)) imported in function "public: virtual void __thiscall MainMenu::keyPressed(class OIS::KeyEvent const &)" (?keyPressed@MainMenu@@UAEXABVKeyEvent@OIS@@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ?injectKeyRelease@InputManager@MyGUI@@QAE_NUKeyCode@2@@Z (public: bool __thiscall MyGUI::InputManager::injectKeyRelease(struct MyGUI::KeyCode)) imported in function "public: virtual void __thiscall MainMenu::keyReleased(class OIS::KeyEvent const &)" (?keyReleased@MainMenu@@UAEXABVKeyEvent@OIS@@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ?injectMouseMove@InputManager@MyGUI@@QAE_NHHH@Z (public: bool __thiscall MyGUI::InputManager::injectMouseMove(int,int,int)) imported in function "public: virtual void __thiscall MainMenu::mouseMoved(class OIS::MouseEvent const &)" (?mouseMoved@MainMenu@@UAEXABVMouseEvent@OIS@@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ?injectMousePress@InputManager@MyGUI@@QAE_NHHUMouseButton@2@@Z (public: bool __thiscall MyGUI::InputManager::injectMousePress(int,int,struct MyGUI::MouseButton)) imported in function "public: virtual void __thiscall MainMenu::mousePressed(class OIS::MouseEvent const &,enum OIS::MouseButtonID)" (?mousePressed@MainMenu@@UAEXABVMouseEvent@OIS@@W4MouseButtonID@3@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ??0MouseButton@MyGUI@@QAE@W4Enum@01@@Z (public: __thiscall MyGUI::MouseButton::MouseButton(enum MyGUI::MouseButton::Enum)) imported in function "public: virtual void __thiscall MainMenu::mousePressed(class OIS::MouseEvent const &,enum OIS::MouseButtonID)" (?mousePressed@MainMenu@@UAEXABVMouseEvent@OIS@@W4MouseButtonID@3@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ?injectMouseRelease@InputManager@MyGUI@@QAE_NHHUMouseButton@2@@Z (public: bool __thiscall MyGUI::InputManager::injectMouseRelease(int,int,struct MyGUI::MouseButton)) imported in function "public: virtual void __thiscall MainMenu::mouseReleased(class OIS::MouseEvent const &,enum OIS::MouseButtonID)" (?mouseReleased@MainMenu@@UAEXABVMouseEvent@OIS@@W4MouseButtonID@3@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ??0Exception@MyGUI@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0PBDJ@Z (public: __thiscall MyGUI::Exception::Exception(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *,long)) imported in function "public: class MyGUI::delegates::CMultiDelegate1<class MyGUI::Widget *> & __thiscall MyGUI::delegates::CMultiDelegate1<class MyGUI::Widget *>::operator+=(class MyGUI::delegates::IDelegate1<class MyGUI::Widget *> *)" (??Y?$CMultiDelegate1@PAVWidget@MyGUI@@@delegates@MyGUI@@QAEAAV012@PAV?$IDelegate1@PAVWidget@MyGUI@@@12@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ??1LogStream@MyGUI@@QAE@XZ (public: __thiscall MyGUI::LogStream::~LogStream(void)) imported in function "public: class MyGUI::delegates::CMultiDelegate1<class MyGUI::Widget *> & __thiscall MyGUI::delegates::CMultiDelegate1<class MyGUI::Widget *>::operator+=(class MyGUI::delegates::IDelegate1<class MyGUI::Widget *> *)" (??Y?$CMultiDelegate1@PAVWidget@MyGUI@@@delegates@MyGUI@@QAEAAV012@PAV?$IDelegate1@PAVWidget@MyGUI@@@12@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ?log@LogManager@MyGUI@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ULogLevel@2@0PBDH@Z (public: void __thiscall MyGUI::LogManager::log(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct MyGUI::LogLevel,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *,int)) imported in function "public: class MyGUI::delegates::CMultiDelegate1<class MyGUI::Widget *> & __thiscall MyGUI::delegates::CMultiDelegate1<class MyGUI::Widget *>::operator+=(class MyGUI::delegates::IDelegate1<class MyGUI::Widget *> *)" (??Y?$CMultiDelegate1@PAVWidget@MyGUI@@@delegates@MyGUI@@QAEAAV012@PAV?$IDelegate1@PAVWidget@MyGUI@@@12@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ??0LogLevel@MyGUI@@QAE@W4Enum@01@@Z (public: __thiscall MyGUI::LogLevel::LogLevel(enum MyGUI::LogLevel::Enum)) imported in function "public: class MyGUI::delegates::CMultiDelegate1<class MyGUI::Widget *> & __thiscall MyGUI::delegates::CMultiDelegate1<class MyGUI::Widget *>::operator+=(class MyGUI::delegates::IDelegate1<class MyGUI::Widget *> *)" (??Y?$CMultiDelegate1@PAVWidget@MyGUI@@@delegates@MyGUI@@QAEAAV012@PAV?$IDelegate1@PAVWidget@MyGUI@@@12@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ??6LogStream@MyGUI@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABUEnd@01@@Z (public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall MyGUI::LogStream::operator<<(struct MyGUI::LogStream::End const &)) imported in function "public: class MyGUI::delegates::CMultiDelegate1<class MyGUI::Widget *> & __thiscall MyGUI::delegates::CMultiDelegate1<class MyGUI::Widget *>::operator+=(class MyGUI::delegates::IDelegate1<class MyGUI::Widget *> *)" (??Y?$CMultiDelegate1@PAVWidget@MyGUI@@@delegates@MyGUI@@QAEAAV012@PAV?$IDelegate1@PAVWidget@MyGUI@@@12@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ??0LogStream@MyGUI@@QAE@XZ (public: __thiscall MyGUI::LogStream::LogStream(void)) imported in function "public: class MyGUI::delegates::CMultiDelegate1<class MyGUI::Widget *> & __thiscall MyGUI::delegates::CMultiDelegate1<class MyGUI::Widget *>::operator+=(class MyGUI::delegates::IDelegate1<class MyGUI::Widget *> *)" (??Y?$CMultiDelegate1@PAVWidget@MyGUI@@@delegates@MyGUI@@QAEAAV012@PAV?$IDelegate1@PAVWidget@MyGUI@@@12@@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ?createWidgetT@Gui@MyGUI@@QAEPAVWidget@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0ABU?$TCoord@H@types@2@UAlign@2@00@Z (public: class MyGUI::Widget * __thiscall MyGUI::Gui::createWidgetT(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct MyGUI::types::TCoord<int> const &,struct MyGUI::Align,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)) imported in function "public: class MyGUI::Button * __thiscall MyGUI::Gui::createWidget<class MyGUI::Button>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,int,int,int,struct MyGUI::Align,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$createWidget@VButton@MyGUI@@@Gui@MyGUI@@QAEPAVButton@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HHHHUAlign@1@00@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ?getClassTypeName@Button@MyGUI@@SAABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ (public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __cdecl MyGUI::Button::getClassTypeName(void)) imported in function "public: class MyGUI::Button * __thiscall MyGUI::Gui::createWidget<class MyGUI::Button>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,int,int,int,struct MyGUI::Align,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$createWidget@VButton@MyGUI@@@Gui@MyGUI@@QAEPAVButton@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HHHHUAlign@1@00@Z)
1>menuframelistener.obj : warning LNK4217: locally defined symbol ?getClassTypeName@EditBox@MyGUI@@SAABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ (public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __cdecl MyGUI::EditBox::getClassTypeName(void)) imported in function "public: class MyGUI::EditBox * __thiscall MyGUI::Gui::createWidget<class MyGUI::EditBox>(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int,int,int,int,struct MyGUI::Align,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??$createWidget@VEditBox@MyGUI@@@Gui@MyGUI@@QAEPAVEditBox@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@HHHHUAlign@1@00@Z)

How to fix them?

And a third Problem ;):
When i type for example ä or â in Textbox, i only get a "empty" character, just like i would press space. Whats wrong here?