Save a CBitmap to disk, possible?? pleeze help!

i dont know how to do this!!! 
i know i can attach it to a CImage and then save it, but 
is it also possible in another way??

thanx !
0
spectools (4)
9/19/2003 7:00:44 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
1398 Views

Similar Articles

[PageSpeed] 13

I don't believe that a CBitmap is actually connected to 
any bitmap really. If you were to serialize it, you'd just 
end up with a couple of member variables and maybe a 
pointer to where the data was at one time.

I think what you need to do is call the GetBitmapBits 
function and save all of that data, then upon restore 
recreate the CBitmap with SetBitmapBits.

>-----Original Message-----
>i dont know how to do this!!! 
>i know i can attach it to a CImage and then save it, but 
>is it also possible in another way??
>
>thanx !
>.
>
0
ricardo (21)
9/19/2003 7:31:27 PM
You should be able to  use GDI+. See if Image::Save would work for this.

--
Ajay Kalra [MVP - VC++]
ajaykalra@yahoo.com


"andreas" <spectools@gmx.net> wrote in message
news:0fe401c37ee0$541a2700$a001280a@phx.gbl...
> i dont know how to do this!!!
> i know i can attach it to a CImage and then save it, but
> is it also possible in another way??
>
> thanx !

0
ajaykalra (6842)
9/19/2003 7:40:42 PM
..bmp file has many formats.  These are the three basic sections.  MSDN has
good help on each of these.

First - BITMAPFILEHEADER
Second - BITMAPINFOHEADER
Third - CBitmap::GetBitmapBits()

-Kanon

"Ajay Kalra" <ajaykalra@yahoo.com> wrote in message
news:e0QWdXufDHA.944@TK2MSFTNGP11.phx.gbl...
> You should be able to  use GDI+. See if Image::Save would work for this.
>
> --
> Ajay Kalra [MVP - VC++]
> ajaykalra@yahoo.com
>
>
> "andreas" <spectools@gmx.net> wrote in message
> news:0fe401c37ee0$541a2700$a001280a@phx.gbl...
> > i dont know how to do this!!!
> > i know i can attach it to a CImage and then save it, but
> > is it also possible in another way??
> >
> > thanx !
>


0
Kanonw (36)
9/19/2003 8:14:55 PM
Reply:

Similar Artilces:

Is it possible to set a slide transition that mimics turning page
I've been asked for help in setting up a PPT presentation to have slide transitions that mimic turning pages. I have seen this done using Keynote on a Mac but the software being used for this presentation is PowerPoint. Any ideas on if this is available or where I may find a download to add to my library? Thanks. MaryAnn PowerPoint 2007 The setting I use to achieve that is:- Animations tab / Transitions to This Slide group / Wipes / Strips Left-Up If my comments have helped please hit Yes. Thanks. "MeyerMA3" wrote: > I've been ask...

Help with conditional formatting with 2000
Any help would be greatly appreciated. I am trying to group data together into increments of 10% of th numbers and then chart them based on these groups. For example, I hav 300 data points that vary from 20 to 500 in value. I want them t appear in a chart based on the number of values that fall in the lowes 10% of numbers (ie. 20-40) then the next 10% (ie. 40-60) etc. up to th top 10% of numbers, but I do not want to manually determine what thes ranges are. I want to see a distribution of how many numbers fal within each 10% of values. I am not sure if this makes sense, please let me know...

Help! Setfocus problem
i ave a dropdown field on the first tab. I use setfocus so that it selects a different field to stop users scrolling down and changing the selection on the load event. Problem When a user changes tab and come back to the origional tab the setfocus doesnt run as the form is already loaded. How do you get around this? This is driving me and users mad at minute...please help before i open another bottle of dark rum! Hi Brian, Check out following URL; how to fire onclick event on tab click. It may help you. http://crmrocks.net/?p=16 -- PLEASE do click on Yes or No button if this post wa...

Please Help!!
I am having problems restoring a backup money file from my cdrw disc. I recieve the error that it can't open possibly because it is a read only file or you do not have permission to change it or your disk drive is write protected. I have never had this problem before. I have restored files from my cd backup 3 times before without a problem. Please help!!!! Restore the file to writable media - your hard drive. If you still can't open it, right-click on the file in its new location, choose Properties from the context menu, and remove the check from the 'read-only' box. -...

You wont believe this! SERVER DOWN
I was helping the operations/it director to get RPC over HTTP going on their exchange server for a company I use to be the sys admin for. The ops/it director was doing the add/remove programs portion to add rpc over http there, somehow in the process of doing this he managed to uninstall IIS -or- just NNTP and SMTP (I can't figure out which and he claims he did neither). Long story short, I've reinstalled NNTP and SMTP, reconfigured SMTP to the best recollection I have of the previous config and the server still refuses to send/receive email, even internally. All services are s...

!!HELP!!! Cannot connect to Exchange Server from a RDP, ICA session or server local machine
Please excuse the posting as I wasn't sure which group to post this in. I'm having issues using Outlook from a server desktop, an RDP or ICA connection. I have remote users who connect using Citrix. They logon to the Citrix server desktop (Windows 2003 Server) and use Outlook from there. They can also use Outlook from within Citrix as it is a Published Application. I know some of you are going to suggest why don't they use OWA but let's not get into that. I can log onto any workstation here in the office and connect to the Exchange server and open their Outlook. What I and they...

Possible to send email directly to a folder?
I know I've seen this done but I cannot remember how to send email to a folder by using its address in the CC: block.... When sending email, how can I also include the "address" of an OL folder in one of my open PSTso it automatically receives a copy of the email (much like Sent Items)? How about to my OL folders in my Exchange server? I have some templates filled with about 90% of what I have to send on a recurring basis, and preconfiguring the folder where I copy these (ffor later reference) would save me some work. I can swear I did this before but cannot find it now. TI...

Is it possible to generate non-technical schema validation errors?
With the 1.0 Framework, I've worked out using the XmlValidatingReader. Since I'm using the validation errors as feedback to the end user, I'm hoping to get away from techy messages such as "The 'http://tempuri.org/XMLFile1.xsd:MaxDependents' element has an invalid value according to its data type. An error occurred at file:///c:/work/prodika/main/code/apps/schemavalidation/XMLFile1.xml(8, 25)." and go with a user friendly message of "Max Dependents must be between 0 and 10". I've scoured the newsgroups, MSDN and docs for creating custom valid...

Internet connection problem
Hi. I hope someone is able to cast some light on a problem. We have a home network (all computers running XP) some wired and some wireless. For about a month now we have intermittent connection problems in that any one computer (randomly) will not connect to internet. I think all of the computers have suffered from the problem. Rebooting the affected computer makes no difference but rebooting the router can sort it until the next time. Even my mobile phone occasionally cannot connect. In Firefox the message is just "server not found". Pinging an IP address results in a time...

Save options and paths in vars
Hello! At the moment I'm writing a small backup script with robocopy. Robocopy offers serveral parameters. For example: /XD exclude file list /XF exlude dir list /MIR Mirroring options Within my backup script, all exclude files and dirs are stored in an seperate variable: For example: $excludeFiles = "UsrClass.dat " + "UsrClass.dat.LOG1 " + "UsrClass.dat.LOG2 " + "ntuser.dat " + "ntuser.dat.LOG1 " + "ntuser.dat.LOG2" At the end of my script I'm using all my prepared va...

O2003 New Toolbars Saved Where?
I have XP with O2003 on one computer. Just got a new computer with W7 and installed O2003. I copied over the "outcmd.dat" file and I can see my data (e.g. views) so I know its using the correct "outcmd.dat" file. However two custom toolbars I created are not shown nor are they in the customized toolbar list. Are custom toolbars saved in a different location? Thanks Shawn On Jul 24, 6:22=A0pm, srm <s...@primatech.com> wrote: > I have XP with O2003 on one computer. Just got a new computer with W7 > and installed O2003. I copied over the "outcmd.dat" ...

Mailbox needs reducing
We have this mailbox that has been left for months and with no limits, it's now 11GB!! Ho can I trim in down, I don't really want to go into the mailbox and do it, can Exchange do it? In news:euNRN1iPHHA.404@TK2MSFTNGP02.phx.gbl, Gonzo <no@no.com> typed: > We have this mailbox that has been left for months and with no > limits, it's now 11GB!! > > Ho can I trim in down, I don't really want to go into the mailbox and > do it, can Exchange do it? Presuming you're not on 5x or earlier, you can use mailbox management policies to get rid of items ol...

Problems opening/saving attachments
I am unable to open or save any .rtf file attachments - this started happening today, previously there were no problems with .rtf files. When I try to open such an attachment I get this message: Can't create file: xyz.rtf Right click the folder you want to create the file in, and then click Properties on the shortcut menu to check your permissions for the folder. What folder is this? I am trying to open the attachment not creat the file! Also, when I try to send an rtf file as an attachment, in the email message the file does not show in the attachments section but the receipient actu...

I need help restoring Public Folders
Hi I've been having issues getting Public Folder replication going between 2 Exchange 2003 servers. Prior to doing any work I performed a Backup using Veritas Backup Exec and this completed and verified correctly. I screwed things up and managed to delete some of the public folders on my original server. I'm not 100% sure what I did but it is a mess and the only backup I have is the Exchange backup I created before doing any work. The public folders contain a number of Contact Lists and a very important Event Calendar. I have restored the public folders but when the restore c...

Saving address to replyed emails
IN outlook express I could automatically save the email address when I replyed to an email. I want to be able to do this in outlook 2002 Can some please help Not possible. You will need to right click on the address and select to Add to Contacts. -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Having searched the archives, Garth <smilepolice@hotmail.com> typed: | IN outlook express I could automatically save the email | address when I replyed to an email. | | I want to be able to do this in outlook 2002 | | Can some please help ...

Help with Synchronizing a user folder with a Public Folder
Hi: Hoping that someone can offer a suggestion on this one. I'd like to be able to synchronize an email folder in a particular users' Outlook account with a public folder. The idea is to have email conversation threads in a particular folder (just one folder) visible to others in the group via the public folders. Ideally, it would be great if changes to the public folder are instantly mirrored in the users folder - but that requirement is not critical, the core requirement is to have the public folder mirror the user's folder (in real time). I know that I could accomplis...

Need help on a formula 05-20-10
I need a formula to calculate the following information please: I will have someone enter a time (ex 6:31) in cell C3. If the time matches one of the times in cells B17-B22 I need it to display 4.6, if it matched one of the times in cells B23-28 I need it to display 4.7, if it matches one of the times in cells B29-34 I need it to display 4.8 and so on. Does anyone have a simple formula I can do for this please? =IF(COUNTIF(B17:B22,C3)>0,4.6,IF(COUNTIF(B23:B28,C3)>0,4.7,IF(COUNTIF(B29:B34,C3)>0,4.8,"no match"))) Can't do the "and so on" part, bu...

Terminal Servers in Cluster - Login/Profile Issues
Hello Gurus, Currently I am having an issue with logins and profiles as per details below. Server/Network Configuration Details: 1 X Windows Server 2008 Std FE 64bit (DC) 2 X Windows Server 2008 Ent 32bit Terminal Servers User Profiles are Roaming and exist in: \\SBSERVER\Profiles on the Domain Controller and C:\Users\ on the Terminal Servers. Approx 50 users. Problem Description Error messages when logging in the terminal servers: Your roaming profile is not synchronized correctly with the server. Windows will load your previously-saved local profile instead. See the pre...

Email Text Dissappears when Save
When we save email messages (as a draft) the text dissappears, even when th I use my administrator account. Anybody have any idea what that is happening. ...

WM_QUERYENDSESSION and saving data through a worker thread
Hello I have an application that uses a worker thread to save/load data. I'm wondering what is the best reaction to WM_QUERYENDSESSION in my case. I have to possible scenarios: 1. When WM_QUERYENDSESSION comes fire the thread and wait for it to end. Only then return TRUE from WM_QUERYENDSESSION handler. The problem is that I will get nusty dialog that my application "is not responding". 2. When WM_QUERYENDSESSION comes fire the thread and return FALSE from the handler. When thread is done force application to end. But this way I will probably prevent Windows from closing,...

RMS 2.0 matrix dimensions are annoying, but help is available
For reasons I don't understand, MS saw fit in RMS 2.0 to use dimensions data for matrix components that is far less accessible to users than Sub Descriptions are. For instance, I can't edit assign a dimension value to an existing item I have added to a matrix. I can't see a reason for using Dimensions with limitations like this as using Sub Descs. to describe matrix "dimensions" worked fine previously. Does anyone know why MS did this? It's annoying! Digital Retail Solutions (DRS) has a product called Power Ops (Build 2.2.0003). It's help file mentions (se...

Help-- Having trouble opening Word & Entourage
I have to keep restarting my computer to be able to open Word or Entourage. The icons just bounce a little but won't open. I was getting a request from Entourage to rebuild the database which I did about 6 or 7 times. I got another warning which I ignored. I am on a MacBook Pro (Intel based). I am using office 2004. My Entourage database is 3.2 gb. I ran Disk Utilities a couple of times. I also had a problem a couple of times with FileMaker Pro but not sure if related. Thanks Christina On 22/8/06 20:01, in article 1156273266.788654.318170@i42g2000cwa.googlegroups.com, "...

Excel Formula Help
I am setting up a basic excel spreadsheet and really have got no experience with excel. I want to do something real basic like if A2=laptop display $10 or if A2=desktop display $20 how do I do this? I think that if the list of options is more than a just a few, a =vlookup() function would work nicely. It may seem a little complex to start, but once you use it, you'll find tons of more reasons to use it. Debra Dalgleish has some nice instructions at: http://contextures.com/xlFunctions02.html BadSector wrote: > > I am setting up a basic excel spreadsheet and really have got no...

save accounts similar outlook express
How I save account POP mails configurations in Outlook 2003 similar ao outlook express? thanks Marina Using the office save my settings wizard or a 3rd party program. http://www.slipstick.com/config/backup.htm#accounts -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Other Search Engines (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Join OneNote Tips mailing list: http://www.onenote-ti...

Outlook saves image attachment as bitmap
Hi. I have Outlook 2003 running on Windows XP. When I save an image attachments, it only allows me to save it as bitmap. Before, it used to let me choose between bitmap & jpeg. I found an article on Microsoft's website, but it only pertains to Internet Explorer (http://support.microsoft.com/?kbid=810978#appliesto). I did it anyways, but it didn't correct my problem. Thanx in advance, Candee ...