enum problem 
Author Message
 enum problem

Hello,

I have the following enum defined in a IDL file:
      helpstring("Periodicity")] enum
 {
  [helpstring("Intraday")] Intraday = 0,
  [helpstring("Daily")]  Daily,
  [helpstring("Weekly")]  Weekly,
  [helpstring("Monthly")]  Monthly
 } PERIODICITY;

and a method
[helpstring("method test")] HRESULT test(PERIODICITY enmPeriodicity);

I can use this method in VB but there is no "Enum dialog" displayed. I have
to enter the enum by my own and can't select it from the enum box? why?

Thanks in advance.



Tue, 28 Oct 2003 00:59:25 GMT  
 enum problem
Try this:

typedef [public] enum
{
...

Quote:
}PERIODICITY;

Jerry Zhao


Quote:
> Hello,

> I have the following enum defined in a IDL file:
>       helpstring("Periodicity")] enum
>  {
>   [helpstring("Intraday")] Intraday = 0,
>   [helpstring("Daily")]  Daily,
>   [helpstring("Weekly")]  Weekly,
>   [helpstring("Monthly")]  Monthly
>  } PERIODICITY;

> and a method
> [helpstring("method test")] HRESULT test(PERIODICITY enmPeriodicity);

> I can use this method in VB but there is no "Enum dialog" displayed. I
have
> to enter the enum by my own and can't select it from the enum box? why?

> Thanks in advance.



Tue, 28 Oct 2003 02:18:15 GMT  
 enum problem
My regular advice - don't use typedefs...

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:
> Hello,

> I have the following enum defined in a IDL file:
>       helpstring("Periodicity")] enum
>  {
>   [helpstring("Intraday")] Intraday = 0,
>   [helpstring("Daily")]  Daily,
>   [helpstring("Weekly")]  Weekly,
>   [helpstring("Monthly")]  Monthly
>  } PERIODICITY;

> and a method
> [helpstring("method test")] HRESULT test(PERIODICITY enmPeriodicity);

> I can use this method in VB but there is no "Enum dialog" displayed. I
have
> to enter the enum by my own and can't select it from the enum box? why?

> Thanks in advance.



Tue, 28 Oct 2003 02:34:55 GMT  
 enum problem
Try including a tag with the same name as the enumeration - I've found this
to be necessary in order for the VB intellisense to work correctly.  For
example:

 helpstring("Periodicity")] enum PERIODICITY
 {
  [helpstring("Intraday")] Intraday = 0,
  [helpstring("Daily")]  Daily,
  [helpstring("Weekly")]  Weekly,
  [helpstring("Monthly")]  Monthly
 } PERIODICITY;

--
Michael Shutt

Please respond to newsgroup as I will not return direct emails.


Quote:
> Hello,

> I have the following enum defined in a IDL file:
>       helpstring("Periodicity")] enum
>  {
>   [helpstring("Intraday")] Intraday = 0,
>   [helpstring("Daily")]  Daily,
>   [helpstring("Weekly")]  Weekly,
>   [helpstring("Monthly")]  Monthly
>  } PERIODICITY;

> and a method
> [helpstring("method test")] HRESULT test(PERIODICITY enmPeriodicity);

> I can use this method in VB but there is no "Enum dialog" displayed. I
have
> to enter the enum by my own and can't select it from the enum box? why?

> Thanks in advance.



Tue, 28 Oct 2003 04:11:59 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Union (not Enum) problem for interfaces (sorry!)

2. Enum problem for interfaces

3. ATL/Access VBA Enum Problem

4. enum problems

5. typedef enum as subset of another enum

6. enum - enum ?

7. enum - enum ?

8. Problem with enum index

9. Problems with enum

10. Problem with Character Processing and Enum

11. Problem with character processing and Enum.

12. enum & struct scope problems

 

 
Powered by phpBB® Forum Software