D
D
densaface2015-11-17 11:54:47
C++ / C#
densaface, 2015-11-17 11:54:47

Why does CImageList::Add crash in the Release version of an assembly?

Hi there,
Moved the project from MS VS 6.0 to MSVS 2008, corrected cycles and other cosmetic things. On the old visual everything worked ok. On the new one, the initialization of the dialog is interrupted in the middle of the OnInitDialog, namely on the line marked with an arrow below
........
ImageList.Create(32, 32, ILC_COLOR24|ILC_MASK, 0, 0);
CBitmapbm;
bm.LoadBitmap(IDB_KEY);
ImageList.Add(&bm, RGB(255,255,255));// <<==
......
Moreover, the program starts, and the GUI is ready to receive events, but due to half-missing initialization, it is in fact in a non-working state. In Debug mode everything is ok. What could be?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ananiev, 2015-12-20
@SaNNy32

It's hard to tell from this code what the problem is.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question