Created
April 30, 2016 14:45
-
-
Save dorgonman/13d2695ed9e4494f24c6c7e54a15c8be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if PLATFORM_WINDOWS | |
#include "windows/WindowsWindow.h" | |
#include "SharedPointer.h" | |
#endif //PLATFORM_WINDOWS | |
#include "AllowWindowsPlatformTypes.h" | |
void AHopePlayerController::AdjustWindow() { | |
#if PLATFORM_WINDOWS | |
TSharedPtr<FGenericWindow> NativeWindow = GEngine->GameViewport->GetWindow()->GetNativeWindow(); | |
auto Window = static_cast<FWindowsWindow*>(NativeWindow.Get()); | |
//https://msdn.microsoft.com/en-us/library/windows/desktop/ms644898%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396 | |
//https://msdn.microsoft.com/en-us/library/windows/desktop/ff700543(v=vs.85).aspx | |
//DWORD WindowStyle = WS_DLGFRAME; | |
DWORD WindowExStyle = WS_EX_APPWINDOW; | |
DWORD WindowStyle = WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | |
| WS_VISIBLE; | |
//| WS_THICKFRAME | WS_POPUP | WS_DLGFRAME | WS_VISIBLE; | |
auto hWnd = Window->GetHWnd(); | |
SetWindowLongPtr(hWnd, GWL_EXSTYLE, (LONG_PTR)WindowExStyle); | |
SetWindowLongPtr(hWnd, GWL_STYLE, (LONG_PTR)WindowStyle); | |
#endif // #if PLATFORM_WINDOWS | |
} | |
#include "HideWindowsPlatformTypes.h" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment