i use VC++ 6.0 and i have a project with ATL/WTL.
the following code DO work fine in debug.
but, in relese, it DO NOT work.
======================================================================
// "imglist" is CImageList and is public member of class "CMyView".
HINSTANCE hinst = _Module.GetResourceInstance();
HICON hIcon;
ATLASSERT( imglist.Create(16, 16, ILC_COLOR16|ILC_MASK, 1, 1) );
hIcon = ::LoadIcon(hinst, MAKEINTRESOURCE(IDI_ARROW0));
if (imglist.AddIcon(hIcon) == -1) // <- runtime error in release
MessageBox(_T("error"), _T(""), MB_OK);
=======================================================================
in debug mode, this code work well.
on the other hand, why do not this code work in release ???
what is wrong ??
help me.
thanx.