473,385 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how do I get a Resource ID of a CBitmap?

I want to use CBitmapButton. This class knows the function LoadBitmaps
to set a bitmap in a button.

The problem is that LoadBitmaps is asking for a Resource ID.
I have loaded the bmp file in CBitmap, but how do I get this Resource
ID now???

please help

//loading the file 'test.bmp' in CBitmap:
CBitmap bmp;
BITMAP bitmap;
BITMAP bits;

m_pHBitmap = SHLoadDIBitmap("\test\test.bmp");
bmp.Attach(m_pHBitmap);
bmp.GetBitmap(&bitmap);

//now load the bitmap, but this doesn't work!
CBitmapButton::LoadBitmaps(bmp.GetBitmap(&bitmap), 0, 0, 0 );
Jul 22 '05 #1
1 2663
On 4 Dec 2003 02:58:17 -0800, ma**@pcamobile.com (mark) wrote in
comp.lang.c++:
I want to use CBitmapButton. This class knows the function LoadBitmaps
to set a bitmap in a button.


Then you need to ask in a Windows group like
news:comp.os.ms-windows.win32.programmer. These things are not part
of the C++ language, the topic here.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Danny Pressley | last post by:
I have a VS.NET 2003 Visual C++ MFC Application Project in which I added a new resource file, I then added an icon to this new resource file and did a rebuild and got the following error: "fatal...
2
by: Amir | last post by:
Hey, I'm working on an IE toolbar and I need to load a CBitmap from a bitmap file's internet address. I get the URL of the image from a mySQL lookup, but is there a way I can load the CBitmap with...
5
by: John Perks and Sarah Mount | last post by:
When handling resources in Python, where the scope of the resource is known, there seem to be two schools of thought: (1) Explicit: f = open(fname) try: # ... finally: f.close()
0
by: Johann Blake | last post by:
I'm having trouble grasping how ASP.NET correctly locates resources. There is plenty of documentation on this subject but some things are not clear at all. In my ASP.NET application, I have...
4
by: Newbie | last post by:
Hello everyone, i'm new to windows programming in C++. I have to display a 2-D array as a bitmap. I tried to compile the following code..but the compiler doesnt identify the CBitmap class...can...
7
by: craig | last post by:
....quick question for anyone who might have some experience with .net resource files in VS 2003. I have an application that is not localized, but I would still like to be able to place all of...
13
by: Bob Jones | last post by:
Here is my situation: I have an aspx file stored in a resource file. All of the C# code is written inline via <script runat="server"tags. Let's call this page B. I also have page A that contains...
0
by: kenneth6 | last post by:
I am preparing a dialog-based MFC application. I want to show the CBitmap object created after processing on the windows dialog. Should I show it to DC or the picture control?? Which one is practical...
12
by: TS | last post by:
i have a need to possibly enable mutli language support. What benefit do i get by using a resource file instead of a custom xml solution? thanks!
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.