You'll have to handle the messages yourself. However, it's pretty easy to make a class which does this for you. E.g.:
public class HelpCards : IMessageFilter {
const int WM_TCARD = 0x52;
const int ID_NOTIFICATION = 4242;
public enum TCardAction: int {
IDOK = 1,
IDCANCEL = 2,
IDABORT = 3,
IDRETRY = 4,
IDIGNORE = 5,
IDYES = 6,
IDNO = 7,
IDCLOSE = 8,
IDHELP = 9,
HELP_TCARD = 0x8000,
HELP_TCARD_DATA = 0x0010,
HELP_TCARD_OTHER_CALLER = 0x0011,
HELP_TCARD_OTHER_NEXT = 0x0011,
}
public HelpCards() {
Application.AddMessageFilter(this);
}
public delegate void OKReceived();
public event OKReceived OnOKReceived;
public bool PreFilterMessage(ref Message m) {
if (m.Msg == WM_TCARD && (int)m.WParam == ID_NOTIFICATION) {
switch ((TCardAction)m.LParam) {
case TCardAction.IDOK:
if (OnOKReceived != null) {
OnOKReceived();
}
break;
// etc.
}
return true; // true means message was handled
}
return false;
}
}
Then, in the place where you want to subscribe (probably in your form somewhere) use
hc = new HelpCards();
hc.OnOKReceived += new OKReceived(hc_OnOKReceived);
And have hc
defined in the class definition of the form. Like so
HelpCards hc;
And somewhere have the handling function:
void hc_OnOKReceived() {
throw new NotImplementedException();
}
Obviously you will need to do the rest yourself. But that should get you started.