POV-Ray : Newsgroups : povray.unofficial.patches : HtmlHelp windows patch Server Time
25 May 2024 07:24:31 EDT (-0400)
  HtmlHelp windows patch (Message 1 to 2 of 2)  
From: alphaQuad
Subject: HtmlHelp windows patch
Date: 14 Jan 2008 15:25:01
Message: <web.478bc467ff7462413382b4210@news.povray.org>
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

From: alphaQuad
Subject: Re: HtmlHelp windows patch
Date: 14 Jan 2008 15:40:00
Message: <web.478bc81d5e2868193382b4210@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.