hi
i have one sheet with cca 20 cols, and first is a pic col. Everything works fine until i have over 70 rows and images, after some redrawing program randomly crashes. After i remove picture cell everything works fine despite the number of rows. I work with unicode spread.
Error that i get in release is:
Fault Module Name: FPSPRU80.ocx
Fault Module Version: 8.0.0.7
Fault Module Timestamp: 4a01eb0e
Exception Code: c0000005
Exception Offset: 0008c0d3
OS Version: 6.0.6002.2.2.0.256.6
Locale ID: 1050
In debug it crashes in:
vctools\vc7libs\ship\atlmfc\include\afxwin1.inl Line:893
Picture is dynamicaly added every time spread refresh with this function:
void SetPicInCell(CSpreadSheet* m_Spread, UINT IDB_PICTURE, long lRow, long lCol, BOOL bTypePictCenter /*= FALSE*/, BOOL bTypePictMaintainScale /*= FALSE*/, BOOL bTypePictStretch /*= FALSE*/, int nTypeValign /*= 1*/)
{
CPictureHolder picture;
picture.CreateFromBitmap(IDB_PICTURE);
if(picture.GetPictureDispatch() == NULL)
return;
m_Spread->SetRow(lRow);
m_Spread->SetRow2(lRow);
m_Spread->SetCol(lCol);
m_Spread->SetCol2(lCol);
m_Spread->SetBlockMode(TRUE);
m_Spread->SetTypePictCenter(bTypePictCenter);
m_Spread->SetTypePictMaintainScale(bTypePictMaintainScale);
m_Spread->SetTypePictStretch(bTypePictStretch);
m_Spread->SetTypeVAlign(nTypeValign);
m_Spread->SetTypePictPicture(picture.GetPictureDispatch());
m_Spread->SetBlockMode(FALSE);
}
Is there a problem in spread or in my function.
Thank you.