The R Project SVN R

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6098 pd 1
/*
2
Can be built with VC++6 by
3
cl /MT /Ox /c Rchtml.c
4
link /dll /out:Rchtml.dll Rchtml.obj user32.lib htmlhelp.lib advapi32.lib
5
*/
6
 
36901 ripley 7
#define WIN32_LEAN_AND_MEAN 1
6098 pd 8
#include <windows.h>
9
#include <htmlhelp.h>
10
 
11
static char htmlref[256];
12
 
13
__declspec(dllexport) void Rchtml(char **file, char **ptopic, int *error)
14
{
15
    char *topic =*ptopic;
16
    HWND rc;
17
 
18
    strcpy(htmlref, *file);
19
    if(topic && strlen(topic)) {
20
	strcat(htmlref, "::/");
21
	strcat(htmlref, topic);
22
	strcat(htmlref, ".html");
23
    }
24
    rc = HtmlHelp(GetDesktopWindow(), htmlref, HH_DISPLAY_TOPIC, 0);
25
    *error = (rc == (HWND)NULL);
26
}