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
719bfaf4
Commit
719bfaf4
authored
Feb 06, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hhctrl.ocx: Use mk as default protocol and code clean up.
parent
f9a78861
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
45 deletions
+38
-45
chm.c
dlls/hhctrl.ocx/chm.c
+0
-10
chm.h
dlls/hhctrl.ocx/chm.h
+0
-1
help.c
dlls/hhctrl.ocx/help.c
+38
-16
webbrowser.c
dlls/hhctrl.ocx/webbrowser.c
+0
-17
webbrowser.h
dlls/hhctrl.ocx/webbrowser.h
+0
-1
No files found.
dlls/hhctrl.ocx/chm.c
View file @
719bfaf4
...
...
@@ -174,13 +174,3 @@ void CHM_CloseCHM(CHMInfo *pCHMInfo)
IITStorage_Release
(
pCHMInfo
->
pITStorage
);
IStorage_Release
(
pCHMInfo
->
pStorage
);
}
/* Creates a Url of a CHM file that can be used with WB_Navigate */
void
CHM_CreateITSUrl
(
CHMInfo
*
pChmInfo
,
LPCWSTR
szIndex
,
LPWSTR
szUrl
)
{
static
const
WCHAR
formatW
[]
=
{
'i'
,
't'
,
's'
,
':'
,
'%'
,
's'
,
':'
,
':'
,
'%'
,
's'
,
0
};
wsprintfW
(
szUrl
,
formatW
,
pChmInfo
->
szFile
,
szIndex
);
}
dlls/hhctrl.ocx/chm.h
View file @
719bfaf4
...
...
@@ -33,6 +33,5 @@ typedef struct CHMInfo
BOOL
CHM_OpenCHM
(
CHMInfo
*
pCHMInfo
,
LPCWSTR
szFile
);
BOOL
CHM_LoadWinTypeFromCHM
(
CHMInfo
*
pCHMInfo
,
HH_WINTYPEW
*
pHHWinType
);
void
CHM_CloseCHM
(
CHMInfo
*
pCHMInfo
);
void
CHM_CreateITSUrl
(
CHMInfo
*
pCHMInfo
,
LPCWSTR
szIndex
,
LPWSTR
szUrl
);
#endif
dlls/hhctrl.ocx/help.c
View file @
719bfaf4
...
...
@@ -20,6 +20,8 @@
#include <stdarg.h>
#define COBJMACROS
#include "windef.h"
#include "winbase.h"
#include "wingdi.h"
...
...
@@ -28,12 +30,18 @@
#include "commctrl.h"
#include "htmlhelp.h"
#include "ole2.h"
#include "exdisp.h"
#include "wininet.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "resource.h"
#include "chm.h"
#include "webbrowser.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
htmlhelp
);
static
void
Help_OnSize
(
HWND
hWnd
);
/* Window type defaults */
...
...
@@ -87,6 +95,34 @@ static LPWSTR HH_LoadString(DWORD dwID)
return
string
;
}
static
BOOL
NavigateToChm
(
WBInfo
*
pWBInfo
,
LPCWSTR
file
,
LPCWSTR
index
)
{
WCHAR
buf
[
INTERNET_MAX_URL_LENGTH
];
WCHAR
full_path
[
MAX_PATH
];
VARIANT
url
;
static
const
WCHAR
url_format
[]
=
{
'm'
,
'k'
,
':'
,
'@'
,
'M'
,
'S'
,
'I'
,
'T'
,
'S'
,
't'
,
'o'
,
'r'
,
'e'
,
':'
,
'%'
,
's'
,
':'
,
':'
,
'/'
,
'%'
,
's'
,
0
};
if
(
!
pWBInfo
->
pWebBrowser2
)
return
FALSE
;
if
(
!
GetFullPathNameW
(
file
,
sizeof
(
full_path
),
full_path
,
NULL
))
{
WARN
(
"GetFullPathName failed: %u
\n
"
,
GetLastError
());
return
FALSE
;
}
wsprintfW
(
buf
,
url_format
,
full_path
,
index
);
V_VT
(
&
url
)
=
VT_BSTR
;
V_BSTR
(
&
url
)
=
SysAllocString
(
buf
);
IWebBrowser2_Navigate2
(
pWBInfo
->
pWebBrowser2
,
&
url
,
0
,
0
,
0
,
0
);
VariantClear
(
&
url
);
return
TRUE
;
}
/* Size Bar */
#define SIZEBAR_WIDTH 4
...
...
@@ -321,13 +357,8 @@ static void TB_OnClick(HWND hWnd, DWORD dwID)
WB_DoPageAction
(
pHHInfo
->
pWBInfo
,
WB_GOBACK
);
break
;
case
IDTB_HOME
:
{
WCHAR
szUrl
[
MAX_PATH
];
CHM_CreateITSUrl
(
pHHInfo
->
pCHMInfo
,
pHHInfo
->
pHHWinType
->
pszHome
,
szUrl
);
WB_Navigate
(
pHHInfo
->
pWBInfo
,
szUrl
);
NavigateToChm
(
pHHInfo
->
pWBInfo
,
pHHInfo
->
pCHMInfo
->
szFile
,
pHHInfo
->
pHHWinType
->
pszHome
);
break
;
}
case
IDTB_FORWARD
:
WB_DoPageAction
(
pHHInfo
->
pWBInfo
,
WB_GOFORWARD
);
break
;
...
...
@@ -821,15 +852,6 @@ static void HH_Close(HHInfo *pHHInfo)
}
}
static
void
HH_OpenDefaultTopic
(
HHInfo
*
pHHInfo
)
{
WCHAR
url
[
MAX_PATH
];
LPCWSTR
defTopic
=
pHHInfo
->
pHHWinType
->
pszFile
;
CHM_CreateITSUrl
(
pHHInfo
->
pCHMInfo
,
defTopic
,
url
);
WB_Navigate
(
pHHInfo
->
pWBInfo
,
url
);
}
static
BOOL
HH_OpenCHM
(
HHInfo
*
pHHInfo
)
{
if
(
!
CHM_OpenCHM
(
pHHInfo
->
pCHMInfo
,
pHHInfo
->
szCmdLine
))
...
...
@@ -857,7 +879,7 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine)
return
-
1
;
}
HH_OpenDefaultTopic
(
pHHInfo
);
NavigateToChm
(
pHHInfo
->
pWBInfo
,
pHHInfo
->
pCHMInfo
->
szFile
,
pHHInfo
->
pHHWinType
->
pszFile
);
while
(
GetMessageW
(
&
msg
,
0
,
0
,
0
))
{
...
...
dlls/hhctrl.ocx/webbrowser.c
View file @
719bfaf4
...
...
@@ -668,23 +668,6 @@ void WB_UnEmbedBrowser(WBInfo *pWBInfo)
}
}
BOOL
WB_Navigate
(
WBInfo
*
pWBInfo
,
LPCWSTR
szUrl
)
{
IWebBrowser2
*
pWebBrowser2
=
pWBInfo
->
pWebBrowser2
;
VARIANT
myURL
;
if
(
!
pWebBrowser2
)
return
FALSE
;
V_VT
(
&
myURL
)
=
VT_BSTR
;
V_BSTR
(
&
myURL
)
=
SysAllocString
(
szUrl
);
IWebBrowser2_Navigate2
(
pWebBrowser2
,
&
myURL
,
0
,
0
,
0
,
0
);
VariantClear
(
&
myURL
);
return
TRUE
;
}
void
WB_ResizeBrowser
(
WBInfo
*
pWBInfo
,
DWORD
dwWidth
,
DWORD
dwHeight
)
{
IWebBrowser2
*
pWebBrowser2
=
pWBInfo
->
pWebBrowser2
;
...
...
dlls/hhctrl.ocx/webbrowser.h
View file @
719bfaf4
...
...
@@ -42,7 +42,6 @@ typedef struct WBInfo
BOOL
WB_EmbedBrowser
(
WBInfo
*
pWBInfo
,
HWND
hwndParent
);
void
WB_UnEmbedBrowser
(
WBInfo
*
pWBInfo
);
BOOL
WB_Navigate
(
WBInfo
*
pWBInfo
,
LPCWSTR
szUrl
);
void
WB_ResizeBrowser
(
WBInfo
*
pWBInfo
,
DWORD
dwWidth
,
DWORD
dwHeight
);
void
WB_DoPageAction
(
WBInfo
*
pWBInfo
,
DWORD
dwAction
);
...
...
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