Board index » cppbuilder » GetEnumName with C++Builder

GetEnumName with C++Builder


2005-04-24 03:17:55 PM
cppbuilder42
Hi,
I get a Delphi CodeSample:
"Navigating and Editing a ClientDataSet" by Cary Jensen
community.borland.com/article/0,1410,29122,00.html
I failed to convert the following delphi Statement to C++Builder:
GetEnumName(TypeInfo(TDataSetState),
Ord(ClientDataSet1.State));
My Code is:
PPropInfo PropInfo =
GetPropInfo(PTypeInfo(ClassInfo(__classid(TADOTable))),"State");
if (PropInfo){
StatusBar1->Panels->Items[1]->Text =
"State = " + GetEnumName(*(PropInfo->PropType),
int(ADOTable1->State));
}
thx for your help
Rainer
 
 

Re:GetEnumName with C++Builder

Add .pas unit to your project with this function and call it from C++
Builder.
//------------------------------------------
Regards,
Vassiliev V. V.
www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Rainer Welzel" < XXXX@XXXXX.COM >сообщи?сообщила ?новостях
следующе? news:426b481c$ XXXX@XXXXX.COM ...
Quote
Hi,
I get a Delphi CodeSample:
"Navigating and Editing a ClientDataSet" by Cary Jensen
community.borland.com/article/0,1410,29122,00.html

I failed to convert the following delphi Statement to C++Builder:

GetEnumName(TypeInfo(TDataSetState),
Ord(ClientDataSet1.State));


My Code is:

PPropInfo PropInfo =
GetPropInfo(PTypeInfo(ClassInfo(__classid(TADOTable))),"State");
if (PropInfo){
StatusBar1->Panels->Items[1]->Text =
"State = " + GetEnumName(*(PropInfo->PropType),
int(ADOTable1->State));
}

thx for your help
Rainer