|
-
May 19th, 1999, 11:43 AM
#1
callback functions
Hi, I hope this is an easy one for somebody out there. I can't work out how to pass the address of a callback function to the LineDDA function from the GDI SDK.
I have a function in the class which calls LineDDA:
void CALLBACK swLine::AddPoint(int x, int y, LPARAM lpData)
and I want to pass it to LineDDA, I tried:
LineDDA(x1, y1, x2, y2, &AddPoint, 0);
amongst other things but just get a variety of errors.
If someone could help me out I would be most grateful.
Rupert
-
May 19th, 1999, 07:43 PM
#2
Re: callback functions
A member function of a class cannot be a callback function because it has a hidden argument "this".
If you want to implement the callback function as a member of a class, you must make it static.
Also, you use AddPoint instead of &AddPoint.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|