Hi, there's a glitch when displaying a windows message with SFML. The message pops up as it should, but if you try to press 'OK' or drag the message window it doesn't work (it doesn't realize you're clicking it).
Sometimes though it does work (though rarely). If you focus back to the main application and then focus back on the message everything works.
Is there an easy way to fix this? Here's my code (it's just the basic SFML tutotial/test code with a MessageBoxA() in it.
#include <SFML/Graphics.hpp>
#include <Windows.h>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
MessageBoxA(0,"Hello","World",0);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
Thanks in advance.