IAgentApp Class
class IAgentApp
Deriving your CWinApp object from IAgentApp instantly hooks in a lot of default agent functionality into your application. Take a look at the SECAgentApp template for more info. It exposes simple APIs to initiaize the AgentServer, create and maintain a default agent character (a SECAgentCharacterExPtr object), provides Agent support in Dynamic Data Validation (DDV) of forms and dialogs in the app, support for tip of the day and more. You need not necessarily derive your CWinApp class from IAgentApp. You could create an instance of IAgentApp anywhere in your application. But, part of the DDV support implemented in the SECAgentApp template will have to be reproduced for proper agent enabled DDV functionality. Also, you can not have an IAgentApp interface in your application and still work with just SECAgentCharacterExPtr.
Defined in: ot_agent.h
Class Members
Construction
More initialization
virtual void LoadAgent(LPWSTR pwzAgentChar)
Loads the Agent Server and optionally a character
virtual void UnLoadAgent()
UnLoads the Agent Server and the underlying character
BOOL AttachChar(LPWSTR pwzAgent)
Loads and stores a reference to the character
void DetachChar()
Unloads the underlying character.
Utility function
static SECAgentCharacterExPtr* AFXAPI CreateChar(IAgentExPtr& ptrAgent, LPWSTR pwzAgent, SECAgentCharacterExPtr* pptrInChar = NULL)
Creates and returns a reference to SECAgentCharacterExPtr.
Accessors
inline void SetMessageBoxInterruptType(UINT nType)
Sets the current message box interrupt type.
inline UINT GetMessageBoxInterruptType()
Gets the current message box interrupt type.
inline UINT GetTipOfTheDayCount()
Gets the current no. of tips.
Operations
void EnableTipOfTheDay(UINT nTipCount)
Enable or Disable Tip of the Day.
void ShowTipOfTheDay(UINT nTipID = 0)
Show the tip of the day command in the commands list
virtual notifications
virtual void OnInitChar()
Called when a new character is attached.
virtual HRESULT OnCharCommand(long dwCommandID, IUnknown * punkUserInput)
Handler for the Command notification of the underlying character.
Implementation methods
virtual SECAgentCharAct* GetTipOfTheDayAct(UINT nTip)
Function that supplies the tooltip Act.