SFML community forums

Help => Window => Topic started by: roosterkin123 on April 14, 2011, 04:09:21 pm

Title: Small error with sfml2
Post by: roosterkin123 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
Title: Small error with sfml2
Post by: Laurent on April 14, 2011, 04:25:25 pm
Did you configure it to use Unicode manually, or was it set automatically by CMake?
Title: Small error with sfml2
Post by: roosterkin123 on April 14, 2011, 04:42:41 pm
I configured visual studio to be unicode.
I dont use cmake.
Title: Small error with sfml2
Post by: Laurent on April 14, 2011, 04:45:39 pm
How did you create your Visual Studio solution if you don't use CMake?
Title: Small error with sfml2
Post by: roosterkin123 on April 14, 2011, 07:17:28 pm
I just included most of the sfml files into my project.
Title: Small error with sfml2
Post by: Laurent on April 14, 2011, 07:34:07 pm
Ok... I'll try to fix that.

Thanks for your feedback.
Title: Small error with sfml2
Post by: trojanfoe 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());
}
Title: Small error with sfml2
Post by: Laurent on April 15, 2011, 05:34:54 pm
I know ;)