![]() chm file I could just change the include file to match and not have to worry about searching through the code for hardcoded values. I set up a #define for each topic so if I had to change the. ![]() HINSTANCE retval = ShellExecute(MyHndl, _T("open"), _T("hh.exe"), parms, NULL, SW_SHOW) (Though, I've looked at the source code myself, and it appears. Only issue I've had with it is that sometimes long 'm dashes', like, will not be present, and instead the two words will be run together. hh.exe -mapid 0 ms-its:C:\\Programs\\Application\\HelpFile.chm It has a Spotlight importer as well as the app itself. NOTE: The full command string will look like this: Shell out, using My Window handle, specifying the Microsoft help utility, hh.exe, as the 'noun' and passing the parameter string we build above Sprintf(parms,_T("-mapid %d ms-its:%s%s.chm"), Topic, Dir, AppName) Build the parameter string which includes the topic number and the fully qualified. Strcpy(AppName, strrchr(str1, '\\')) // Get just the name of the executable, keeping the '\' in front for later when it is appended to the directory Strncat(str1, CmndLine, (strstr(CmndLine, ".exe") - CmndLine)) // Pull out the first parameter in the command line (should be the executable name) w/out the. chm file usually has the same name as the application - if you don’t want to hardcode it.Ĭhar *CmndLine = GetCommandLine() // Gets the command the program started with. I have just set up some simple char’s so you can see what is going on: void DisplayHelpTopic(int Topic) Here is a quick routine to open a help file and pass an ID number. ![]() This approach is much easier and in line with your question. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |