std::string-ify drivers/win/help.*

This commit is contained in:
jeblanchard 2008-06-02 04:29:54 +00:00
parent fc66466f09
commit 059d8c474c
2 changed files with 10 additions and 12 deletions

View File

@ -2,16 +2,13 @@
#include "help.h"
#include <htmlhelp.h>
void OpenHelpWindow(const char *subpage)
using std::string;
void OpenHelpWindow(string subpage)
{
char helpFileName[MAX_PATH];
strcpy(helpFileName, BaseDirectory);
strcat(helpFileName, "\\fceux.chm");
if (subpage)
{
strcat(helpFileName, "::/");
strcat(helpFileName, subpage);
strcat(helpFileName, ".htm");
}
HtmlHelp(GetDesktopWindow(), helpFileName, HH_DISPLAY_TOPIC, (DWORD)NULL);
string helpFileName = BaseDirectory;
helpFileName += "\\fceux.chm";
if (subpage.length())
helpFileName = helpFileName + "::/" + subpage + ".htm";
HtmlHelp(GetDesktopWindow(), helpFileName.c_str(), HH_DISPLAY_TOPIC, (DWORD)NULL);
}

View File

@ -1,2 +1,3 @@
#include <string>
// Open a help window to the default topic, or to ::/subpage.htm
void OpenHelpWindow(const char *subpage = NULL);
void OpenHelpWindow(std::string subpage = "");