Here is my code :
Form.h
// Event map
BEGIN_EVENT_MAP(CForm)
EVENT_MAP_ENTRY(frmOpenEvent, OnOpen)
EVENT_MAP_COMMAND_ENTRY(GenericCOMMButton, OnCOMMButton)
EVENT_MAP_ENTRY(frmUpdateEvent,OnUpdate)
END_EVENT_MAP()
Form.cpp
// Clear Text button handler
Boolean CGenericCommandForm::OnCOMMButton(EventPtr pEvent, Boolean& bHandled)
{
SendString(m_fldOutgoingText.GetTextPtr(),true,true,true);
return true;
}
Boolean CGenericCommandForm::OnUpdate(EventType* pEvent, Boolean& bHandled)
{
arrChoices.Insert(0,"Tx: Sent");
m_lstTrace.DrawList();
bHandled = false;
return true;
}
/////////////////////////
Inside SendString :
....
event.eType = frmUpdateEvent;
FrmDispatchEvent(&event);
....
It didn't work. Is there another way to implement a dispatch event from CForm class? I thought that is protected.
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
