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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. progressctrl question

progressctrl question

Scheduled Pinned Locked Moved C / C++ / MFC
question
3 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.
  • N Offline
    N Offline
    nss
    wrote on last edited by
    #1

    I access my statusbar embeded progressctrl as:

    	(((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.m_WzdProgressCtrl).StepIt();
    

    I want it to reflect progress as I proceed in a function which itself calls long time consuming functions, several of them. How shall I call Stepit to reflect this progress? Some of the functions belong to other classes, not my View class.

    M 1 Reply Last reply
    0
    • N nss

      I access my statusbar embeded progressctrl as:

      	(((CMainFrame*)AfxGetMainWnd())->m_wndStatusBar.m_WzdProgressCtrl).StepIt();
      

      I want it to reflect progress as I proceed in a function which itself calls long time consuming functions, several of them. How shall I call Stepit to reflect this progress? Some of the functions belong to other classes, not my View class.

      M Offline
      M Offline
      Max Santos
      wrote on last edited by
      #2

      if you have time consuming functions , its good to put them in a new thread maybe you need to send a WM_PAINT or call the RedrawWindow of the progress control in order to reflect the changes made by the StepIt(), because if you have a very time consuming function in the main thread, the CPU will not process the windows messages until that function returns (i think) _______________________________ Portal Imoguia       Software Imoguia MSN:maxsnts@hotmail.com

      M 1 Reply Last reply
      0
      • M Max Santos

        if you have time consuming functions , its good to put them in a new thread maybe you need to send a WM_PAINT or call the RedrawWindow of the progress control in order to reflect the changes made by the StepIt(), because if you have a very time consuming function in the main thread, the CPU will not process the windows messages until that function returns (i think) _______________________________ Portal Imoguia       Software Imoguia MSN:maxsnts@hotmail.com

        M Offline
        M Offline
        Michael Dunn
        wrote on last edited by
        #3

        Actually, WM_PAINT is a message you never send yourself. RedrawWindow() is the correct way to make a window repaint. --Mike-- "I'd rather you just give me a fish today, because even if you teach me how to fish, I won't do it. I'm lazy." -- Nish Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm

        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