Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. RGB macro

RGB macro

Scheduled Pinned Locked Moved C / C++ / MFC
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hearties
    wrote on last edited by
    #1

    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?

    C 1 Reply Last reply
    0
    • H hearties

      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?

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      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"

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups