Question about the prototype of MessageDlg()?

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
dyliu
Posts: 2
Joined: Mon Jun 26, 2006 11:56 pm

Question about the prototype of MessageDlg()?

Post by dyliu »

I use BCB5 and TsiLang V5.3.2. After I upgrade to TsiLang V6.0.2,
My program could not be compiled since the prototypr of MessageDlg is changed to:

int __fastcall MessageDlg(const AnsiString Msg, Dialogs::TMsgDlgType DlgType, Dialogs::TMsgDlgButtons Buttons, int HelpCtx, const Dialogs::TMsgDlgBtn DefaultBtn, const Dialogs::TMsgDlgBtn CancelBtn);

There are two new parameters: DefaultBtn and CancelBtn. Why?
How to compile my program successfully? I don't want to modify my source code.
isiticov
Site Admin
Posts: 2385
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

It looks like a bug in BCB5 HPP generation from PAS file. These two additional parameters have default value and may be omitted. Could you please manually modify generated HPP file to use:

Code: Select all

int __fastcall MessageDlg(const AnsiString Msg, Dialogs::TMsgDlgType DlgType, Dialogs::TMsgDlgButtons Buttons, int HelpCtx, const Dialogs::TMsgDlgBtn DefaultBtn = (Dialogs::TMsgDlgBtn)(0x2), const Dialogs::TMsgDlgBtn CancelBtn = (Dialogs::TMsgDlgBtn)(0x3));
?
Please let me know if this helps.
Best regards,
Igor Siticov.
dyliu
Posts: 2
Joined: Mon Jun 26, 2006 11:56 pm

Post by dyliu »

Yes, It works! Now I can compile my program. Thanks!
Post Reply