Commit 0a0316ea authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

regedit: Do not pass a global available pointer to a static function.

parent cccd55a9
...@@ -60,14 +60,14 @@ static void draw_splitbar(HWND hWnd, int x) ...@@ -60,14 +60,14 @@ static void draw_splitbar(HWND hWnd, int x)
ReleaseDC(hWnd, hdc); ReleaseDC(hWnd, hdc);
} }
static void ResizeWnd(ChildWnd* pChildWnd, int cx, int cy) static void ResizeWnd(int cx, int cy)
{ {
HDWP hdwp = BeginDeferWindowPos(2); HDWP hdwp = BeginDeferWindowPos(2);
RECT rt = {0, 0, cx, cy}; RECT rt = {0, 0, cx, cy};
cx = pChildWnd->nSplitPos + SPLIT_WIDTH/2; cx = g_pChildWnd->nSplitPos + SPLIT_WIDTH/2;
DeferWindowPos(hdwp, pChildWnd->hTreeWnd, 0, rt.left, rt.top, pChildWnd->nSplitPos-SPLIT_WIDTH/2-rt.left, rt.bottom-rt.top, SWP_NOZORDER|SWP_NOACTIVATE); DeferWindowPos(hdwp, g_pChildWnd->hTreeWnd, 0, rt.left, rt.top, g_pChildWnd->nSplitPos-SPLIT_WIDTH/2-rt.left, rt.bottom-rt.top, SWP_NOZORDER|SWP_NOACTIVATE);
DeferWindowPos(hdwp, pChildWnd->hListWnd, 0, rt.left+cx , rt.top, rt.right-cx, rt.bottom-rt.top, SWP_NOZORDER|SWP_NOACTIVATE); DeferWindowPos(hdwp, g_pChildWnd->hListWnd, 0, rt.left+cx , rt.top, rt.right-cx, rt.bottom-rt.top, SWP_NOZORDER|SWP_NOACTIVATE);
EndDeferWindowPos(hdwp); EndDeferWindowPos(hdwp);
} }
...@@ -263,7 +263,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa ...@@ -263,7 +263,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
last_split = -1; last_split = -1;
GetClientRect(hWnd, &rt); GetClientRect(hWnd, &rt);
pChildWnd->nSplitPos = x; pChildWnd->nSplitPos = x;
ResizeWnd(pChildWnd, rt.right, rt.bottom); ResizeWnd(rt.right, rt.bottom);
ReleaseCapture(); ReleaseCapture();
} }
break; break;
...@@ -279,7 +279,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa ...@@ -279,7 +279,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
RECT rt; RECT rt;
draw_splitbar(hWnd, last_split); draw_splitbar(hWnd, last_split);
GetClientRect(hWnd, &rt); GetClientRect(hWnd, &rt);
ResizeWnd(pChildWnd, rt.right, rt.bottom); ResizeWnd(rt.right, rt.bottom);
last_split = -1; last_split = -1;
ReleaseCapture(); ReleaseCapture();
SetCursor(LoadCursor(0, IDC_ARROW)); SetCursor(LoadCursor(0, IDC_ARROW));
...@@ -364,7 +364,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa ...@@ -364,7 +364,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
case WM_SIZE: case WM_SIZE:
if (wParam != SIZE_MINIMIZED && pChildWnd != NULL) { if (wParam != SIZE_MINIMIZED && pChildWnd != NULL) {
ResizeWnd(pChildWnd, LOWORD(lParam), HIWORD(lParam)); ResizeWnd(LOWORD(lParam), HIWORD(lParam));
} }
/* fall through */ /* fall through */
default: def: default: def:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment