diff --git a/src/drivers/win/help.cpp b/src/drivers/win/help.cpp new file mode 100644 index 00000000..c0d8a7ae --- /dev/null +++ b/src/drivers/win/help.cpp @@ -0,0 +1,17 @@ +#include "main.h" +#include "help.h" +#include + +void OpenHelpWindow(const char *subpage) +{ + char helpFileName[MAX_PATH]; + strcpy(helpFileName, BaseDirectory); + strcat(helpFileName, "\\help\\fceux.chm"); + if (subpage) + { + strcat(helpFileName, "::/"); + strcat(helpFileName, subpage); + strcat(helpFileName, ".htm"); + } + HtmlHelp(GetDesktopWindow(), helpFileName, HH_DISPLAY_TOPIC, (DWORD)NULL); +} diff --git a/src/drivers/win/help.h b/src/drivers/win/help.h new file mode 100644 index 00000000..1c6947ef --- /dev/null +++ b/src/drivers/win/help.h @@ -0,0 +1,2 @@ +// Open a help window to the default topic, or to ::/subpage.htm +void OpenHelpWindow(const char *subpage = NULL);