You need to update the window after a style change, adding this:
After the SetWindowLongA call should do it
SetWindowPos( hwnd, 0, 0,0, GraphicsWidth(),GraphicsHeight(), SWP_NOMOVE | SWP_NOZORDER | SWP_FRAMECHANGED)
After the SetWindowLongA call should do it