Hey,
I have a problem that makes me crazy, I'm testing a little bit arround with SFML and the Win API,
all works perfect, only one thing not. Setting the position of the Window after Creating him, don't
works, and I don't understand why...
Here my code:
//...
// Here positioning works.
HWND hwnd_Window = CreateWindow(L"SFML App", L"Alarm", WS_POPUP | WS_VISIBLE,
300, 400,
300, 200, NULL, NULL, Instance, NULL);
// Main View
HWND hwnd_View = CreateWindow(L"STATIC", NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS, 0, 0, 300, 200, hwnd_Window, NULL, Instance, NULL);
//
sf::RenderWindow App(hwnd_View);
// Set Framelimit on 3 fps
App.setFramerateLimit(3);
// ...
// The Window only Resize, but the Position don't change!
::MoveWindow(hwnd_Window, 200, 200, 100, 100, true);
// Change size
App.setSize(sf::Vector2u(100, 100));
// Change View settings!
App.setView(sf::View(sf::FloatRect(0, 0, 100, 100)));
// Again, only Resizing work, not positioning
::SetWindowPos(hwnd_Window, HWND_TOPMOST, 0, 600, 100, 100, SWP_FRAMECHANGED);
I hope someone can help me, because I'm getting crazy...
Thanks in Advance!