?
Solved

bitmap in the file

Posted on 1998-12-10
2
Medium Priority
?
179 Views
Last Modified: 2010-04-02
I must load bitmap from file ***.bmp

    CBitmap pBitmapLib = new CBitmap();
    pBitmapLib->LoadBitmap("class_lib.bmp");

 Function CBitmap::LoadBitmap returned 0.
I also tryed to use a full path, but I got same result.
Whot can I do whis this problem.
My platform: Windows NT, VC++ 5.
0
Comment
Question by:atkach
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
pagladasu earned 400 total points
ID: 1179816
Use the Win32 API  LoadImage()
HBITMAP m_hBitmap;
m_hBitmap=(HBITMAP)::LoadImage(
      NULL,"Dance1.bmp",IMAGE_BITMAP,
      0,0,LR_LOADFROMFILE|LR_DEFAULTSIZE);  
CBitmap *mbmp=CBitmap::FromHandle(m_hBitmap);

Now you can use mbmp to refer to that bitmap.

Thanks
pagladasu
0
 
LVL 1

Expert Comment

by:V245
ID: 1179817
Is it true: "Windows NT: LR_LOADFROMFILE is not supported" ?
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question