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
c6774f75
Commit
c6774f75
authored
Feb 28, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 28, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hhctrl.ocx: Resize tab control in Child's WM_SIZE handler.
parent
736ef403
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
14 deletions
+29
-14
help.c
dlls/hhctrl.ocx/help.c
+29
-14
No files found.
dlls/hhctrl.ocx/help.c
View file @
c6774f75
...
...
@@ -40,6 +40,9 @@ static LRESULT Help_OnSize(HWND hWnd);
#define WINTYPE_DEFAULT_HEIGHT 640
#define WINTYPE_DEFAULT_NAVWIDTH 250
#define TAB_TOP_PADDING 8
#define TAB_RIGHT_PADDING 4
static
const
WCHAR
szEmpty
[]
=
{
0
};
/* Loads a string from the resource file */
...
...
@@ -250,7 +253,7 @@ static const WCHAR szChildClass[] = {
'H'
,
'H'
,
' '
,
'C'
,
'h'
,
'i'
,
'l'
,
'd'
,
0
};
static
void
Child_OnPaint
(
HWND
hWnd
)
static
LRESULT
Child_OnPaint
(
HWND
hWnd
)
{
PAINTSTRUCT
ps
;
HDC
hdc
;
...
...
@@ -278,17 +281,35 @@ static void Child_OnPaint(HWND hWnd)
}
EndPaint
(
hWnd
,
&
ps
);
return
0
;
}
static
LRESULT
Child_OnSize
(
HWND
hwnd
)
{
HHInfo
*
info
=
(
HHInfo
*
)
GetWindowLongPtrW
(
hwnd
,
GWLP_USERDATA
);
RECT
rect
;
if
(
!
info
||
hwnd
!=
info
->
WinType
.
hwndNavigation
)
return
0
;
GetClientRect
(
hwnd
,
&
rect
);
SetWindowPos
(
info
->
hwndTabCtrl
,
HWND_TOP
,
0
,
0
,
rect
.
right
-
TAB_RIGHT_PADDING
,
rect
.
bottom
-
TAB_TOP_PADDING
,
SWP_NOMOVE
);
return
0
;
}
static
LRESULT
CALLBACK
Child_WndProc
(
HWND
hWnd
,
UINT
message
,
WPARAM
wParam
,
LPARAM
lParam
)
{
switch
(
message
)
{
case
WM_PAINT
:
Child_OnPaint
(
hWnd
);
break
;
default:
return
DefWindowProcW
(
hWnd
,
message
,
wParam
,
lParam
);
case
WM_PAINT
:
return
Child_OnPaint
(
hWnd
);
case
WM_SIZE
:
return
Child_OnSize
(
hWnd
);
default:
return
DefWindowProcW
(
hWnd
,
message
,
wParam
,
lParam
);
}
return
0
;
...
...
@@ -470,9 +491,6 @@ static BOOL HH_AddToolbar(HHInfo *pHHInfo)
/* Navigation Pane */
#define TAB_TOP_PADDING 8
#define TAB_RIGHT_PADDING 4
static
void
NP_GetNavigationRect
(
HHInfo
*
pHHInfo
,
RECT
*
rc
)
{
HWND
hwndParent
=
pHHInfo
->
WinType
.
hwndHelp
;
...
...
@@ -524,6 +542,8 @@ static BOOL HH_AddNavigationPane(HHInfo *info)
if
(
!
hWnd
)
return
FALSE
;
SetWindowLongPtrW
(
hWnd
,
GWLP_USERDATA
,
(
LONG_PTR
)
info
);
hwndTabCtrl
=
CreateWindowExW
(
dwExStyles
,
WC_TABCONTROLW
,
szEmpty
,
dwStyles
,
0
,
TAB_TOP_PADDING
,
rc
.
right
-
TAB_RIGHT_PADDING
,
...
...
@@ -612,11 +632,6 @@ static LRESULT Help_OnSize(HWND hWnd)
SetWindowPos
(
pHHInfo
->
WinType
.
hwndNavigation
,
HWND_TOP
,
0
,
0
,
rc
.
right
,
rc
.
bottom
,
SWP_NOMOVE
);
GetClientRect
(
pHHInfo
->
WinType
.
hwndNavigation
,
&
rc
);
SetWindowPos
(
pHHInfo
->
hwndTabCtrl
,
HWND_TOP
,
0
,
0
,
rc
.
right
-
TAB_RIGHT_PADDING
,
rc
.
bottom
-
TAB_TOP_PADDING
,
SWP_NOMOVE
);
SB_GetSizeBarRect
(
pHHInfo
,
&
rc
);
SetWindowPos
(
pHHInfo
->
hwndSizeBar
,
HWND_TOP
,
rc
.
left
,
rc
.
top
,
rc
.
right
,
rc
.
bottom
,
SWP_SHOWWINDOW
);
...
...
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