Repeated Loading Of Bitmaps

I need to load bitmaps at runtime, and it seems I can only use the
following code once:

VERIFY(m_bmp.LoadBitmap(IDB_CARD));
m_pic_1.SetBitmap(m_bmp);

If I try in a second loop, I get an error.  Do I have to re-initialize
m_bmp?

Thanks,

Matt
0
bonmatt10 (51)
2/14/2004 4:37:34 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
449 Views

Similar Articles

[PageSpeed] 26

"matt" <bonmatt10@cs.com> wrote in message
news:c2838b8f.0402132037.16f355e5@posting.google.com...
> I need to load bitmaps at runtime, and it seems I can only use the
> following code once:
>
> VERIFY(m_bmp.LoadBitmap(IDB_CARD));
> m_pic_1.SetBitmap(m_bmp);
>
> If I try in a second loop, I get an error.  Do I have to re-initialize
> m_bmp?

I think you probably need to call its DeleteObject member function.
-- 
Jeff Partch [VC++ MVP]


0
jeffp (1712)
2/14/2004 4:45:56 AM
Reply:

Similar Artilces:

Repeating cell-contents
A1 contains "Smith" A53 contains "Jones" A459 contains "Smith" A1072 contains "Peterson" A23405 contains "Smith" A45234 contains "Samantha" What formula can I use to put: "Smith" in B1 thru B52 blanks in B53 thru B458 "Smith" in B459 thru B1071 blanks in A1072 thru B23404 "Smith" in A23405 thru B45233 blanks in A45234 thru A65536 Thanks, Gary Hi Gary try the following: In B1 enter =A1 in B2 enter =IF(A2="",B1,IF(B1="",A2,"")) and ...

Printing a Repeated Section Messege like "Continued"
Setting the repeated section property in a report (Access 2007) to Yes, writes the section Heading on the next page when the detail section is not complete at the page break. I would like the bottom of the first page to print "Continued on Next Page" and/or the top of the second page to say "Continued from ...)" so the report reader knows the details are part of the previous section on the previous page, and not in an entriely new section of the report. Can this be done dynamically in a report, since some pages naturally break when a section ends and other pag...

picture loading
Catalogue document 220pgs, size 5.5x8.5 saved to CD - opens as it should if using LAPTOP. Above document if opened using HOME PC, following: Open file & all pages load tiled one on top of another. Navigate to another page and the same occurs with a reload of 220 pictures each time and due to varying sizes of pictures thus unable to view each in their entirety. Unable to control or change order of opening sequence of pictures that open and load one on top of another on the 2 open pgs. Are there any settings or changes to make on HOME PC ? Can you influence the sequential order that p...

I cannot load Lotus 123 files with my Excell Office 2003
My Excel program says "cannot load 123 files". What is wrong? Excel doesn't read .123 files. Can you go back to lotus and save to a common fileformat? Dudley wrote: > > My Excel program says "cannot load 123 files". What is wrong? -- Dave Peterson Unfortunately, nothing is wrong--Excel cannot open 123 files. You can try a Google search for file converters, or you can use 123 to convert the files into Excel format, if you have 123. -- tj "Dudley" wrote: > My Excel program says "cannot load 123 files". What is wrong? ...

Repeating rows dont repeat fully when columns also repeat
I am repeating rows 1 through 4 and columns A through D. At least that is what I'm trying to do. On page two, the columns repeat but then the rows do not (beyond columns A through D). Is there a way to make it so that they both repeat? In re-reading the above, I'm not sure I'm making myself clear. Assume that XX's represent the repeating rows and ZZ's represent the repeating columns. This is what I'd like to see: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ZZZZZZZZZZZ YYYYYYYYYYYYYYYYYYYYYY ZZZZZ...

EXCEL will not load #2
I am running Windows 98 and Office 2000, and it has worked fine for years. A couple of days ago I started to have some problems. I cannot identify what I may done to create the problems. Friday morning it was working fine when I started work. I then went on to delete some (quite a few) unnecessary files, and ran Disk. defrag. with Norton Systemworks. By about noon I was having trouble loading EXCEL. I got a message that the system was low on recourses. I have 640 MB of Ram, and I can load Word no problem, as well as AUTOCad, a much larger program than both Excel and Word. I have had this ...

random numbers, how can you utilize it without repeating them
How can you use random numbers without repeating them on a worksheet? The way it is set up now is, example: =RANDBETWEEN(1,8) I would like to be able to use the random between but I don't want the numbers to repeat themselves within the worksheet. Any suggestions or Ideas? http://www.mcgimpsey.com/excel/udfs/randint.html -- Regards, Peo Sjoblom (No private emails please) "RS" <RS@discussions.microsoft.com> wrote in message news:75427E72-3EAA-4105-A65B-53F0F1213414@microsoft.com... > How can you use random numbers without repeating them on a worksheet? The >...

repeating cells in footer in excel
I need prepare a form with many lines. In this form I need to provide a footer (with a group of cells) for approvement. Even I can select cells to repeat in every page header there is no such a feature for footers. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http:...

Understanding form loading on Open
1. If I understand properly. For a single form that is set to use as its Record Source a table, it must load all the records in the table before displaying the form. 2. What about form with subforms? Do the subforms do the same or do they only load the data pertaining to the current link child master record? I am interested in trying to optimize a form that has 20+ subforms and is taking 10-20 seconds or so to load. I have read that I should remove the default record source and populate the record source based on my lookup field so it only has to access one record at a t...

Repeats
On one of my worksheets I type the day of the week in the first column, followed by the date in the second column etc. Since the current entry is in line 3,675th when I typed the first letter of the day the rest was completed automatically. E.g. If I typed M then onday followed, as were entries of the same gist in other columns, when the first word of the information was typed. Suddenly this stopped. Why I have no idea, but would appreciate if someone told me how to restore this time and typing savings. Thanks! Tools>Options>Edit, check that Enable Autocomplete for Cell Values i...

