ActiveX - bitmask field imported as enum
Hi
I'm trying to use an ActiveX component in my MFC app. The problem is one field is being imported incorrectly.
Following line works in C# (bitmask)
client.Connection = ConnectionConstants.client | ConnectionConstants.service;`
In C++ the field is imported as an enum. It won't let me use the bitwise expression. How can I get around it?
Is there an easier way than compiling the IDL? I get some error about single not being a recognized type.
Thanks
Re: ActiveX - bitmask field imported as enum
Quote:
In C++ the field is imported as an enum.
A enum is a number and a bitmask is a number... don't really understand your problem.
Re: ActiveX - bitmask field imported as enum
The cast worked. I didn't actually try it. I'm sure I read somewhere it was possible to convert from enum to int but not from int to enum.
Thanks for the response.