VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



How to deal with callback function in MFC C++ ?

by yan (1 Submission)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 28th January 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

How to deal with callback function in MFC C++ ?

API Declarations


Declare Function A Lib "Sekure" Alias "_A@8" (ByVal iPort As Integer, vFunc As Variant) As Integer

Rate How to deal with callback function in MFC C++ ?



//global declaration
typedef void (*FINGER_STATUS) (short);
FINGER_STATUS FingStatus = NULL;

SEKURE_API int __stdcall int A (int comport, void *fnc)
{
FingStatus = (FINGER_STATUS)pFS;
int nRet = GetInfo(comport);

if (nRet) {
if(FingStatus)
FingStatus( nRet );
}
return OK;
......
}

in VB =>
Public Sub Verify()
   Msgbox "HI"
   ..........
End Sub

Private Sub A_Click()
    ret= A(1, AddressOf Verify)
......
End Sub


Download this snippet    Add to My Saved Code

How to deal with callback function in MFC C++ ? Comments

No comments have been posted about How to deal with callback function in MFC C++ ?. Why not be the first to post a comment about How to deal with callback function in MFC C++ ?.

Post your comment

Subject:
Message:
0/1000 characters