🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: SetTimer in TForm descedant

#2683
From: Michel Leunen
Date: Thu, 01 Feb 2007 10:44
20 lines
1487 bytes
Michel Leunen wrote:

> You must declare your callback function as 'static'.

Besides, your callback must be declared as:

void CALLBACK TimerFcn(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime);

and call SetTimer() like this:

SetTimer(Handle, 1, 500, &TimerFcn);

Michel
-- 
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
http://www.leunen.com/
----------------------------------------
Technical Details
Message-ID: <45c1c45a$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <45c159aa@newsgroups.borland.com> <45c19ef4$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,68809160c683a9df
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Thu, 01 Feb 2007 11:44:53 +0100
From: Michel Leunen <nospam@noreply.be>
Organization: www.leunen.com
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: SetTimer in TForm descedant
References: <45c159aa@newsgroups.borland.com> <45c19ef4$1@newsgroups.borland.com>
In-Reply-To: <45c19ef4$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 81.247.69.170
Message-ID: <45c1c45a$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1170326618 81.247.69.170 (1 Feb 2007 02:43:38 -0800)
Lines: 20
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail