|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
undefined symbol problem in BCB V6.
I am trying to create a function that is invoked when a user closes a form. The function should put a message up on the screen asking if the user really wishes to close (yes, no or cancel). I think the problem may be that i am missing a header file or some other simple thing.
My code is: TMessageButton Option; TMessageButtons msgButtons; msgButtons << smbYes << smbNo << smbCancel; Action = caFree; if(ClientDataSet1->State == dsEdit || ClientDataSet1->State == dsInsert) { ClientDataSet1->Post(); } if(ClientDataSet1->ChangeCount > 0) { Option = Application->MessageBox("You have pending updates. Do you want to write them to the database?", "Pending Updates", msgButtons, smsWarning, smbYes, smbNo); if(Option == smbYes) { ClientDataSet1->ApplyUpdates(-1); } else if(Option == smbCancel) { Action = caNone; } } The error says that TMessage Button is an undefined symbol...do i have a definition missing somewhere or what?! All help appreciated.
__________________
----------------------------------------------------------- 4dr14n |
|
#2
|
||||
|
||||
|
I beleive you meant to use message dialog. You would want something like:
MessageDlg("Are you sure you want to exit?", mtConfirmation, TMsgDlgButtons() << mbYes << mbNo << mbCancel, 0) |
|
#3
|
||||
|
||||
|
yip...you're right. i did!
Thanks for that! I had realised that was the command i needed but was unsure of the syntax...thanx for the example...much appreciated |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > undefined symbol problem in BCB V6. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|