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. Redraw PictureControl dont work...

Redraw PictureControl dont work...

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
4 Posts 2 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.
  • L Offline
    L Offline
    Laudenberg
    wrote on last edited by
    #1

    Good Morning, I got a small problem... I use 2 Picture Control boxes. the first box play a stream from my webcam, the second should be overlap the first, and show a grabbed edited frame. I just use m_webcam.ShowWindow(0) and m_pic.ShowWindow(1). The Problem is, after i called this, the Picturebox is empty. But when i minimize and maximize the window, the Picture is shown like i expected. Is there a way to redraw the picturebox?? :confused:

    A 1 Reply Last reply
    0
    • L Laudenberg

      Good Morning, I got a small problem... I use 2 Picture Control boxes. the first box play a stream from my webcam, the second should be overlap the first, and show a grabbed edited frame. I just use m_webcam.ShowWindow(0) and m_pic.ShowWindow(1). The Problem is, after i called this, the Picturebox is empty. But when i minimize and maximize the window, the Picture is shown like i expected. Is there a way to redraw the picturebox?? :confused:

      A Offline
      A Offline
      Ahmed Charfeddine
      wrote on last edited by
      #2

      CWnd::Invalidate is used to force the redrawing ofa certain window or control. If that helps !

      Our Philosophy, Mohammed Baqir Al Sadr

      L 1 Reply Last reply
      0
      • A Ahmed Charfeddine

        CWnd::Invalidate is used to force the redrawing ofa certain window or control. If that helps !

        Our Philosophy, Mohammed Baqir Al Sadr

        L Offline
        L Offline
        Laudenberg
        wrote on last edited by
        #3

        Thank you for your awnser. I tried it, but the problem is still the same :(

        A 1 Reply Last reply
        0
        • L Laudenberg

          Thank you for your awnser. I tried it, but the problem is still the same :(

          A Offline
          A Offline
          Ahmed Charfeddine
          wrote on last edited by
          #4

          I am missing the details of your problem. But it is sure that you must take care in case for video streaming application where usually the redering window is asynchronously updated by a worker thread that fetches the video data, such that if a resize or a certain wm_paint happens on the main UI thread for the rendering window, the last picture is lost unles you do manually persist it each time the worker thread brings it, so to render it in the context of the ONPaint, or the OnDraw or any similar handler executing on the context of the main UI thread. I encountered this case in many contexts, the first with Windows RTC (videoconferencing).. Good luck !

          Our Philosophy, Mohammed Baqir Al Sadr

          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