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. How to implement WndProc callback method in a windows service ?

How to implement WndProc callback method in a windows service ?

Scheduled Pinned Locked Moved C / C++ / MFC
questiontutorial
6 Posts 3 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.
  • K Offline
    K Offline
    Kushagra Tiwari
    wrote on last edited by
    #1

    I have created a Windows service in VC6 and wanted to know how can I implement a WndProc to handle Windows Messages inside the same. Regards, Kushagra I hate coding but I luv to develop :)

    A 1 Reply Last reply
    0
    • K Kushagra Tiwari

      I have created a Windows service in VC6 and wanted to know how can I implement a WndProc to handle Windows Messages inside the same. Regards, Kushagra I hate coding but I luv to develop :)

      A Offline
      A Offline
      Adam Roderick J
      wrote on last edited by
      #2

      You want to get the message of which window(s)? i cannot understand.:confused:

      Величие не Бога может быть недооценена.

      K 1 Reply Last reply
      0
      • A Adam Roderick J

        You want to get the message of which window(s)? i cannot understand.:confused:

        Величие не Бога может быть недооценена.

        K Offline
        K Offline
        Kushagra Tiwari
        wrote on last edited by
        #3

        Standard Windows Messages like WM_COMMAND,WM_TIMER and so on

        A I 2 Replies Last reply
        0
        • K Kushagra Tiwari

          Standard Windows Messages like WM_COMMAND,WM_TIMER and so on

          A Offline
          A Offline
          Adam Roderick J
          wrote on last edited by
          #4

          From your words, i felt that you need to get some specific messages generated by any window globally. if so then, it sound a different intention with it :-D well you have to hook WINDOWS messages globally using SetWindowHookEx with WH_CALLWNDPROC as hook id [^]

          Величие не Бога может быть недооценена.

          1 Reply Last reply
          0
          • K Kushagra Tiwari

            Standard Windows Messages like WM_COMMAND,WM_TIMER and so on

            I Offline
            I Offline
            Iain Clarke Warrior Programmer
            wrote on last edited by
            #5

            A service runs in the background, so where are these WM_COMMAND's coming from? You won;t have a menu, or a dialog box... I think you need to go back to your basics - a service communicates with other programs using various interprocess communcations. Iain.

            I have now moved to Sweden for love (awwww). If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[^]

            K 1 Reply Last reply
            0
            • I Iain Clarke Warrior Programmer

              A service runs in the background, so where are these WM_COMMAND's coming from? You won;t have a menu, or a dialog box... I think you need to go back to your basics - a service communicates with other programs using various interprocess communcations. Iain.

              I have now moved to Sweden for love (awwww). If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[^]

              K Offline
              K Offline
              Kushagra Tiwari
              wrote on last edited by
              #6

              I know that but ... The purpose I wanted to know that is I wanted to either abort shutdown or delay the time so that I can run some cleanup scripts just before the system gets shutdown. Regrads, Kushagra

              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