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
e0b952b4
Commit
e0b952b4
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: Move doWinMain to hhctrl.c.
parent
1a2456cc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
28 deletions
+35
-28
help.c
dlls/hhctrl.ocx/help.c
+3
-28
hhctrl.c
dlls/hhctrl.ocx/hhctrl.c
+28
-0
hhctrl.h
dlls/hhctrl.ocx/hhctrl.h
+4
-0
No files found.
dlls/hhctrl.ocx/help.c
View file @
e0b952b4
...
...
@@ -57,7 +57,7 @@ static LPWSTR HH_LoadString(DWORD dwID)
return
string
;
}
static
BOOL
NavigateToChm
(
HHInfo
*
info
,
LPCWSTR
file
,
LPCWSTR
index
)
BOOL
NavigateToChm
(
HHInfo
*
info
,
LPCWSTR
file
,
LPCWSTR
index
)
{
WCHAR
buf
[
INTERNET_MAX_URL_LENGTH
];
WCHAR
full_path
[
MAX_PATH
];
...
...
@@ -764,7 +764,7 @@ static BOOL CreateViewer(HHInfo *pHHInfo)
return
TRUE
;
}
static
void
ReleaseHelpViewer
(
HHInfo
*
info
)
void
ReleaseHelpViewer
(
HHInfo
*
info
)
{
if
(
!
info
)
return
;
...
...
@@ -790,7 +790,7 @@ static void ReleaseHelpViewer(HHInfo *info)
OleUninitialize
();
}
static
HHInfo
*
CreateHelpViewer
(
LPCWSTR
filename
)
HHInfo
*
CreateHelpViewer
(
LPCWSTR
filename
)
{
HHInfo
*
info
=
hhctrl_alloc_zero
(
sizeof
(
HHInfo
));
...
...
@@ -814,28 +814,3 @@ static HHInfo *CreateHelpViewer(LPCWSTR filename)
return
info
;
}
/* FIXME: Check szCmdLine for bad arguments */
int
WINAPI
doWinMain
(
HINSTANCE
hInstance
,
LPSTR
szCmdLine
)
{
MSG
msg
;
HHInfo
*
info
;
LPWSTR
filename
=
strdupAtoW
(
szCmdLine
);
info
=
CreateHelpViewer
(
filename
);
hhctrl_free
(
filename
);
if
(
!
info
)
return
-
1
;
NavigateToChm
(
info
,
info
->
pCHMInfo
->
szFile
,
info
->
WinType
.
pszFile
);
while
(
GetMessageW
(
&
msg
,
0
,
0
,
0
))
{
TranslateMessage
(
&
msg
);
DispatchMessageW
(
&
msg
);
}
ReleaseHelpViewer
(
info
);
return
0
;
}
dlls/hhctrl.ocx/hhctrl.c
View file @
e0b952b4
...
...
@@ -135,3 +135,31 @@ HWND WINAPI HtmlHelpA(HWND caller, LPCSTR filename, UINT command, DWORD data)
hhctrl_free
(
wfile
);
return
result
;
}
/******************************************************************
* doWinMain (hhctrl.ocx.13)
*/
int
WINAPI
doWinMain
(
HINSTANCE
hInstance
,
LPSTR
szCmdLine
)
{
MSG
msg
;
HHInfo
*
info
;
LPWSTR
filename
=
strdupAtoW
(
szCmdLine
);
/* FIXME: Check szCmdLine for bad arguments */
info
=
CreateHelpViewer
(
filename
);
hhctrl_free
(
filename
);
if
(
!
info
)
return
-
1
;
NavigateToChm
(
info
,
info
->
pCHMInfo
->
szFile
,
info
->
WinType
.
pszFile
);
while
(
GetMessageW
(
&
msg
,
0
,
0
,
0
))
{
TranslateMessage
(
&
msg
);
DispatchMessageW
(
&
msg
);
}
ReleaseHelpViewer
(
info
);
return
0
;
}
dlls/hhctrl.ocx/hhctrl.h
View file @
e0b952b4
...
...
@@ -80,6 +80,10 @@ CHMInfo *OpenCHM(LPCWSTR szFile);
BOOL
LoadWinTypeFromCHM
(
CHMInfo
*
pCHMInfo
,
HH_WINTYPEW
*
pHHWinType
);
CHMInfo
*
CloseCHM
(
CHMInfo
*
pCHMInfo
);
HHInfo
*
CreateHelpViewer
(
LPCWSTR
);
void
ReleaseHelpViewer
(
HHInfo
*
);
BOOL
NavigateToChm
(
HHInfo
*
,
LPCWSTR
,
LPCWSTR
);
/* memory allocation functions */
static
inline
void
*
hhctrl_alloc
(
size_t
len
)
...
...
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