Thread: 256-Color Bitmap in MFC Resource :: Doesn't Load Right

  1. #1
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Unhappy 256-Color Bitmap in MFC Resource :: Doesn't Load Right

    Hey there, and thanks for reading. I am on the Windows 2000 Professional operating system, and I use MS Visual C++ 6.0 Standard. I am making a level editor application for a game that I have worked quite a bit on. I want to copy-paste a 256-color bitmap from PaintShop Pro 7 into the bitmap resources. I got the grass in just fine, but I can't get the dirt terrain tile in correctly. No matter what brown colors I use, it always distorts the colors when I compile it. I have the colors set to 256. On the right side, where the color palette is, it still has the normal 16 colors. How would I get this to work? Please help me if it's possible.

    Thanks a lot,
    Matt U.

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Not 100% sure of MSVC v6 but in .NET 2003 MFC can not use 256 colour bitmaps for icons or toolbars ect (WIN32 can but then you have to write your own handlers).

    As for other resources they can be stored as 256 colour but may appear as 16 colour in the editor. Try loading one and selecting into a HDC for display.

    I write all my image stuff in WIN32 not using any of the MFC for this reason.

    >>copy-paste a 256-color bitmap

    Try adding an existing bmp file to resources as the bmp you create in the editor might be 16 colour.

    >>No matter what brown colors I use, it always distorts the colors when I compile it.

    Can you see the correctly coloured bmp in the editor before building?




    the other way is to load from disk...........
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  3. #3
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Lightbulb I know what I will do ...

    Thanks for the reply. I think will just load them from my harddrive. It will be much easier than using resource, IMO. Thanks again!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. MFC MDI Load New View
    By jmw_misc in forum C++ Programming
    Replies: 0
    Last Post: 02-06-2009, 03:30 PM
  2. CreateDialog fails (Using resource but not MFC)
    By skiingwiz in forum Windows Programming
    Replies: 5
    Last Post: 03-03-2005, 06:04 PM
  3. Can't load string from resource DLL's string table
    By s_k in forum Windows Programming
    Replies: 4
    Last Post: 07-15-2003, 06:43 AM
  4. WIndows programming?
    By hostensteffa in forum Windows Programming
    Replies: 7
    Last Post: 06-07-2002, 08:52 PM
  5. How-To: Load Pictures in MFC. Code Inside.
    By Xei in forum C++ Programming
    Replies: 1
    Last Post: 05-16-2002, 09:17 PM