there you go. the comments are in german, if you have questions feel free to ask. void CWool5View::drehe_bild() { int x,y; int xx,yy; int mipux,mipuy; double a,r,h; double pih=3.14159; BeginWaitCursor(); CClientDC dc(this); int miny,maxy; if(rot_l_yvideogroessex) || (mipuy-yy<0) || (mipuy-yy>videogroessey)) dc.SetPixel(start_videox+x, start_videoy+y, RGB(0,0,0)); else dc.SetPixel(start_videox+x, start_videoy+y, m_pdcMemory->GetPixel(mipux-xx, mipuy-yy)); } //quadrant rechts unten else if( (x-mipux>=0) && (y-mipuy>0)) { //a+=pih; r=sqrt(((x-mipux)*(x-mipux)) + ((y-mipuy)*(y-mipuy)) ); a+=rotation; xx=(r*cos(a)); yy=(r*sin(a)); if((mipux+xx<0) || (mipux+xx>videogroessex) || (mipuy+yy<0) || (mipuy+yy>videogroessey)) dc.SetPixel(start_videox+x, start_videoy+y, RGB(0,0,0)); else dc.SetPixel(start_videox+x, start_videoy+y, m_pdcMemory->GetPixel(mipux+xx, mipuy+yy)); } //quadrant links unten else if( (x-mipux<0) && (y-mipuy>0)) { //a+=pih; r=sqrt(((x-mipux)*(x-mipux)) + ((y-mipuy)*(y-mipuy)) ); a+=rotation; xx=(r*cos(a)); yy=(r*sin(a)); if((mipux-xx<0) || (mipux-xx>videogroessex) || (mipuy-yy<0) || (mipuy-yy>videogroessey)) dc.SetPixel(start_videox+x, start_videoy+y, RGB(0,0,0)); else dc.SetPixel(start_videox+x, start_videoy+y, m_pdcMemory->GetPixel(mipux-xx, mipuy-yy));