🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

BDS2006 vs. C++Builder 5: EnumChildWindows

#2875
From: Udo Weik
Date: Sun, 17 Dec 2006 23:23
22 lines
1676 bytes
Hello,

EnumChildWindows is defined as follows:
   BOOL EnumChildWindows( HWND hWndParent, WNDENUMPROC lpEnumFunc, LPARAM lParam ) ;

With C++Builder 5, I used the following call:
   EnumChildWindows( HANDLE, EnumFunct, PARAM ) ;

That does't work with BDS2006, I have gotten the following error message:
   [C++ Error] ...: E2034 Cannot convert 'int (__stdcall *)(void *,long)' to 'int (__stdcall *)()'
   [C++ Error] ...: E2342 Type mismatch in parameter 'lpEnumFunc' (wanted 'int (__stdcall *)()',
                          got 'int (__stdcall *)(void *,long)')

After casting EnumFunct as WNDENUMPROC
   EnumChildWindows( HANDLE, (WNDENUMPROC)EnumFunct, PARAM ) ;
compiling was successful.

Any comments would be highly appreciated!


Thanks and greetings
Udo
Technical Details
Message-ID: <4585d0e9@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,fb2c11c52da9b25c,start
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 18 Dec 2006 00:23:31 +0100
From: Udo Weik <WeikEngOff@aol.com>
User-Agent: Thunderbird 1.5.0.8 (Windows/20061025)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: BDS2006 vs. C++Builder 5: EnumChildWindows
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 0659-1, 16.12.2006), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 172.173.209.188
Message-ID: <4585d0e9@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1166397673 172.173.209.188 (17 Dec 2006 15:21:13 -0800)
Lines: 22
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail