From 86da1b602514ee437098fe7bd026c865beae3aee Mon Sep 17 00:00:00 2001 From: lltcggie Date: Wed, 30 Mar 2016 12:13:47 +0900 Subject: [PATCH] =?UTF-8?q?GUI=E3=81=A7=E5=8F=82=E7=85=A7=E3=83=9C?= =?UTF-8?q?=E3=82=BF=E3=83=B3=E3=81=A7=E5=87=BA=E3=82=8B=E3=83=80=E3=82=A4?= =?UTF-8?q?=E3=82=A2=E3=83=AD=E3=82=B0=E5=91=A8=E3=82=8A=E3=82=92=E5=A4=89?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- waifu2x-caffe-gui/Source.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/waifu2x-caffe-gui/Source.cpp b/waifu2x-caffe-gui/Source.cpp index b64f887..3fc6a1d 100644 --- a/waifu2x-caffe-gui/Source.cpp +++ b/waifu2x-caffe-gui/Source.cpp @@ -1050,20 +1050,20 @@ private: HWND hParent = GetParent(hdlg); HWND hwndScreen; - RECT rectScreen; + RECT rectScreen = { 0 }; hwndScreen = GetDesktopWindow(); GetWindowRect(hwndScreen, &rectScreen); - RECT rDialog; + RECT rDialog = { 0 }; GetWindowRect(hParent, &rDialog); const int Width = rDialog.right - rDialog.left + 1; const int Height = rDialog.bottom - rDialog.top + 1; int DialogPosX; int DialogPosY; - DialogPosX = ((rectScreen.right - rectScreen.left) / 2 - Width / 2); - DialogPosY = ((rectScreen.bottom - rectScreen.top) / 2 - Height / 2); - SetWindowPos(hParent, NULL, DialogPosX, DialogPosY, Width, Height, SWP_NOZORDER); + DialogPosX = ((rectScreen.right - rectScreen.left + 1) / 2 - Width / 2); + DialogPosY = ((rectScreen.bottom - rectScreen.top + 1) / 2 - Height / 2); + SetWindowPos(hParent, NULL, DialogPosX, DialogPosY, Width, Height, SWP_NOSIZE | SWP_NOZORDER); } break; @@ -2074,7 +2074,7 @@ public: { SyncMember(false); - OPENFILENAME ofn; + OPENFILENAME ofn = { 0 }; TCHAR szPath[AR_PATH_MAX] = TEXT(""); static std::vector szFile(AR_PATH_MAX * 100);