Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CALLBACK function MFC

CALLBACK function MFC

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++helptutorial
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    D Manivelan
    wrote on last edited by
    #1

    Hi friend, Presently am working in MFC project. I have to use CALLBACK function but i don't know. Kindly help me. below see my questions What is CALLBACK? How it work? what is the advantage of CALLBACK, please explain with an example

    S M J 3 Replies Last reply
    0
    • D D Manivelan

      Hi friend, Presently am working in MFC project. I have to use CALLBACK function but i don't know. Kindly help me. below see my questions What is CALLBACK? How it work? what is the advantage of CALLBACK, please explain with an example

      S Offline
      S Offline
      Sivaraman Dhamodharan
      wrote on last edited by
      #2

      Call back functions are supplied to some function or data structure as a pointer like (Or I can say, pointer to the starting address of U r function) variable. The pointer is actually a function pointer, and this will be called back when something happens. Say for example you develop an API function that takes a folder name. For each file found inside the folder, it will perform some operation based on the file name and extension. But the API you write do not know what action to perform and it is decided by the caller. In that case, caller will supply a function address, and your API will call the user supplied function (CALLBACK) for each file. You see that.

      Programming Article

      1 Reply Last reply
      0
      • D D Manivelan

        Hi friend, Presently am working in MFC project. I have to use CALLBACK function but i don't know. Kindly help me. below see my questions What is CALLBACK? How it work? what is the advantage of CALLBACK, please explain with an example

        M Offline
        M Offline
        Maximilien
        wrote on last edited by
        #3

        A callback function is a user defined function that a generic API function can use (call back) to do non generic work. For example, when you have a collection (array, vector, list) of use defined data (struct or class), you want to be able to sort that collection depending on a user defined criteria, you will use the default sorting API, and give that default sorting function a pointer to a callback function that will actually do the comparison between the member of the struct/class. Another example, is when working with threads; there are multiple generic API to create and manage threads, but all of them needs a callback function; that function will be the actual code that will be run (or a starting point to) by the different threads. Good luck. Max.

        Nihil obstat

        1 Reply Last reply
        0
        • D D Manivelan

          Hi friend, Presently am working in MFC project. I have to use CALLBACK function but i don't know. Kindly help me. below see my questions What is CALLBACK? How it work? what is the advantage of CALLBACK, please explain with an example

          J Offline
          J Offline
          Jochen Arndt
          wrote on last edited by
          #4

          See Wikipedia[^].

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups