Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
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
Show 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
...
@@ -48,7 +48,6 @@ typedef struct tagHHInfo
HH_WINTYPEW
*
pHHWinType
;
HH_WINTYPEW
*
pHHWinType
;
CHMInfo
*
pCHMInfo
;
CHMInfo
*
pCHMInfo
;
WBInfo
*
pWBInfo
;
WBInfo
*
pWBInfo
;
LPWSTR
szCmdLine
;
HWND
hwndTabCtrl
;
HWND
hwndTabCtrl
;
HWND
hwndSizeBar
;
HWND
hwndSizeBar
;
HFONT
hFont
;
HFONT
hFont
;
...
@@ -778,18 +777,6 @@ static BOOL HH_CreateViewer(HHInfo *pHHInfo)
...
@@ -778,18 +777,6 @@ static BOOL HH_CreateViewer(HHInfo *pHHInfo)
return
TRUE
;
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
)
static
void
HH_Close
(
HHInfo
*
pHHInfo
)
{
{
if
(
!
pHHInfo
)
if
(
!
pHHInfo
)
...
@@ -811,7 +798,6 @@ static void HH_Close(HHInfo *pHHInfo)
...
@@ -811,7 +798,6 @@ static void HH_Close(HHInfo *pHHInfo)
}
}
hhctrl_free
(
pHHInfo
->
pHHWinType
);
hhctrl_free
(
pHHInfo
->
pHHWinType
);
hhctrl_free
(
pHHInfo
->
szCmdLine
);
if
(
pHHInfo
->
pCHMInfo
)
if
(
pHHInfo
->
pCHMInfo
)
{
{
...
@@ -826,15 +812,21 @@ static void HH_Close(HHInfo *pHHInfo)
...
@@ -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
))
HHInfo
*
pHHInfo
=
hhctrl_alloc_zero
(
sizeof
(
HHInfo
));
return
FALSE
;
if
(
!
CHM_LoadWinTypeFromCHM
(
pHHInfo
->
pCHMInfo
,
pHHInfo
->
pHHWinType
))
pHHInfo
->
pHHWinType
=
hhctrl_alloc_zero
(
sizeof
(
HH_WINTYPEW
));
return
FALSE
;
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 */
/* FIXME: Check szCmdLine for bad arguments */
...
@@ -847,7 +839,7 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
...
@@ -847,7 +839,7 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
return
-
1
;
return
-
1
;
pHHInfo
=
HH_OpenHH
(
strdupAtoW
(
szCmdLine
));
pHHInfo
=
HH_OpenHH
(
strdupAtoW
(
szCmdLine
));
if
(
!
pHHInfo
||
!
HH_
OpenCHM
(
pHHInfo
)
||
!
HH_
CreateViewer
(
pHHInfo
))
if
(
!
pHHInfo
||
!
HH_CreateViewer
(
pHHInfo
))
{
{
OleUninitialize
();
OleUninitialize
();
return
-
1
;
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