Hi friends,
Is there a way to get an active enum value by its name:
For example: I need get "xtpCalendarDayThursday" value to use in activeX object:
type
CalendarWeekDay = TOleEnum;
const
xtpCalendarDaySunday = 1;
xtpCalendarDayMonday = 2;
xtpCalendarDayTuesday = 4;
xtpCalendarDayWednesday = 8;
xtpCalendarDayThursday = 16;
xtpCalendarDayFriday = 32;
xtpCalendarDaySaturday = 64;
xtpCalendarDayAllWeek = 127;
xtpCalendarDaySaSu = 65;
xtpCalendarDayMo_Fr = 62;
Thanks and best regards.
GET an activeX ENUM by name
- Antonio Linares
- Site Admin
- Posts: 42393
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 9 times
- Been thanked: 41 times
- Contact:
Re: GET an activeX ENUM by name
Dear Toninho,
You may use defines for each value, in example:
#define xtpCalendarDayThursday 16
You may use defines for each value, in example:
#define xtpCalendarDayThursday 16
-
- Posts: 172
- Joined: Tue Oct 18, 2005 10:01 am
Re: GET an activeX ENUM by name
Hi Antonio, Thanks for the answer.Antonio Linares wrote:Dear Toninho,
You may use defines for each value, in example:
#define xtpCalendarDayThursday 16
I'm doing this, but it would be easier to get the value directly from the object.
BTW thank you
Regards.
Re: GET an activeX ENUM by name
you need to compare Result from Enum with Calendar define Constanttoninhofwi wrote:Is there a way to get an active enum value by its name:
For example: I need get "xtpCalendarDayThursday" value to use in activeX object:
type
CalendarWeekDay = TOleEnum;
Code: Select all | Expand
Result_Value := TOleEnum;
Do CASE
CASE xtpCalendarDaySunday = Result_Value
? "Sunday"
CASE xtpCalendarDayMonday = Result_Value
? "Monday"
CASE xtpCalendarDayTuesday = Result_Value
? "Tuesday"
CASE xtpCalendarDayWednesday = Result_Value
? "Wednesday"
CASE xtpCalendarDayThursday = Result_Value
? "Thursday"
CASE xtpCalendarDayFriday = Result_Value
? "Friday"
CASE xtpCalendarDaySaturday = Result_Value
? "Saturday"
CASE xtpCalendarDayAllWeek = Result_Value
? "AllWeek"
CASE xtpCalendarDaySaSu = Result_Value
? "SaSu"
CASE xtpCalendarDayMo_Fr = Result_Value
? "Mo_Fr"
ENDCASE
greeting,
Jimmy
Jimmy
Re: GET an activeX ENUM by name
Hi my friend toninhofwi,
It is something that I had in mind to verify too.
I will be checking about it and if I discover something I will share here.
It is something that I had in mind to verify too.
I will be checking about it and if I discover something I will share here.
Regards,
Lailton Fernando Mariano
Lailton Fernando Mariano
- Antonio Linares
- Site Admin
- Posts: 42393
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 9 times
- Been thanked: 41 times
- Contact:
Re: GET an activeX ENUM by name
Just do a binary search inside the ActiveX DLL for xtpCalendarDayThursday and check if it is there