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. Flicker and Cwnd

Flicker and Cwnd

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
8 Posts 5 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.
  • P Offline
    P Offline
    Pyt
    wrote on last edited by
    #1

    Hi all, I developped a MDI application that shows a timetable for an appointment system. It basically show staff members and the appointments they are assigned. Each appointment is represented using a derived CWnd object. You get information on appointments by hovering on them using another CWnd derived object. My problem is that I've got a lot of flicker when i'm dragging appointments or when I hovering on appointments. It really flicker when there's a lot of appointments showing up. I tried implementing double-buffering but it didn't change anything, any idea? Pyt

    P K G P 4 Replies Last reply
    0
    • P Pyt

      Hi all, I developped a MDI application that shows a timetable for an appointment system. It basically show staff members and the appointments they are assigned. Each appointment is represented using a derived CWnd object. You get information on appointments by hovering on them using another CWnd derived object. My problem is that I've got a lot of flicker when i'm dragging appointments or when I hovering on appointments. It really flicker when there's a lot of appointments showing up. I tried implementing double-buffering but it didn't change anything, any idea? Pyt

      P Offline
      P Offline
      Prem Kumar
      wrote on last edited by
      #2

      Try to show the information by testing for a time lag of say about 500 ms to 1 sec. I think windows tooltips are also implemented in this manner

      1 Reply Last reply
      0
      • P Pyt

        Hi all, I developped a MDI application that shows a timetable for an appointment system. It basically show staff members and the appointments they are assigned. Each appointment is represented using a derived CWnd object. You get information on appointments by hovering on them using another CWnd derived object. My problem is that I've got a lot of flicker when i'm dragging appointments or when I hovering on appointments. It really flicker when there's a lot of appointments showing up. I tried implementing double-buffering but it didn't change anything, any idea? Pyt

        K Offline
        K Offline
        KarstenK
        wrote on last edited by
        #3

        You can should draw at first to a memory dc and the draw to the screen. Another solution is to use timers for redrawing. My experience is also if it doesn´t work, may be there an conceptional mistake. (Oversized solution) IMHO: that each appointment is a CWnd seems to be no good idea. I would internally work with an array and access it via the screen coordinates. The output would be simple Retangles.:suss: Try it @ home. (B&B)

        P 1 Reply Last reply
        0
        • K KarstenK

          You can should draw at first to a memory dc and the draw to the screen. Another solution is to use timers for redrawing. My experience is also if it doesn´t work, may be there an conceptional mistake. (Oversized solution) IMHO: that each appointment is a CWnd seems to be no good idea. I would internally work with an array and access it via the screen coordinates. The output would be simple Retangles.:suss: Try it @ home. (B&B)

          P Offline
          P Offline
          Pyt
          wrote on last edited by
          #4

          Hi, The thing is that my controls are drawing themselves and that I already implemented a memory dc in the drawing code. Could the problem be that my view is not actually drawing the controls, but just sending a WM_PAINT message to each of my derived CWnd controls ?

          K 1 Reply Last reply
          0
          • P Pyt

            Hi, The thing is that my controls are drawing themselves and that I already implemented a memory dc in the drawing code. Could the problem be that my view is not actually drawing the controls, but just sending a WM_PAINT message to each of my derived CWnd controls ?

            K Offline
            K Offline
            KarstenK
            wrote on last edited by
            #5

            You´re right. You have understood the principle architecture of the Windows API.:cool: My suggestion implies that the area would be drawn by the "containing" window. Try it @ home. (B&B)

            P 1 Reply Last reply
            0
            • K KarstenK

              You´re right. You have understood the principle architecture of the Windows API.:cool: My suggestion implies that the area would be drawn by the "containing" window. Try it @ home. (B&B)

              P Offline
              P Offline
              Pyt
              wrote on last edited by
              #6

              Thanks for the info, i'll give it a go. Pyt

              1 Reply Last reply
              0
              • P Pyt

                Hi all, I developped a MDI application that shows a timetable for an appointment system. It basically show staff members and the appointments they are assigned. Each appointment is represented using a derived CWnd object. You get information on appointments by hovering on them using another CWnd derived object. My problem is that I've got a lot of flicker when i'm dragging appointments or when I hovering on appointments. It really flicker when there's a lot of appointments showing up. I tried implementing double-buffering but it didn't change anything, any idea? Pyt

                G Offline
                G Offline
                Gary Kirkham
                wrote on last edited by
                #7

                There is an article here on CP that will help you implement double-buffering http://www.codeproject.com/gdi/flickerfree.asp Gary Kirkham A working Program is one that has only unobserved bugs

                1 Reply Last reply
                0
                • P Pyt

                  Hi all, I developped a MDI application that shows a timetable for an appointment system. It basically show staff members and the appointments they are assigned. Each appointment is represented using a derived CWnd object. You get information on appointments by hovering on them using another CWnd derived object. My problem is that I've got a lot of flicker when i'm dragging appointments or when I hovering on appointments. It really flicker when there's a lot of appointments showing up. I tried implementing double-buffering but it didn't change anything, any idea? Pyt

                  P Offline
                  P Offline
                  Patje
                  wrote on last edited by
                  #8

                  By the way, did you know that 'flicker' is dutch 'slang' for a homosexual guy? Imagine what MS-Word said a few years ago when I typed in a meeting report that one of our applications had a flicker-problem... (I know this really belongs in the lounge-forum, but I couldn't resist, sorry). Enjoy life, this is not a rehearsal !!!

                  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