|
|
I didnt take the time needed to complete the patch previously.
I wanted to make that up to anyone trying to compile on windows with
mingw32-make.exe
**************FINAL*********************
FOR pvengine.cpp "HtmlHelp" -> "hh_patch"
/*#include <htmlhelp.h> 153 332 NMHDR does not name a type. -defined in
winuser.h thru windows.h winresrc.h .. er something like that. */
#include "pvengine.h"
// includes optout.h includes povray.h includes userio.h
/* Also
<math.h><string.h><malloc.h><windows.h><shellapi.h><mmsystem.h>
<commdlg.h><direct.h><io.h><process.h><assert.h><sys\stat.h>"commctrl.h"
<excpt.h> "frame.h""optout.h""povms.h""povmsgid.h" */
#include <htmlhelp.h>
//first required <windows.h> in pvengine.h, before <htmlhelp.h>
#define HTMLHELP_FIXED
//#define HH_SET_EXCLUSIVE_FILTER 0x19
#define HH_INITIALIZE 0x1C
#define HH_UNINITIALIZE 0x1D
#define HH_PRETRANSLATEMESSAGE 0xFD
//#define HH_SAFE_DISPLAY_TOPIC 0x20 #define HH_SET_GLOBAL_PROPERTY 0xFC
bool hh_patch(HWND, LPCSTR, UINT, DWORD);
typedef HWND (WINAPI* FPHH)(HWND, LPCSTR, UINT, DWORD);
FPHH pHtmlHelp=NULL; // Function pointer
//http://www.codeguru.com/forum/showthread.php?t=51896
******************* PATCH 2 = DWORD HH_AKLINK MSG 0***********************
bool hh_patch(HWND w, LPCSTR hf, UINT func, DWORD msg)
{
bool r=FALSE;
//Explicit linking of HHCtrl.ocx
if (pHtmlHelp==NULL) {
HINSTANCE hHelp=LoadLibrary("HHCtrl.ocx");
if (hHelp!=NULL)
(FARPROC&)pHtmlHelp=GetProcAddress(hHelp,"HtmlHelpA");
}
HWND hWndResult=NULL;
if (pHtmlHelp!=NULL) {
hWndResult=pHtmlHelp(w,
hf, //helpfilepath
func,
msg);
}
if (hWndResult) r=TRUE;
return r;
}
Post a reply to this message
|
|
|
|
hmm er this makes more sense ::::::::::::::
HWND hh_patch(HWND w, LPCSTR hf, UINT func, DWORD msg)
{
if (pHtmlHelp==NULL) {
HINSTANCE hHelp=LoadLibrary("HHCtrl.ocx");
if (hHelp!=NULL)
(FARPROC&)pHtmlHelp=GetProcAddress(hHelp,"HtmlHelpA");
}
HWND hWndResult=NULL;
if (pHtmlHelp!=NULL) {
hWndResult=pHtmlHelp(w,
hf, //helpfilepath
func,
msg);
}
return hWndResult;
}
Post a reply to this message
|
|