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