-
September 9th, 2003, 09:05 AM
#1
WinHelp() does not work on Win NT?
Hi,
In my application i use the WinHelp() function to display a help file. With Windows 95 and 98 this works fine, however with Windows NT it doesn't. The message i get from Window NT is:
"THIS FILE IS NOT A WINDOWS HELP FILE, A NEWER VERSION OF HELP IS NEEDED TO READ THIS HELP FILE".
The following is a fragment from the code how i implemented the help. Is there a different way to do this in Windows NT?
Code:
#define HELP_FILE "Help1_9.hlp"
void Frame::OnHelpContents(void)
{
CString Path;
CCPCApp* pApp = (CCPCApp*)AfxGetApp();
if(pApp)
{
pApp->GetPath(Path);
Path += HELP_FILE;
::WinHelp( this->m_hWnd, Path,
HELP_CONTENTS,
0);
}
}
Time is fun when you're having flies
-
September 9th, 2003, 10:06 AM
#2
This is a problem in NT itself. We have the same problem for our helpfiles. Its because NT uses the default help renderer which is different. If you double click on your help file or open it through the start menu (if you have a shortcut) NT uses the right program. It only gets it wrong when you start it from in code. I never eally looked further into it than that.
Please use meaningful question titles - "Help me" does not let me know whether I can help with your question, and I am unlikely to bother reading it.
Please remember to rate useful answers. It lets us know when a question has been answered.
-
September 9th, 2003, 10:16 AM
#3
Allright, but what did you do about it then, used different help or program does not work on NT?
Time is fun when you're having flies
-
September 9th, 2003, 10:22 AM
#4
Why are you using ::WinHelp() instead of CWinAPP::WinHelp()? The latter works under NT (but I didn't verify this for a long time, as we have moved to HTMLHelp() a few years ago).
-
September 9th, 2003, 10:26 AM
#5
Because of limit resources at the time, we just advised our users to open the help file manually. From that point on, the winhelp topic would work correctly. We got away with this as we do not have very many users of our software ( < 200 most of which were not on NT)
Please use meaningful question titles - "Help me" does not let me know whether I can help with your question, and I am unlikely to bother reading it.
Please remember to rate useful answers. It lets us know when a question has been answered.
-
September 10th, 2003, 03:20 AM
#6
Why are you using ::WinHelp() instead of CWinAPP::WinHelp()?
I could not get CWinApp::WinHelp() to call the right help file. It is allready linked to another helpfile (the help file of the app).
I used ::WinHelp() instead because i have a different frame with corresponding view for which i have created a specific helpfile.
Time is fun when you're having flies
-
September 23rd, 2003, 07:36 AM
#7
Possible workaround for Winhelp() problem in Windows NT:
Code:
void CRoroFrame::OnRoroHelpContents(void)
{
ShellExecute( m_hWnd, // Parent window
NULL, // Perform "open" action
"Winhlp32.exe", // File name to open
RORO_HELP_FILE, // Parameters Path, // Default directory
SW_SHOW); // Show window normally
}
Time is fun when you're having flies
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|