My Outlook Mail won't load
Hi. Can somebody respond? When I open Outlook and try to read my mail, nothing will load. I keep getting window asking me to enter my network password (I'm not on a network), under pop.bizmail.yahoo.com, which is pre-filled out and I'm supposed to enter a password in the field under pop.bizmail.yahoo.com. Help and thanks. cathie wrote: > Hi. Can somebody respond? When I open Outlook and try to read my mail, > nothing will load. I keep getting window asking me to enter my network > password (I'm not on a network), under pop.bizmail.yahoo.com, which i...

Load Newsreader in Outlook
How do I add the newsreader to my Outlook menu? I tried following the directions in Outlook 2003, but it told me I could find it in the GO menu and it wasn't there. Thanks. Shannon To get the News command back, go back to the Programs tab in Control Panel | Internet Options and change the default newsreader to Outlook Express. If OE prompts you to make it your default newsreader the next time you launch it, clear the "Always perform this check..." box and then click the No button. You may need to reset the Menu Bar and/or restart Outlook and/or reboot your machine in orde...

Net worth report error; won't load
Hi! Issue: My standard "Net worth" report won't load. Details: I have been running MS Money 2005 small Business. the Error started occurring this last week. I did a file repair (both fast & standard). No effect. I downloaded the MS Money Plus Home & Business Trial to see if that would "fix" it. It did not. I did a fast Furthermore, when i load "Net worth over time" i get this error: "An error occurred, but Money is unable to retrieve and display details about what happened. (Resource = rcreport. Error = 2109" At first the Ne...

allowing for repeating bank entries
Many customers have the same electronic payments coming out of their accounts every month. It would be very helpful if they could create either recurring batches or repeating transactions so they didn't have to do this same data entry every month. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I...

repeat last step #3
THANKS!!! I will try these techs out....and let you know how it goes.. -- alexshield ----------------------------------------------------------------------- alexshields's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1404 View this thread: http://www.excelforum.com/showthread.php?threadid=26487 ...

Get values from another sheet (was: Load certain values with opening a file)
In another post I asked for a way to get standard values in a spreadsheet everytime the sheet is opened. I got a good answer, but i want to do more: This is the trick that does it for now: ---------------------------------------------------------------------------------- >On Thu, 2 Nov 2006 10:18:01 -0800, Gary''s Student ><GarysStudent@discussions.microsoft.com> wrote: >Paste something like this in workbook code: > >Private Sub Workbook_Open() >Sheets("starron").Activate >Cells(1, 1) = 42 >Cells(2, 1) = 4 >Cells(3, 1) = 54 >Cells(4, 1) = ...

Error when loading the CRM Reports overview
hi, Somthing strange happened; I was creating reports (with subreports) in Visual studio 2005 and uploaded them to CRM with the new report wizard. Everything was working fine, I could use the prefiltering, call subreports , you name it. After that, I had a lot of subreports that I wanted to categorize in a diferent group so the users don't see this immediatly. I created a new report category via the system settings. First strange thing was that when I saved this new category en reopened the system settings dialog, I got an error which was resolved by performing an IIS reset. After...

repeat if
There are two columns A1:A25 and B1:B25. The information in column A are dates. The information in column B are descriptions of activity performed on the date in the adjacent cell. If the same date is inserted into A1, A2 and A3 can the description manually typed into B1 be automatically added to B2 and B3? Added based on repeated and grouped cells in column A. Regards, Gary Try this in B2, and copy down as needed: =IF(A2=A1,B1,"") -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup...

Repeat DVD
I have a DVD with just one title only 8mins long. I wish to play it continuously on my laptop, but cannot configure WMP to do this. Is it possible? ...

Repeated values in form fields.
I have created a long legal form template for our workers. Data the worker enters in the beginning of the form has to be entered in several other places in the document. An example is the defendent's name. It currently has to be entered 7 times into fields on the form. Is there a way to have the six lower fields take the information from the first field where the data is entered. If I can figure this one out, I'll save dozens of worker hours per year. Thanks, Lee -- Lee S. See item 2 "On Line Form" in the article at http://gregmaxey.mvps.org/...

Text repeating on multiple worksheets
I have an file with approximately 10 worksheets. I am finding that cells A:29-A:31 from one of my worksheets is repeating on all of the worksheets and overwrite existing data (when they shouldn't). The same thing happens with cell C:28. I don't believe I've set anything to do it automatically and when I print it, it's ok. But when I save it and come back the next day, the data appears. It started on day 1 with C:28 and now it has moved into repeating the A cells as well. Help! What am I doing wrong? Thanks! Angie Check the content of cells A29:A31 and C28 on the ...

tasks keep repeating
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Email Client: pop Certain tasks in my todo list repeat multiple times. For example I may have a task called &quot;go shopping&quot; with a due date etc... The next day there will be 2 tasks called &quot;Go Shopping&quot;. Exactly the same information. If I mark one as completed or delete it eventually a second one will appear. if I do nothing, eventually a third one will appear. There doesn't seem to be a set pattern. It could repeat daily or every other day. it just doesn't make any sense. <br&...

Account, Etc. wont load - 404 Error
We're using a Cisco VPN with a WebVPN client. The application loads but has 3 problems: 1 - The top menus (Tools/etc.) loose there color and font but work ok. 2 - The pulldown arrow icons are X'd out - Do Not show. All other icons are fine. Where does this one come from? 3 - The Sales -> Account/Contact/Lead/etc. screens (within the Sales page surround) return a 404 error - Not Found. The page is looking at the VPN proxy and not the CRM server for these pages hence Not found. srd party apps - ie. c360, etc work fine. What could be wrong in these 2 problems? What might...

How do I set up a random Colum 1-55 without repeating a number
From your subject line: Re: How do I set up a random Colum 1-55 without repeating a number (Note that you should always write the full query within the message area) One interp & way to set it up .. Put in A1: =ROW(A1) B1: =INDEX(A:A,RANK(C1,$C$1:$C$55)) C1: =RAND() Select A1:C1, copy down to C55 B1:B55 will return a random shuffle of the numbers 1 - 55 from col A (Replace the formula in A1:A55 with whatever 55 items that's to be shuffled) Press F9 to regenerate afresh -- Rgds Max xl 97 --- Singapore, GMT+8 xdemechanik http://savefile.com/projects/236895 -- "B.J" <B...

loading music to archos mp3
hi after loading music files from pc to mp3 player when try to play music on mp3 the words no authority come up on screen how do i fix this thanks ...