Problem using CWinApp::WinHelp( )

If I write to a file on my floppy drive thru my program, eject the floppy disk, and then i programatically try launch help using CWinApp::WinHelp() with a correct help file path in place in m_pszHelpFilePath, it fails  to launch winhelp.

Tracing thru debug thru MFC, it seems CWnd::WinHelp() fails at call to the windows function ::WinHelp() and results in prompting a messagebox with message "Unable to launch help" using
AFX_IDP_FAILED_TO_LAUNCH_HELP

Note that this doesnt happen till I write to the floppy drive and eject the floppy disk. I see exact same behaviour with Microsoft word. If I save a document to a:, eject and then click on contents and index in help, it never launches.

I have similar problem with printing a report too.

Any help would be greatly appreciated.
ndewaganAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

s_stirleyCommented:
It's probably a bug in MFC, try calling _chdir to change the default drive to a known drive (like c:\) before calling WinHelp.
How many times have you seen the browse dialog go mental when it tries to go back to the last place it was open if that was a floppy .. :)

Simon.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ndewaganAuthor Commented:
You know, that works. Seems like there is no better solution.

Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.