vb6taskdialog

How to get a callback function in vb6 with TaskDialogIndirect?


I'm using TaskDialogIndirect in VB6. It's working great, and I even have links working (with enabling TDF_ENABLE_HYPERLINKS) in the pszFooter member of TASKDIALOGCONFIG.

The problem is that while the cursor turns into a "hand" when hovering over the link, I don't know how to get the TaskDialogIndirect's TASKDIALOGCONFIG.pfCallback member to point to a custom function of mine, so I can actually direct the user to the hyperlink shown.

tdi.pszFooter = StrPtr("<a href=" & Chr$(34) & "www.cnn.com" & Chr$(34) & ">www.cnn.com</a>")

Can anyone help me? Thanks!


Solution

  • Public Function FnPtrToLong(ByVal lngFnPtr As Long) As Long
        FnPtrToLong = lngFnPtr
    End Function