mirror of
https://github.com/Garhoogin/NitroPaint.git
synced 2025-06-19 14:55:33 -04:00
Remove old WM_SIZE hack
This commit is contained in:
parent
8eef307819
commit
c24f05eb34
@ -194,11 +194,6 @@ LRESULT WINAPI DefChildProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
|
|||||||
GetClientRect(hWnd, &rcClient);
|
GetClientRect(hWnd, &rcClient);
|
||||||
|
|
||||||
FRAMEDATA *frameData = (FRAMEDATA *) GetWindowLongPtr(hWnd, 0);
|
FRAMEDATA *frameData = (FRAMEDATA *) GetWindowLongPtr(hWnd, 0);
|
||||||
frameData->sizeLevel++;
|
|
||||||
if (frameData->sizeLevel == 10) { //HACK: fix bug where some resizes cause the entire nonclient to disappear
|
|
||||||
frameData->sizeLevel--;
|
|
||||||
return DefWindowProc(hWnd, msg, wParam, lParam);
|
|
||||||
}
|
|
||||||
|
|
||||||
SCROLLINFO info;
|
SCROLLINFO info;
|
||||||
info.cbSize = sizeof(info);
|
info.cbSize = sizeof(info);
|
||||||
@ -220,25 +215,18 @@ LRESULT WINAPI DefChildProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
|
|||||||
}
|
}
|
||||||
SetScrollInfo(hWnd, SB_VERT, &info, FALSE);
|
SetScrollInfo(hWnd, SB_VERT, &info, FALSE);
|
||||||
|
|
||||||
if (repaint)InvalidateRect(hWnd, NULL, TRUE);
|
if (repaint) InvalidateRect(hWnd, NULL, TRUE);
|
||||||
|
|
||||||
//RedrawWindow(hWnd, NULL, NULL, RDW_FRAME | RDW_INVALIDATE | RDW_UPDATENOW | RDW_INTERNALPAINT);
|
|
||||||
frameData->sizeLevel--;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case WM_ENTERSIZEMOVE:
|
case WM_ENTERSIZEMOVE:
|
||||||
{
|
{
|
||||||
FRAMEDATA *frameData = (FRAMEDATA *) GetWindowLongPtr(hWnd, 0);
|
//HWND hWndParent = (HWND) GetWindowLongPtr(hWnd, GWL_HWNDPARENT);
|
||||||
frameData->sizeLevel = 0;
|
|
||||||
HWND hWndParent = (HWND) GetWindowLongPtr(hWnd, GWL_HWNDPARENT);
|
|
||||||
//SetWindowLong(hWndParent, GWL_EXSTYLE, GetWindowLong(hWndParent, GWL_EXSTYLE) | WS_EX_COMPOSITED);
|
//SetWindowLong(hWndParent, GWL_EXSTYLE, GetWindowLong(hWndParent, GWL_EXSTYLE) | WS_EX_COMPOSITED);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case WM_EXITSIZEMOVE:
|
case WM_EXITSIZEMOVE:
|
||||||
{
|
{
|
||||||
FRAMEDATA *frameData = (FRAMEDATA *) GetWindowLongPtr(hWnd, 0);
|
//HWND hWndParent = (HWND) GetWindowLong(hWnd, GWL_HWNDPARENT);
|
||||||
frameData->sizeLevel = 0;
|
|
||||||
HWND hWndParent = (HWND) GetWindowLong(hWnd, GWL_HWNDPARENT);
|
|
||||||
//SetWindowLong(hWndParent, GWL_EXSTYLE, GetWindowLong(hWndParent, GWL_EXSTYLE) & ~WS_EX_COMPOSITED);
|
//SetWindowLong(hWndParent, GWL_EXSTYLE, GetWindowLong(hWndParent, GWL_EXSTYLE) & ~WS_EX_COMPOSITED);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
int contentWidth;
|
int contentWidth;
|
||||||
int contentHeight;
|
int contentHeight;
|
||||||
int sizeLevel;
|
|
||||||
} FRAMEDATA;
|
} FRAMEDATA;
|
||||||
|
|
||||||
BOOL __stdcall SetFontProc(HWND hWnd, LPARAM lParam);
|
BOOL __stdcall SetFontProc(HWND hWnd, LPARAM lParam);
|
||||||
|
Loading…
Reference in New Issue
Block a user