Article View: borland.public.cppbuilder.nativeapi
Article #10565Re: Problem with HelpJump
From: Alan Bellingham
Date: Mon, 05 Apr 2004 14:36
Date: Mon, 05 Apr 2004 14:36
23 lines
1794 bytes
1794 bytes
"John" <nenhum@nenhum.com> wrote:
>I don't know what's going on... I had a problem that if i used a OpenDialog
>obj, the app would not look for the help file in the app dir, but instead
>would look for it in the last dir opened. So i used this code to try to fix
>it:
> LPCTSTR lpModuleName = "myapp.exe";
> LPTSTR lpFilename;
> HMODULE hModule = GetModuleHandle(lpModuleName);
> DWORD size = GetModuleFileName(hModule,lpFilename, 256);
> String helppath = ExtractFilePath(lpFilename);
> Application->HelpFile = helppath + "\MyHelp.hlp";
> Application->HelpJump("");
>
>I debug it and find that everything is fine, until the HelpJump, which opens
>the help and raises an access violation error! I'm really lost here... Any
>help?
lpFilename is never initialised, by the look of it.
Alan Bellingham
--
ACCU Conference 2004 - http://https://www.accu.org/conference/
Technical Details
Message-ID:
<kmr270hv85vc9ch9q70pvc2vd6sipfmn9s@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40715dcb$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,39012fe8aaf974c1 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-04-05 07:40:21 PST From: Alan Bellingham <alanb@episys.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Problem with HelpJump Date: Mon, 05 Apr 2004 15:36:50 +0100 Reply-To: alanb@episys.com Message-ID: <kmr270hv85vc9ch9q70pvc2vd6sipfmn9s@4ax.com> References: <40715dcb$1@newsgroups.borland.com> X-Newsreader: Forte Agent 2.0/32.646 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 193.129.251.130 X-Trace: newsgroups.borland.com 1081175808 193.129.251.130 (5 Apr 2004 07:36:48 -0800) Lines: 23 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail