mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
*CtrlCore: Fixed issue with large layout (too big for screen) and WM_GETMINMAXINFO
git-svn-id: svn://ultimatepp.org/upp/trunk@3395 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
075fa2cdf7
commit
14fcde26fd
2 changed files with 8 additions and 3 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
NAMESPACE_UPP
|
||||
|
||||
#define LLOG(x) // LOG(x)
|
||||
#define LLOG(x) // DLOG(x)
|
||||
#define LTIMING(x) // RTIMING(x)
|
||||
|
||||
bool Ctrl::Logc::IsEmpty() const {
|
||||
|
|
@ -233,6 +233,7 @@ void Ctrl::UpdateRect0()
|
|||
Rect r = GetWorkArea();
|
||||
rect = CalcRect(r, r);
|
||||
}
|
||||
LLOG("UpdateRect0 " << Name() << " to " << rect);
|
||||
LTIMING("UpdateRect0 SyncLayout");
|
||||
SyncLayout();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -440,8 +440,12 @@ LRESULT Ctrl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) {
|
|||
case WM_GETMINMAXINFO:
|
||||
{
|
||||
MINMAXINFO *mmi = (MINMAXINFO *)lParam;
|
||||
Rect minr(Point(50, 50), GetMinSize());
|
||||
Rect maxr(Point(50, 50), GetMaxSize());
|
||||
Rect frmrc = Size(200, 200);
|
||||
::AdjustWindowRect(frmrc, WS_OVERLAPPEDWINDOW, FALSE);
|
||||
Size msz = Ctrl::GetWorkArea().Deflated(-frmrc.left, -frmrc.top,
|
||||
frmrc.right - 200, frmrc.bottom - 200).GetSize();
|
||||
Rect minr(Point(50, 50), min(msz, GetMinSize()));
|
||||
Rect maxr(Point(50, 50), min(msz, GetMaxSize()));
|
||||
dword style = ::GetWindowLong(hwnd, GWL_STYLE);
|
||||
dword exstyle = ::GetWindowLong(hwnd, GWL_EXSTYLE);
|
||||
AdjustWindowRectEx(minr, style, FALSE, exstyle);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue