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
976f2db5
Commit
976f2db5
authored
Feb 23, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hhctrl.ocx: Move HH_OpenCHM implementation to HH_Open.
parent
0262fb54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
21 deletions
+13
-21
help.c
dlls/hhctrl.ocx/help.c
+13
-21
No files found.
dlls/hhctrl.ocx/help.c
View file @
976f2db5
...
...
@@ -48,7 +48,6 @@ typedef struct tagHHInfo
HH_WINTYPEW
*
pHHWinType
;
CHMInfo
*
pCHMInfo
;
WBInfo
*
pWBInfo
;
LPWSTR
szCmdLine
;
HWND
hwndTabCtrl
;
HWND
hwndSizeBar
;
HFONT
hFont
;
...
...
@@ -778,18 +777,6 @@ static BOOL HH_CreateViewer(HHInfo *pHHInfo)
return
TRUE
;
}
static
HHInfo
*
HH_OpenHH
(
LPWSTR
szCmdLine
)
{
HHInfo
*
pHHInfo
=
hhctrl_alloc_zero
(
sizeof
(
HHInfo
));
pHHInfo
->
pHHWinType
=
hhctrl_alloc_zero
(
sizeof
(
HH_WINTYPEW
));
pHHInfo
->
pCHMInfo
=
hhctrl_alloc
(
sizeof
(
CHMInfo
));
pHHInfo
->
pWBInfo
=
hhctrl_alloc
(
sizeof
(
WBInfo
));
pHHInfo
->
szCmdLine
=
szCmdLine
;
return
pHHInfo
;
}
static
void
HH_Close
(
HHInfo
*
pHHInfo
)
{
if
(
!
pHHInfo
)
...
...
@@ -811,7 +798,6 @@ static void HH_Close(HHInfo *pHHInfo)
}
hhctrl_free
(
pHHInfo
->
pHHWinType
);
hhctrl_free
(
pHHInfo
->
szCmdLine
);
if
(
pHHInfo
->
pCHMInfo
)
{
...
...
@@ -826,15 +812,21 @@ static void HH_Close(HHInfo *pHHInfo)
}
}
static
BOOL
HH_OpenCHM
(
HHInfo
*
pHHInfo
)
static
HHInfo
*
HH_OpenHH
(
LPWSTR
filename
)
{
if
(
!
CHM_OpenCHM
(
pHHInfo
->
pCHMInfo
,
pHHInfo
->
szCmdLine
))
return
FALSE
;
HHInfo
*
pHHInfo
=
hhctrl_alloc_zero
(
sizeof
(
HHInfo
));
if
(
!
CHM_LoadWinTypeFromCHM
(
pHHInfo
->
pCHMInfo
,
pHHInfo
->
pHHWinType
))
return
FALSE
;
pHHInfo
->
pHHWinType
=
hhctrl_alloc_zero
(
sizeof
(
HH_WINTYPEW
));
pHHInfo
->
pCHMInfo
=
hhctrl_alloc
(
sizeof
(
CHMInfo
));
pHHInfo
->
pWBInfo
=
hhctrl_alloc
(
sizeof
(
WBInfo
));
return
TRUE
;
if
(
!
CHM_OpenCHM
(
pHHInfo
->
pCHMInfo
,
filename
)
||
!
CHM_LoadWinTypeFromCHM
(
pHHInfo
->
pCHMInfo
,
pHHInfo
->
pHHWinType
))
{
HH_Close
(
pHHInfo
);
return
NULL
;
}
return
pHHInfo
;
}
/* FIXME: Check szCmdLine for bad arguments */
...
...
@@ -847,7 +839,7 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
return
-
1
;
pHHInfo
=
HH_OpenHH
(
strdupAtoW
(
szCmdLine
));
if
(
!
pHHInfo
||
!
HH_
OpenCHM
(
pHHInfo
)
||
!
HH_
CreateViewer
(
pHHInfo
))
if
(
!
pHHInfo
||
!
HH_CreateViewer
(
pHHInfo
))
{
OleUninitialize
();
return
-
1
;
...
...
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