Here I put a code.
I am sorry my english is very bad
unsigned int _WIDTH=840;
unsigned int _HEIGHT=640;
sf::View _CAMARA(sf::FloatRect(0, 0, _WIDTH, _HEIGHT));
sf::RenderWindow app(sf::VideoMode(_WIDTH,_HEIGHT,32),"Window RULZ . By xafi");
//##############################################
if(app.GetWidth()!=_WIDTH || app.GetHeight()!=_HEIGHT){
_WIDTH=app.GetWidth();
_HEIGHT=app.GetHeight();
_CAMARA.SetFromRect(sf::FloatRect(0, 0, _WIDTH, _HEIGHT));
app.SetView(_CAMARA);
}
//##############################################