我在VB6里编写一个画图程序时,自已编写了一个嵌TAO调用函数,但运行时如果图片小还可以实现,但一大就提示说"堆栈溢出"请问是怎么回事?怎么解决?源码如下:
'在原图上选择出连续的被选择图像
Public Function SSMO(X As Single, Y As Single, C As Integer)
If picBits((Y * picInfoD.bmWidth + X) * BytesPerPixel + C) = 255 Then
picBits((Y * picInfoD.bmWidth + X) * BytesPerPixel + C) = 0
picBits((Y * picInfoD.bmWidth + X) * BytesPerPixel + 3 - C) = 255
If picBits(((Y - 1) * picInfoD.bmWidth + X - 1) * BytesPerPixel + C) = 255 Then
SSMO X - 1, Y - 1, C
End If
If picBits(((Y - 1) * picInfoD.bmWidth + X) * BytesPerPixel + C) = 255 Then
SSMO X, Y - 1, C
End If
If picBits(((Y - 1) * picInfoD.bmWidth + X + 1) * BytesPerPixel + C) = 255 Then
SSMO X + 1, Y - 1, C
End If
If picBits((Y * picInfoD.bmWidth + X - 1) * BytesPerPixel + C) = 255 Then
SSMO X - 1, Y, C
End If
If picBits((Y * picInfoD.bmWidth + X + 1) * BytesPerPixel + C) = 255 Then
SSMO X + 1, Y, C
End If
If picBits(((Y + 1) * picInfoD.bmWidth + X - 1) * BytesPerPixel + C) = 255 Then
SSMO X - 1, Y + 1, C
End If
If picBits(((Y + 1) * picInfoD.bmWidth + X) * BytesPerPixel + C) = 255 Then
SSMO X, Y + 1, C
End If
If picBits(((Y + 1) * picInfoD.bmWidth + X + 1) * BytesPerPixel + C) = 255 Then
SSMO X + 1, Y + 1, C
End If
End If
End Function
VB里"堆栈溢出"请问是怎么回事?怎么解决?