mirror of
https://github.com/lltcggie/waifu2x-caffe.git
synced 2025-06-26 13:42:48 +00:00
GUIで参照ボタンで出るダイアログ周りを変更
This commit is contained in:
parent
1d51122b38
commit
86da1b6025
@ -1050,20 +1050,20 @@ private:
|
|||||||
HWND hParent = GetParent(hdlg);
|
HWND hParent = GetParent(hdlg);
|
||||||
|
|
||||||
HWND hwndScreen;
|
HWND hwndScreen;
|
||||||
RECT rectScreen;
|
RECT rectScreen = { 0 };
|
||||||
hwndScreen = GetDesktopWindow();
|
hwndScreen = GetDesktopWindow();
|
||||||
GetWindowRect(hwndScreen, &rectScreen);
|
GetWindowRect(hwndScreen, &rectScreen);
|
||||||
|
|
||||||
RECT rDialog;
|
RECT rDialog = { 0 };
|
||||||
GetWindowRect(hParent, &rDialog);
|
GetWindowRect(hParent, &rDialog);
|
||||||
const int Width = rDialog.right - rDialog.left + 1;
|
const int Width = rDialog.right - rDialog.left + 1;
|
||||||
const int Height = rDialog.bottom - rDialog.top + 1;
|
const int Height = rDialog.bottom - rDialog.top + 1;
|
||||||
|
|
||||||
int DialogPosX;
|
int DialogPosX;
|
||||||
int DialogPosY;
|
int DialogPosY;
|
||||||
DialogPosX = ((rectScreen.right - rectScreen.left) / 2 - Width / 2);
|
DialogPosX = ((rectScreen.right - rectScreen.left + 1) / 2 - Width / 2);
|
||||||
DialogPosY = ((rectScreen.bottom - rectScreen.top) / 2 - Height / 2);
|
DialogPosY = ((rectScreen.bottom - rectScreen.top + 1) / 2 - Height / 2);
|
||||||
SetWindowPos(hParent, NULL, DialogPosX, DialogPosY, Width, Height, SWP_NOZORDER);
|
SetWindowPos(hParent, NULL, DialogPosX, DialogPosY, Width, Height, SWP_NOSIZE | SWP_NOZORDER);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -2074,7 +2074,7 @@ public:
|
|||||||
{
|
{
|
||||||
SyncMember(false);
|
SyncMember(false);
|
||||||
|
|
||||||
OPENFILENAME ofn;
|
OPENFILENAME ofn = { 0 };
|
||||||
TCHAR szPath[AR_PATH_MAX] = TEXT("");
|
TCHAR szPath[AR_PATH_MAX] = TEXT("");
|
||||||
|
|
||||||
static std::vector<TCHAR> szFile(AR_PATH_MAX * 100);
|
static std::vector<TCHAR> szFile(AR_PATH_MAX * 100);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user