Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <windows.h>
- #include <SFML/Graphics.hpp>
- int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
- {
- sf::RenderWindow window(sf::VideoMode(400, 300), "Test");
- while(window.IsOpened())
- {
- // fix begin
- MSG msg;
- while(PeekMessage(&msg, NULL, 0xc042, 0xc042, PM_REMOVE))
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- // fix end
- sf::Event event;
- while(window.PollEvent(event))
- {
- if(event.Type == sf::Event::Closed)
- window.Close();
- }
- window.Clear(sf::Color::Black);
- window.Display();
- Sleep(200);
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment