void CDuoBIanxing::BoundaryFill4(HDC hDC, int x, int y, COLORREF boundarycolor, COLORREF newcolor)
{
COLORREF color;
GLshort iPixel;
glReadPixels(x,y,1,1,GL_RGB,GL_UNSIGNED_SHORT,&iPixel);
color = RGB(GetRValue(iPixel),GetGValue(iPixel),GetBValue(iPixel));  if(color == boundarycolor)
  {
//  glDrawPixels(1,1,GL_RGB,GL_UNSIGNED_SHORT,&newcolor);
  glBegin(GL_POINTS);
glColor3f(GetRValue(newcolor),GetGValue(newcolor),GetBValue(newcolor));
glVertex2f(x,y);
  glEnd();  BoundaryFill4(hDC,x,y+1,boundarycolor,newcolor);
BoundaryFill4(hDC,x,y-1,boundarycolor,newcolor);
  BoundaryFill4(hDC,x-1,y,boundarycolor,newcolor);
  BoundaryFill4(hDC,x+1,y,boundarycolor,newcolor);
  }
}如题,编译的时候老是崩溃...