Develop and Download Open Source Software

Browse Subversion Repository

Contents of /CopalPro/HHelp.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5 - (show annotations) (download) (as text)
Mon Aug 1 01:25:35 2011 UTC (12 years, 9 months ago) by kaityo
File MIME type: text/x-c++src
File size: 2020 byte(s)
Bugfix on HTMLHhelp
1 //---------------------------------------------------------------------------
2 // HTMLƒwƒ‹ƒv‚đ•\ŽŚ‚ˇ‚éŠÖ”
3 //---------------------------------------------------------------------------
4 #include <vcl.h>
5 #pragma hdrstop
6
7 #include "htmlhelp.h"
8 #include "HHelp.h"
9
10 //---------------------------------------------------------------------------
11 #pragma package(smart_init)
12 //---------------------------------------------------------------------------
13 Htmlhelp::Htmlhelp(void){
14 Handle = LoadLibrary("HHCTRL.OCX");
15 if(Handle==NULL) {
16 ShowMessage("HHCTRL.OCX‚ŞŒŠ‚Â‚Š‚č‚Ü‚š‚ń");
17 return;
18 }
19 }
20 //---------------------------------------------------------------------------
21 Htmlhelp::~Htmlhelp(void){
22 FreeLibrary(Handle);
23 }
24 //---------------------------------------------------------------------------
25 void
26 Htmlhelp::ShowHtmlHelp(HWND handle,char *helpfile) {
27 typedef HWND (WINAPI *FPHH) (HWND, LPCSTR, UINT, DWORD);
28 if(Handle == NULL){
29 return;
30 }
31 FPHH htmlHelp = (FPHH)GetProcAddress(Handle,"HtmlHelpA");
32 if(htmlHelp==NULL){
33 ShowMessage("HtmlHelpA‚ŞŒŠ‚Â‚Š‚č‚Ü‚š‚ń");
34 return;
35 }
36 htmlHelp(handle,helpfile, HH_DISPLAY_TOPIC, NULL);
37 }
38 //---------------------------------------------------------------------------
39 void
40 Htmlhelp::ShowHtmlHelpSearch(HWND handle,char *helpfile,char *keyword) {
41 typedef HWND (WINAPI *FPHH) (HWND, LPCSTR, UINT,DWORD);
42 if(Handle == NULL){
43 return;
44 }
45 FPHH htmlHelp= (FPHH)GetProcAddress(Handle,"HtmlHelpA");
46 if(htmlHelp==NULL){
47 ShowMessage("HtmlHelpA‚ŞŒŠ‚Â‚Š‚č‚Ü‚š‚ń");
48 return;
49 }
50 HH_AKLINK link;
51 link.cbStruct = sizeof(HH_AKLINK) ;
52 link.fReserved = FALSE ;
53 link.pszKeywords = keyword;
54 link.pszUrl = NULL ;
55 link.pszMsgText = NULL ;
56 link.pszMsgTitle = NULL ;
57 link.pszWindow = NULL ;
58 link.fIndexOnFail = TRUE ;
59 htmlHelp(handle,helpfile, HH_KEYWORD_LOOKUP, (DWORD)&link);
60 }
61 //---------------------------------------------------------------------------

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26