Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6f4977d9
Commit
6f4977d9
authored
Sep 28, 2005
by
James Hawkins
Committed by
Alexandre Julliard
Sep 28, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Store the HHInfo struct in the SizeBar hwnd.
- Set the default navigation pane width if no width provided. - Handle dragging of the SizeBar.
parent
ba096924
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
4 deletions
+45
-4
help.c
dlls/hhctrl.ocx/help.c
+45
-4
No files found.
dlls/hhctrl.ocx/help.c
View file @
6f4977d9
...
@@ -34,6 +34,8 @@
...
@@ -34,6 +34,8 @@
#include "chm.h"
#include "chm.h"
#include "webbrowser.h"
#include "webbrowser.h"
static
void
Help_OnSize
(
HWND
hWnd
);
/* Window type defaults */
/* Window type defaults */
#define WINTYPE_DEFAULT_X 280
#define WINTYPE_DEFAULT_X 280
...
@@ -122,10 +124,43 @@ static void SB_OnPaint(HWND hWnd)
...
@@ -122,10 +124,43 @@ static void SB_OnPaint(HWND hWnd)
EndPaint
(
hWnd
,
&
ps
);
EndPaint
(
hWnd
,
&
ps
);
}
}
static
void
SB_OnLButtonDown
(
HWND
hWnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
SetCapture
(
hWnd
);
}
static
void
SB_OnLButtonUp
(
HWND
hWnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
HHInfo
*
pHHInfo
=
(
HHInfo
*
)
GetWindowLongPtrW
(
hWnd
,
GWLP_USERDATA
);
POINTS
pt
=
MAKEPOINTS
(
lParam
);
/* update the window sizes */
pHHInfo
->
pHHWinType
->
iNavWidth
+=
pt
.
x
;
Help_OnSize
(
hWnd
);
ReleaseCapture
();
}
static
void
SB_OnMouseMove
(
HWND
hWnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
/* ignore WM_MOUSEMOVE if not dragging the SizeBar */
if
(
!
(
wParam
&
MK_LBUTTON
))
return
;
}
LRESULT
CALLBACK
SizeBar_WndProc
(
HWND
hWnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
LRESULT
CALLBACK
SizeBar_WndProc
(
HWND
hWnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
switch
(
message
)
switch
(
message
)
{
{
case
WM_LBUTTONDOWN
:
SB_OnLButtonDown
(
hWnd
,
wParam
,
lParam
);
break
;
case
WM_LBUTTONUP
:
SB_OnLButtonUp
(
hWnd
,
wParam
,
lParam
);
break
;
case
WM_MOUSEMOVE
:
SB_OnMouseMove
(
hWnd
,
wParam
,
lParam
);
break
;
case
WM_PAINT
:
case
WM_PAINT
:
SB_OnPaint
(
hWnd
);
SB_OnPaint
(
hWnd
);
break
;
break
;
...
@@ -186,6 +221,9 @@ static BOOL HH_AddSizeBar(HHInfo *pHHInfo)
...
@@ -186,6 +221,9 @@ static BOOL HH_AddSizeBar(HHInfo *pHHInfo)
if
(
!
hWnd
)
if
(
!
hWnd
)
return
FALSE
;
return
FALSE
;
/* store the pointer to the HH info struct */
SetWindowLongPtrW
(
hWnd
,
GWLP_USERDATA
,
(
LONG_PTR
)
pHHInfo
);
pHHInfo
->
hwndSizeBar
=
hWnd
;
pHHInfo
->
hwndSizeBar
=
hWnd
;
return
TRUE
;
return
TRUE
;
}
}
...
@@ -437,10 +475,13 @@ static void NP_GetNavigationRect(HHInfo *pHHInfo, RECT *rc)
...
@@ -437,10 +475,13 @@ static void NP_GetNavigationRect(HHInfo *pHHInfo, RECT *rc)
rc
->
top
=
rectTB
.
bottom
;
rc
->
top
=
rectTB
.
bottom
;
rc
->
bottom
=
rectWND
.
bottom
-
rectTB
.
bottom
;
rc
->
bottom
=
rectWND
.
bottom
-
rectTB
.
bottom
;
if
(
pHHInfo
->
pHHWinType
->
fsValidMembers
&
HHWIN_PARAM_NAV_WIDTH
)
if
(
!
(
pHHInfo
->
pHHWinType
->
fsValidMembers
&
HHWIN_PARAM_NAV_WIDTH
)
&&
rc
->
right
=
pHHInfo
->
pHHWinType
->
iNavWidth
;
pHHInfo
->
pHHWinType
->
iNavWidth
==
0
)
else
{
rc
->
right
=
WINTYPE_DEFAULT_NAVWIDTH
;
pHHInfo
->
pHHWinType
->
iNavWidth
=
WINTYPE_DEFAULT_NAVWIDTH
;
}
rc
->
right
=
pHHInfo
->
pHHWinType
->
iNavWidth
;
}
}
static
void
NP_CreateTab
(
HINSTANCE
hInstance
,
HWND
hwndTabCtrl
,
DWORD
dwStrID
,
DWORD
dwIndex
)
static
void
NP_CreateTab
(
HINSTANCE
hInstance
,
HWND
hwndTabCtrl
,
DWORD
dwStrID
,
DWORD
dwIndex
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment