Edit:
the HWND was of WM_CHILD and thus could't be focused on. (Atleast that what I understood it as)
End of Edit
Hi, I was wondering if it was possible to get SFML focus when I press on the rendering region when the RenderWindow has been created with a HWND parameter.
Screenshot to demostrate
HWND viewport = CreateWindowEx(0,windowDefinedName,"GameWindow",WS_CHILDWINDOW,viewPosition.x,viewPosition.y,800,600,hWnd,NULL,hInstance,NULL);
View.create(viewport);
What I want to do is to disable keyboard input if I do not have the "viewport" selected
if(Engine::Window.View.hasFocus())
{//inputs}
This is the registered class that the viewport is using
wc.lpszClassName = windowDefinedName;
wc.lpfnWndProc = WndProcEditorFocus;
wc.style = CS_HREDRAW | CS_VREDRAW;;
wc.cbSize = sizeof(WNDCLASSEX);
wc.hIcon = LoadIcon(NULL,IDI_WINLOGO);
wc.hIconSm = 0;
wc.hCursor = LoadCursor(NULL,IDC_ARROW);
wc.lpszMenuName = NULL;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);;
SFML 2.2
Visual C++ 12 (2013) - 32-bit
Visual Studio Express 2013 (v120)
Windows 8.1 64-bit (6.3, Build 9600)