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. What is VC++ 6 equivalent of VB's DoEvents

What is VC++ 6 equivalent of VB's DoEvents

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
5 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.
  • M Offline
    M Offline
    Mahesh Perumal
    wrote on last edited by
    #1

    Is there anything equivalent to DoEvents of VB in VC++ 6??? Mahesh

    N A 2 Replies Last reply
    0
    • M Mahesh Perumal

      Is there anything equivalent to DoEvents of VB in VC++ 6??? Mahesh

      N Offline
      N Offline
      Nick Parker
      wrote on last edited by
      #2

      Mahesh Perumal wrote: Is there anything equivalent to DoEvents of VB in VC++ 6??? I would assume it's along the lines of SendMessage[^]. -Nick Parker

      S 1 Reply Last reply
      0
      • N Nick Parker

        Mahesh Perumal wrote: Is there anything equivalent to DoEvents of VB in VC++ 6??? I would assume it's along the lines of SendMessage[^]. -Nick Parker

        S Offline
        S Offline
        Steve S
        wrote on last edited by
        #3

        More along the lines of a non-blocking message loop; while (::PeekMessage(&msg,NULL,0,0,PM_NOREMOVE)) { AfxGetThread()->PumpMessage(); } or similar Steve S [This signature space available for rent]

        1 Reply Last reply
        0
        • M Mahesh Perumal

          Is there anything equivalent to DoEvents of VB in VC++ 6??? Mahesh

          A Offline
          A Offline
          Alvaro Mendez
          wrote on last edited by
          #4

          It doesn't exist, but you can certainly write it:

          void DoEvents()
          {
          for (MSG msg; ::PeekMessage(&msg, NULL, 0, 0, PM_REMOVE); )
          {
          ::TranslateMessage(&msg);
          ::DispatchMessage(&msg);
          }
          }

          Regards, Alvaro


          Quitters never win. Winners never quit. But those who never win and never quit are idiots. -- despair.com

          M 1 Reply Last reply
          0
          • A Alvaro Mendez

            It doesn't exist, but you can certainly write it:

            void DoEvents()
            {
            for (MSG msg; ::PeekMessage(&msg, NULL, 0, 0, PM_REMOVE); )
            {
            ::TranslateMessage(&msg);
            ::DispatchMessage(&msg);
            }
            }

            Regards, Alvaro


            Quitters never win. Winners never quit. But those who never win and never quit are idiots. -- despair.com

            M Offline
            M Offline
            Mahesh Perumal
            wrote on last edited by
            #5

            Thanx a lot. I have got it working...:)

            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