> You can only do that if the enum is only used from inside the
> class. If you
> call a class member from another class that needs the enum you
> must declare
> it outside the class.
It can be used externally if made public. I have used this successfully:
Class X's header file:
class X : public CWnd
{
public:
enum {X_SOME_WINDOWS_MESSAGE = (WM_USER + 1) };
bla
bla
};
Class Y's impl. file:
BEGIN_MESSAGE_MAP(Y, CDialog)
ON_MESSAGE(X::X_SOME_WINDOWS_MESSAGE, OnSomeWindowsMessage)
END_MESSAGE_MAP
(Class X posts the message to its parent, class Y in this case, like list
boxes post LBN_ messages, for example). This allows other possible child
classes to have similar messages, I believe, and they are distinguished by
using the class name as scope.
I'm not sure if I'm violating any rules here?
--
Jason Teagle
[EMAIL PROTECTED]