Results 1 to 3 of 3

Thread: Using a CALLBACK function

  1. #1

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    Using a CALLBACK function

    I am writing a winsock class and for now I the class user to give me a certain CALLBACK function and then I call that function (by name) from my class with specific parameters. It's just like WndProc function you write yourself and then you pass the address of WndProc to WNDCLASSEX which is then called by windows containing a certain message.
    How would I implement that in my own application?
    Baaaaaaaaah

  2. #2
    Frenzied Member Microbasic's Avatar
    Join Date
    Mar 2001
    Posts
    1,402
    In your class (or structure), declare the variable as MYFUNC. Now, put this at the top of your header:

    Code:
    typedef LRESULT CALLBACK MYFUNC(HWND param1, UINT param2, LPCTSTR param3, ...);


    MicroBasic
    Dragon Shadow Trainer

    There is no good or evil in the world...only programmers and fools .

  3. #3

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Great, thanks. I'll try that.
    Baaaaaaaaah

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width