Hi, I am writing an OpenGL based application in which I need to change the styles of the window when it goes from full screen to windowed mode. The problem is that when I change the style, the window does not accept any type of move or resize input from the user. When I hover my mouse over the border, the cursor should change to a resize cursor, rather it doesn't and just passes the input of a click into my Game. The two styles I have are shown in the code below:

Code:
	if (windowMode)
	{
		// Create a bordered window
		SetWindowLong(windowHwnd, GWL_STYLE, GetWindowLong(windowHwnd, GWL_STYLE) | WS_OVERLAPPEDWINDOW);

		// Refresh it by repainting
		winWidth -= 100;
		winHeight -= 100;
		SetWindowPos(windowHwnd, 0, 50, 50, winWidth, winHeight, SWP_SHOWWINDOW);

	}else{

		// New Values for the Window size
		SystemParametersInfo(SPI_GETWORKAREA, 0, &size, 0);
		winWidth = size.right;
		winHeight = size.bottom;

		// Restore it back to Users area size, without borders
		SetWindowLong(windowHwnd, GWL_STYLE, WS_POPUP | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU);
		SetWindowPos(windowHwnd, 0, 0, 0, winWidth, winHeight, SWP_SHOWWINDOW);
	}
The top part of the If statement changes the window into a regular Window with a border and title bar, and the bottom portion makes the window borderless. So basically once I turn the window's borders on, doesn't matter how many times I click on the title bar or any of the buttons (close, minimize, maximize), they do not work and just pass the clicks into my game, as if the window was still borderless.