resource file problem

This is a discussion on resource file problem within the C++ Programming forums, part of the General Programming Boards category; Well i am using msdev and i have made a recource file with bmps in it When i try: img.LoadBitmap("BOX_BG"); ...

  1. #1
    Registered User cfrost's Avatar
    Join Date
    Apr 2004
    Posts
    119

    resource file problem

    Well i am using msdev and i have made a recource file with bmps in it When i try:

    img.LoadBitmap("BOX_BG");

    where BOX_BG is id of my image but it does not work why???
    i m using mfc and imd is of CBitmap data type

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Try using MAKEINTRESOURCE( BOX_BG ) instead of "BOX_BG".
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 01:44 PM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 01:13 AM
  3. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  4. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 10:46 AM
  5. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 08:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21