The IMAPIFormAdviseSink::OnActivateNext method indicates whether or not the form can handle the message class of the next message to display.
See IMAPIFormAdviseSink : IUnknown.
HRESULT OnActivateNext(
LPCSTR lpszMessageClass,
ULONG ulMessageStatus,
ULONG ulMessageFlags,
LPPERSISTMESSAGE FAR * ppPersistMessage
);
Form viewers call the IMAPIFormAdviseSink::OnActivateNext method to help the form determine whether it is capable of displaying the next message in a folder. The next message could be a message of any class, but typically it is of the same class or a related class. This makes the process of reading multiple messages of the same class more efficient by allowing client applications to reuse form objects whenever possible.
Most form objects will use the message class pointed to by lpszMessageClass to determine whether or not they can handle the next message. Usually a form can handle messages that belong to classes of which the form's default class is a subclass as well as messages that belong to the default class. However, a form can use other factors to determine without question whether or not a message can be handled, such as the sent or unsent status of the next message.
Return S_OK and NULL in the ppPersistMessage parameter if your form can handle the message class. If your form can create a new form that can handle the message that your form is unable to handle, perform the following tasks:
The message will be loaded by the form viewer using the IPersistMessage::Load method belonging to the object pointed to by ppPersistMessage.
If neither your form nor a form that you can create can handle the next message, return S_FALSE. MAPI discourages forms from returning this value because it results in degraded performance in the form viewer.