Flicker and Cwnd
-
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
-
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
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
-
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
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)
-
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)
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 ?
-
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 ?
-
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)
-
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
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
-
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
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 !!!