mirror of
https://github.com/lltcggie/waifu2x-caffe.git
synced 2025-06-26 13:42:48 +00:00
参照ボタンで出るダイアログのサイズを変更できるようにした。初期サイズも変更した
This commit is contained in:
parent
a20091c9c9
commit
1d51122b38
@ -1056,14 +1056,14 @@ private:
|
|||||||
|
|
||||||
RECT rDialog;
|
RECT rDialog;
|
||||||
GetWindowRect(hParent, &rDialog);
|
GetWindowRect(hParent, &rDialog);
|
||||||
const int Width = rDialog.left = rDialog.right;
|
const int Width = rDialog.right - rDialog.left + 1;
|
||||||
const int Height = rDialog.bottom - rDialog.top;
|
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) / 2 - Width / 2);
|
||||||
DialogPosY = ((rectScreen.bottom - rectScreen.top) / 2 - Height / 2);
|
DialogPosY = ((rectScreen.bottom - rectScreen.top) / 2 - Height / 2);
|
||||||
SetWindowPos(hParent, NULL, DialogPosX, DialogPosY, 0, 0, SWP_NOSIZE | SWP_NOZORDER);
|
SetWindowPos(hParent, NULL, DialogPosX, DialogPosY, Width, Height, SWP_NOZORDER);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -2123,7 +2123,7 @@ public:
|
|||||||
tfp++;
|
tfp++;
|
||||||
|
|
||||||
ofn.lStructSize = sizeof(ofn);
|
ofn.lStructSize = sizeof(ofn);
|
||||||
ofn.hwndOwner = NULL;
|
ofn.hwndOwner = dh;
|
||||||
ofn.lpstrFile = szFile.data();
|
ofn.lpstrFile = szFile.data();
|
||||||
ofn.nMaxFile = szFile.size();
|
ofn.nMaxFile = szFile.size();
|
||||||
ofn.lpstrFilter = szFilter;
|
ofn.lpstrFilter = szFilter;
|
||||||
@ -2140,7 +2140,8 @@ public:
|
|||||||
ofn.lCustData = 0;
|
ofn.lCustData = 0;
|
||||||
ofn.lpfnHook = OFNHookProcIn;
|
ofn.lpfnHook = OFNHookProcIn;
|
||||||
ofn.lpTemplateName = 0;
|
ofn.lpTemplateName = 0;
|
||||||
ofn.Flags = OFN_HIDEREADONLY | OFN_NOVALIDATE | OFN_PATHMUSTEXIST | OFN_READONLY | OFN_EXPLORER | OFN_ENABLEHOOK | OFN_FILEMUSTEXIST | OFN_ALLOWMULTISELECT;
|
//ofn.Flags = OFN_HIDEREADONLY | OFN_NOVALIDATE | OFN_PATHMUSTEXIST | OFN_READONLY | OFN_EXPLORER | OFN_ENABLEHOOK | OFN_FILEMUSTEXIST | OFN_ALLOWMULTISELECT;
|
||||||
|
ofn.Flags = OFN_HIDEREADONLY | OFN_NOVALIDATE | OFN_PATHMUSTEXIST | OFN_ENABLESIZING | OFN_READONLY | OFN_EXPLORER | OFN_ENABLEHOOK | OFN_FILEMUSTEXIST | OFN_ALLOWMULTISELECT;
|
||||||
if (GetOpenFileName(&ofn))
|
if (GetOpenFileName(&ofn))
|
||||||
{
|
{
|
||||||
szFile[szFile.size() - 1] = TEXT('\0');
|
szFile[szFile.size() - 1] = TEXT('\0');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user