Re: C++ Create Simple Window
Did you try to debug your code?
Anyway, it looks like you just return from the WinMain after creating (or not creating) the window...
Re: C++ Create Simple Window
Do it like this :
Code:
Code:
#include<iostream>
#include<SFML/Graphics.hpp>
using namespace std;
using namespace sf;
int main()
{
cout << "Would you like to launch diplomacy?" << endl;
char YESNO = '/0';
do
{
RenderWindow window(VideoMode(445, 445), "Diplomacy :: version 0.01 :: Created by onlineone22);
window.setFrameratelimit(60);
window.clear();
window.display();
}while (YESNO == IDYES)
return 0;
}
Re: C++ Create Simple Window
As this simple test program doesn't contain the required sfml #include statement, I doubt it will compile. Also the YESNO variable isn't changed within the loop and the while condition is an assignment rather than an equality test. :thumbd:
Re: C++ Create Simple Window
Re: C++ Create Simple Window
Re: C++ Create Simple Window
CreateWindowEx just creates a window. To make it be alive and respond to user events, keyboard or mouse, you need to implement window procedure and spin up a message loop.