RGB macro
-
m_imageList.Create(16,16, ILC_COLOR | ILC_MASK, 4, 0); CBitmap bm;bm.LoadBitmap(IDB_BITMAP1); m_imageList.Add(&bm, RGB(255, 255, 255)); // error here bm.DeleteObject(); bm.LoadBitmap(IDB_BITMAP2); m_imageList.Add(&bm, RGB(255, 255, 255)); // error here the code above can't work. i copied this from a sample cod in the MSDN library but it just doesn't work! it gives the error: "error C2064: term does not evaluate to a function" did i forget to include some header file? it says in the MSDN that I have to include "windows.h", where do i include this file? or has it already been included?
-
m_imageList.Create(16,16, ILC_COLOR | ILC_MASK, 4, 0); CBitmap bm;bm.LoadBitmap(IDB_BITMAP1); m_imageList.Add(&bm, RGB(255, 255, 255)); // error here bm.DeleteObject(); bm.LoadBitmap(IDB_BITMAP2); m_imageList.Add(&bm, RGB(255, 255, 255)); // error here the code above can't work. i copied this from a sample cod in the MSDN library but it just doesn't work! it gives the error: "error C2064: term does not evaluate to a function" did i forget to include some header file? it says in the MSDN that I have to include "windows.h", where do i include this file? or has it already been included?
Compiles fine on my PC. Are you *sure* this is exactly as it is on your screen, and that this is the error ? You wouldn't have got this far without windows.h - you get all that stuff for free if you used a wizard to create your project. If for some reason you've 'lost' the RGB macro, just pass 0xFFFFFF as the parameter, that's where you're headed in any case ( or maybe it's oxFFFFFF, in any case a value here should compile if the problem is something bizarre with RGB ) Christian #include "std_disclaimer.h"