C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 23rd, 2003, 03:24 AM
4dr14n's Avatar
4dr14n 4dr14n is offline
Huh?
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Scotland, UK
Posts: 223 4dr14n User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 3 h 24 m 38 sec
Reputation Power: 6
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

Reply With Quote
  #2  
Old June 23rd, 2003, 07:13 AM
AGibel's Avatar
AGibel AGibel is offline
Bad Andy
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: OH
Posts: 275 AGibel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
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)

Reply With Quote
  #3  
Old June 23rd, 2003, 07:44 AM
4dr14n's Avatar
4dr14n 4dr14n is offline
Huh?
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Scotland, UK
Posts: 223 4dr14n User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 Days 3 h 24 m 38 sec
Reputation Power: 6
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > undefined symbol problem in BCB V6.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway