regedit: Enable WM_RBUTTONDOWN to set the splitbar.
This commit is contained in:
parent
a55b005fe4
commit
10d825aaa3
|
@ -30,8 +30,9 @@
|
||||||
#include "wine/unicode.h"
|
#include "wine/unicode.h"
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(regedit);
|
WINE_DEFAULT_DEBUG_CHANNEL(regedit);
|
||||||
|
|
||||||
ChildWnd* g_pChildWnd;
|
ChildWnd* g_pChildWnd;
|
||||||
|
static int last_split;
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Local module support methods
|
* Local module support methods
|
||||||
|
@ -161,6 +162,24 @@ static void OnTreeSelectionChanged(HWND hwndTV, HWND hwndLV, HTREEITEM hItem, BO
|
||||||
UpdateStatusBar();
|
UpdateStatusBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
* finish_splitbar [internal]
|
||||||
|
*
|
||||||
|
* make the splitbar invisible and resize the windows
|
||||||
|
* (helper for ChildWndProc)
|
||||||
|
*/
|
||||||
|
static void finish_splitbar(HWND hWnd, int x)
|
||||||
|
{
|
||||||
|
RECT rt;
|
||||||
|
|
||||||
|
draw_splitbar(hWnd, last_split);
|
||||||
|
last_split = -1;
|
||||||
|
GetClientRect(hWnd, &rt);
|
||||||
|
g_pChildWnd->nSplitPos = x;
|
||||||
|
ResizeWnd(rt.right, rt.bottom);
|
||||||
|
ReleaseCapture();
|
||||||
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: _CmdWndProc(HWND, unsigned, WORD, LONG)
|
* FUNCTION: _CmdWndProc(HWND, unsigned, WORD, LONG)
|
||||||
|
@ -203,8 +222,6 @@ static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
*/
|
*/
|
||||||
LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
static int last_split;
|
|
||||||
|
|
||||||
switch (message) {
|
switch (message) {
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
g_pChildWnd = HeapAlloc(GetProcessHeap(), 0, sizeof(ChildWnd));
|
g_pChildWnd = HeapAlloc(GetProcessHeap(), 0, sizeof(ChildWnd));
|
||||||
|
@ -253,16 +270,11 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* WM_RBUTTONDOWN sets the splitbar the same way as WM_LBUTTONUP */
|
||||||
case WM_LBUTTONUP:
|
case WM_LBUTTONUP:
|
||||||
|
case WM_RBUTTONDOWN:
|
||||||
if (GetCapture() == hWnd) {
|
if (GetCapture() == hWnd) {
|
||||||
RECT rt;
|
finish_splitbar(hWnd, LOWORD(lParam));
|
||||||
int x = LOWORD(lParam);
|
|
||||||
draw_splitbar(hWnd, last_split);
|
|
||||||
last_split = -1;
|
|
||||||
GetClientRect(hWnd, &rt);
|
|
||||||
g_pChildWnd->nSplitPos = x;
|
|
||||||
ResizeWnd(rt.right, rt.bottom);
|
|
||||||
ReleaseCapture();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue