Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Small error with sfml2  (Read 2810 times)

0 Members and 1 Guest are viewing this topic.

roosterkin123

  • Newbie
  • *
  • Posts: 43
    • MSN Messenger - rogerboy@hotmail.co.uk
    • View Profile
Small error with sfml2
« on: April 14, 2011, 04:09:21 pm »
Code: [Select]
void WindowImplWin32::SetTitle(const std::string& title)
{
    SetWindowText(myHandle, title.c_str());
}


line 270 windowimplwin32.cpp

Cant compile this with unicode. Had to use mbstowcs

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Small error with sfml2
« Reply #1 on: April 14, 2011, 04:25:25 pm »
Did you configure it to use Unicode manually, or was it set automatically by CMake?
Laurent Gomila - SFML developer

roosterkin123

  • Newbie
  • *
  • Posts: 43
    • MSN Messenger - rogerboy@hotmail.co.uk
    • View Profile
Small error with sfml2
« Reply #2 on: April 14, 2011, 04:42:41 pm »
I configured visual studio to be unicode.
I dont use cmake.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Small error with sfml2
« Reply #3 on: April 14, 2011, 04:45:39 pm »
How did you create your Visual Studio solution if you don't use CMake?
Laurent Gomila - SFML developer

roosterkin123

  • Newbie
  • *
  • Posts: 43
    • MSN Messenger - rogerboy@hotmail.co.uk
    • View Profile
Small error with sfml2
« Reply #4 on: April 14, 2011, 07:17:28 pm »
I just included most of the sfml files into my project.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Small error with sfml2
« Reply #5 on: April 14, 2011, 07:34:07 pm »
Ok... I'll try to fix that.

Thanks for your feedback.
Laurent Gomila - SFML developer

trojanfoe

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Small error with sfml2
« Reply #6 on: April 15, 2011, 04:17:35 pm »
If you are using a non-UNICODE class (string) then can't this be fixed by calling a non-UNICODE Window function (SetWindowTextA()) ?

Code: [Select]
void WindowImplWin32::SetTitle(const std::string& title)
{
    SetWindowTextA(myHandle, title.c_str());
}

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Small error with sfml2
« Reply #7 on: April 15, 2011, 05:34:54 pm »
I know ;)
Laurent Gomila - SFML developer