#pragma once #include "common.h" class AFX_EXT_CLASS LAttachment { public: LAttachment(unsigned int message = 0, BOOL executeHost = true); virtual ~LAttachment(); virtual void SetMessage(unsigned int v) { mMessage = v; } virtual void SetExecuteHost(BOOL v); virtual void SetOwnerHost(LAttachable* v) { mOwnerHost = v; } virtual int Execute(unsigned int message, void* data); LAttachable* GetOwnerHost() const { return mOwnerHost; } unsigned int GetMessage() const { return mMessage; } BOOL GetExecuteHost() const { return mExecuteHost; } protected: virtual void ExecuteSelf(unsigned int message, void*); protected: LAttachable *mOwnerHost; unsigned int mMessage; BOOL mExecuteHost; };