Article View: borland.public.cppbuilder.nativeapi
Article #17395DialogBox BUG
From: ScOe
Date: Wed, 26 Mar 2003 18:20
Date: Wed, 26 Mar 2003 18:20
21 lines
1874 bytes
1874 bytes
I've encounter one BUG with c++ builder or something ... and i dont know how
to fix it ...
Problem is following ...
i'm calling DialogBox function and for MyDialogProc
fResult = DialogBox (hInstance, TEXT ("AboutBox"), 0, MyDialogProc) ;
error code that i'm receiving is:
E2034 Cannot convert 'int (__stdcall *)(void *,unsigned int,unsigned
int,long)' to 'int (__stdcall*)()'
E2342 Type mismatch in parameter 'lpDialogFunc' (wanted 'int (__stdcall
*)()', got 'int (__stdcall *)(void *,unsigned int,unsigned int,long)')
this is declaration of lpDialogFunc function:
BOOL CALLBACK MyDialogProc(HWND hWnd, UINT nMessage, WPARAM wParam, LPARAM
lParam)
I dont know how did he expect to get 'int (__stdcall *)()' when in winhelp
is wroten that 'lpDialogFunc' expect 'int (__stdcall *)(void *,unsigned
int,unsigned int,long)' callback function.
I saw in Charles Petzold example that is using same parametered procedure.
Tried to compile it but i receive same kind of error ... so problem must be
in C++ Builder.
Technical Details
Message-ID:
<3e81ef72@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,ca0d320e3b0653a0 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-03-26 20:34:07 PST From: "ScOe" <sven.savic@zg.hinet.hr> Newsgroups: borland.public.cppbuilder.nativeapi Subject: DialogBox BUG Date: Wed, 26 Mar 2003 19:20:30 +0100 Lines: 24 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 213.191.138.185 Message-ID: <3e81ef72@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1048702834 213.191.138.185 (26 Mar 2003 10:20:34 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail