Thread: Wm_timer

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    Registered User
    Join Date
    Dec 2007
    Posts
    932
    Well what i see in this program is that he calls functions in WM_TIMER and not in WM_PAINT. And you told me above not to call drawing function in WM_TIMER.

    He also put a TODO in WM_PAINT, so maybe i should put some code there?

    Code:
    case WM_TIMER:
    		{
    		  //controls growth of the ellipse
    		  if (growth > 50 || growth < 0)
    			  addition *= -1;
    		  growth += addition;
    
    		 if(double_buffer == true)
    			Draw_With_Buffering();
    		 else
                            Draw_Without_Buffering(hWnd);
    		}
            break;
    
    	case WM_PAINT:
    		hdc = BeginPaint(hWnd, &ps);
    		// TODO: F&#252;gen Sie hier den Zeichnungscode hinzu...
    		EndPaint(hWnd, &ps);
    		break;
    http://www.turboupload.com/files/get...ource-code.zip
    Last edited by Ducky; 09-06-2008 at 06:12 AM.
    Using Windows 10 with Code Blocks and MingW.

Popular pages Recent additions subscribe to a feed