Switch - MessageBox

All announcements, questions and issues related to the TsiLang Components Suite.
Post Reply
simonrf
Posts: 2
Joined: Wed Oct 24, 2007 2:11 pm

Switch - MessageBox

Post by simonrf »

Hello all,

I wonder if someone could help me convert this below for siLang please.

switch(MessageBox(0, "Are You Sure You Want To Stop?",
" Stop? ", MB_YESNO))

case IDYES:
//do something
break;

case IDNO:
//do something else
break;

I tried removing the "Are You Sure You Want To Stop" with siLang1->GetText("STID_01") but I get type mismatch error messages.

Can someone help please, I am using C++Builder 5.

Thank you.
Simon Rutley-Frayne
The Casimo Group Ltd
isiticov
Site Admin
Posts: 2416
Joined: Thu Nov 21, 2002 3:17 pm

Post by isiticov »

Just use GetTextC() or GetTextOrDefaultC() instead of GetText() since MessageBox() uses char * (PChar) for strings.
Best regards,
Igor Siticov.
simonrf
Posts: 2
Joined: Wed Oct 24, 2007 2:11 pm

Post by simonrf »

Excellent. thank you very much
Simon Rutley-Frayne
The Casimo Group Ltd
Post Reply