🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8313

Re: WinHelp and keywords

#8313
From: Bob Gonder
Date: Thu, 11 Nov 2004 15:50
13 lines
1415 bytes
James Christie wrote:

>void  TForm1::Callhelp(const AnsiString filename, const AnsiString keyword)
>{
>    WinHelp(this->Handle, filename.c_str(), HELP_KEY, (unsigned long)&keyword);

>  The help file for WinHelp says the last parameter should be the address of
>the Keyword and the compiler says it want's it as unsigned long so what have
>I got wrong ??

It wants a normal C string, not an AnsiString.
Try it with the cstr().
	(unsigned long)(keyword.cstr()) );
Technical Details
Message-ID: <mc27p0134eb5tb2988jvot2cg0et14l82o@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsread.com!newsprint.newsread.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <41929b49$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,9cce4a4d4b7f04c9
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: WinHelp and keywords
Date: Thu, 11 Nov 2004 07:50:48 -0800
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <mc27p0134eb5tb2988jvot2cg0et14l82o@4ax.com>
References: <41929b49$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 69.69.90.220
X-Trace: newsgroups.borland.com 1100188243 69.69.90.220 (11 Nov 2004 07:50:43 -0700)
Lines: 14
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newsread.com!newsprint.newsread.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail