Save bmp to file

I want to grab a bmp off the windows clipboard and then save it to a
file on disk.  How do I go about doing this?
Thanks!
Paul

0
3/23/2005 5:50:20 PM
vc.mfc 33608 articles. 0 followers. Follow

4 Replies
574 Views

Similar Articles

[PageSpeed] 22

Take a look at CImage, it has the capability to Load and Save BMP, JPG, PNG,
and GIF files.

AliR.

"NewbProgrammer" <paul_kiefer@hotmail.com> wrote in message
news:1111600220.894678.162340@g14g2000cwa.googlegroups.com...
> I want to grab a bmp off the windows clipboard and then save it to a
> file on disk.  How do I go about doing this?
> Thanks!
> Paul
>


0
AliR1 (391)
3/23/2005 5:55:36 PM
You can use GDI+ to save the file after transferring data from
clipboard. Following class will all of it for you except that GDI+ may
be easier for saving the file.

http://codeproject.com/bitmap/cximage.asp

--------
Ajay Kalra
ajaykalra@yahoo.com

0
ajaykalra (6842)
3/23/2005 7:11:37 PM
for grabing the data from clipboard you have to use
these apis [IsClipboardFormatAvailable] [OpenClipboard] [GetClipboardData]
or you can read this article for get more info about these api's
http://www.thecodeproject.com/clipboard/clipboard_faq.asp
http://www.thecodeproject.com/clipboard/archerclipboard1.asp

and for saving the Picture file into computer, you can use light weight
[IPicture] interface


this article also perfrom similar task as you quoted to transfer the image
from Clipboard and save to file:-

http://www.thecodeproject.com/gdi/barry_s_screen_capture.asp


--

With Regards
Alok Gupta
Visit me at http://alok.bizhat.com

                           "I Believe this will Help"


"NewbProgrammer" <paul_kiefer@hotmail.com> wrote in message
news:1111600220.894678.162340@g14g2000cwa.googlegroups.com...
> I want to grab a bmp off the windows clipboard and then save it to a
> file on disk.  How do I go about doing this?
> Thanks!
> Paul
>


0
thatsalok1 (226)
3/24/2005 5:11:55 AM
In MSDN, there is an example, which creates a bmp file from HBITMAP.
Location:
Graphics and Multimedia ->  Windows GDI -> SDK Documentation -> Bitmaps ->
Using Bitmaps -> Storing an Image.

Regards
VSP

"NewbProgrammer" <paul_kiefer@hotmail.com> wrote in message
news:1111600220.894678.162340@g14g2000cwa.googlegroups.com...
> I want to grab a bmp off the windows clipboard and then save it to a
> file on disk.  How do I go about doing this?
> Thanks!
> Paul
>


0
3/24/2005 11:13:18 AM
Reply:

Similar Artilces:

Save attachment if email is from joe
I need to save an attachment to a specific network drive/folder if an email comes from a specific person. I know som excel vba but nothing in access, can u guys help me out? Thanks!~ You can create a rule in Outlook to run a script that might look like this: Public Sub SaveAtt(Mail as Outlook.MailItem) Dim Att as Outlook.Attachment If Mail.Attachments.Count Then Set Att=Mail.Attachments(1) Att.SaveAsFile "c:\" & Att.Filename Endif End Sub -- Best regards Michael Bauer - MVP Outlook Category Manager - Manage and share your categories: SAM ...

How do I import.DBX files?
I backed up my Outlook 2000 folders (.DBX) files. Now with a fresh install of Office, how can I import these folders in to Outlook? "Geary Boulrice" <boulrice@sonalysts.com> wrote in message news:8b9201c432b8$838f14a0$a601280a@phx.gbl... > I backed up my Outlook 2000 folders (.DBX) files. Now > with a fresh install of Office, how can I import these > folders in to Outlook? Outlook 2000 does NOT use dbx files. What you had was outlook EXPRESS. To import these files into OUTLOOK, you need first to import them into Outlook EXPRESS and then either export to OUTLOOK o...

Now what, unable to undo read only files on F:\drive
New computer with Office 2003, In Excel all new documents saved to the server drive are "read-only". When I go into properties of any folder in the "F" drive it is "read-only" and will not let me change it. Spreadsheet needs to be updated and saved as new month but Excel will not let me do this. Any suggestions? ...

Updating information in 1 file when it is added to other files
I have 9 Spreadsheets consisting of contact information for publications in different industries. 8 Industries and 1 Master List. I would like to link the master list to all of the individual industry lists so that when I add or update a new contact in an Industry list, it is reflected in the Master Spreadsheet as well. Essentially, I want to cut down on duplicating my efforts. Check out the copy paste merge examples... http://www.rondebruin.nl/tips.htm -- HTH... Jim Thomlinson "Kyle" wrote: > I have 9 Spreadsheets consisting of contact information f...

Linking to a file from a report
Total newb here. I want to have a link to a PDF file from a report. In theory the file name will be different for each record. Each record has a field for file name whether or not there is a file available (blank or null). All the files are in the same folder. If I understand correctly, the path needs to be stored in the table holding the file name. I have different users entering the data in a form but I don't want them to have to enter in the file path, just the file name. Also, I don't want the file path displayed on the report, just the file name. Is this done with a...

Set default application to open some kind of file
Hi group, How can i set the system to open all .doc files with word?: Thanks, Rodolfo Fontes Get Info (Command-I) on a .doc file. Set the default to open with Microsoft Word. Now all .doc files should open into Word when double-clicked. -Mark "Rodolfo Fontes" <rodolfofontes@yahoo.com.br> wrote in message news:OxsCGSdcFHA.2696@TK2MSFTNGP09.phx.gbl... > Hi group, > > How can i set the system to open all .doc files with word?: > > Thanks, > Rodolfo Fontes > ...

Programaticly / Automaticly save email attchments in exchange
I am looking for a soultion on how to automaticly save (detach) email attachments sent to a specific email address(mail box). The action would talke place on the exchange server when the mail arrives and would be put into a specific directory Can this be done with a script? Can this be done with VBA? If so, may I have a code sample. I apreacete you help. Regards, Peter ...

how to combine & split xml files with xslt?
How to combine multiple xml files into a single one, or split an xml file into multiple files using xslt? Knighterrant wrote: > How to combine multiple xml files into a single one, or split an xml > file into multiple files using xslt? Combine is easy, just use document() fucntion to load additional XML documents. Splitting is a bit harder. See "Producing Multiple Outputs from an XSL Transformation" at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexxml/html/xml06162003.asp -- Oleg Tkachenko [XML MVP, MCAD] http://www.xmllab.net http://blog.tkachen...

Right Click "Save Target As" Doesn't Work In Outlook
When I try to download a file that's part of the body of text in my email... it doesn't allow me to do anything. When I right Click over the link "Save Target As" never appears. All I see is "Select" "View Source" "Edit Message". Any suggestions on changes I can make to correct this? Thanks Jay ...

cannot open .xls files
Dear all, I am using MS Office XP. I am experiencing a problem when opening .xls files by double-click on them. After I double-click the files, the Excel problem is running but there is no .xls file opened. Although I can still open the file with command open in Excel, it is uncomfortable that double-click is not working. Can anyone tell me how to solve the problem? Thank you in advance. Best Regards, Thomas This is a multipost. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Thomas Lau" <thomaslau@FAKE.hotmail....

Cannot open a pub file
I created a file in publisher 2007 and have been adding to file several times. I tried to open the file today to continue adding more text to it and suddenly I find that I can not longer open the file. I also tried publisher 2003 and 2007 in another computer with the same result. Please help! Are you using the same printer? How to troubleshoot a damaged publication in Publisher http://support.microsoft.com/default.aspx?scid=kb;en-us;198256 -- Mary Sauer http://msauer.mvps.org/ "C Wong" <C Wong@discussions.microsoft.com> wrote in message news:10CA349A-4FB5-426E-9BA3-...

How to get an excel doc not saved as "Read Only"
I'm trying to figure out why my Excel doc saves as "Read Only". Is there something I can do to prevent this in the future? Try File>Properties>General tab and see if Read Only is checked. -- Sincerely, Michael Colvin "bunbarn" wrote: > I'm trying to figure out why my Excel doc saves as "Read Only". Is there > something I can do to prevent this in the future? Some additional items to work through: Read-Only in Excel, Problems with http://www.mvps.org/dmcritchie/excel/readonly.htm --- HTH, David McRitchie, Microsoft MVP - Excel ...

Data was deleted and saved by mistake..need to go back
I need to go back to the data before it was saved, can anyone help Richard don't get your hopes up. Unless you have a copy or a backup ... it's gone. Regards Trevor "Richard" <anonymous@discussions.microsoft.com> wrote in message news:1084801c3bea6$222d5270$a601280a@phx.gbl... > I need to go back to the data before it was saved, can > anyone help ...

Works 9 Word Processor Opening Older files
Hi I have Vista Home Premium and Works 9 Suite I am unable to open older Word documents in Works 9, I believe they are Word 2003 files. Message says 'there is not enough memory to open file' This is a new pc and has more than enough memory to open an 88kb document so it must be a conversion problem but what and how I resolve it is a mystery to me. I have tried opening in Wordpad and Notepad and although I can see some words that are in the document it is not readable. Any suggestions please? Did you install the Word component of Works Suite or ...

how can i lock a sheet in an excel file????
I made an excel of 5 sheets and i want to send it to all my employees, but I dont want them to have axces in just one sheet....Can I lock this sheet with a password??? you have a few options: 1. you can hide the sheet. 2. you can password protect the sheet with a password, on the review tab in excel 2007, tools/protection in 2003 3. you can limit the access to just cell a1, for example. alt-F11 to get to the vb editor,click view then properties window (or press F4), select the sheet and in the scroll area, enter A1. then they won't be able to select anything but A1. then...

Specific file path in ODBC connection string
Does anybody know if it is possible to specify a specific file path for a .DBF database file in an ODBC connection string used in the CDatabase or CRecordset classes? I mean something that would override the default path for the ODBC Data Source like CString MyRecordset::GetDefaultConnect() { return _T ("ODBC;DSN=MyDataBase;Path=..\\Data\\[MyData]"); } - or - CRecordset rec; rec.open (CRecordset::snapshot, "Path=..\\Data\\[MyData]", CRecordset::readOnly); ....? You can if you use the Jet engine. Use CDaoRecordset instead of CRecordset Ali R. "Doug Dean&...

Automatically Save Message To Contact Detail
Is there a way to automatically have emails sent to and/or from a contact automatically saved in that contact's detail as an attachment? Cass <cass84@gmail.com> wrote: > Is there a way to automatically have emails sent to and/or from a > contact automatically saved in that contact's detail as an attachment? Isn't that sort of what the Journal does? -- Brian Tillman No... Brian Tillman wrote: > Cass <cass84@gmail.com> wrote: > > > Is there a way to automatically have emails sent to and/or from a > > contact automatically saved in that conta...

I can not email excel files
I am using xp- I can"t email a excel file? newbe wrote: || I am using xp- I can"t email a excel file? Umm what happens when you try? -- Interim Systems and Management Accounting Gordon Burgess-Parker Director www.gbpcomputing.co.uk And what are you doing to try?? -- Don Guillett SalesAid Software donaldb@281.com "newbe" <newbe@discussions.microsoft.com> wrote in message news:4EBA3AC3-F379-4973-AB64-FBA9FD7F43A5@microsoft.com... > I am using xp- I can"t email a excel file? i was trying to e mail right out of excel but it would not work. I found out...

can not save altered files over network
I raised this subject previously and got helpful advice. However, a separate problem arose - bit of history below: I uninstalled the Windows XP update KB885250 and that removed the problem. However, my PC immediately informed me the Windows XP update KB885250 was available and when I let it reinstall, the problem returned. Do you think I should just avoid installing this update (though I think my pc will be interupting me all day to tell me about it) or is there something else I should try? David > > "garfield-n-odie" wrote: > > > > > >>If you ...

Access: Please wait while Setup prepares the neccessary files
Hi. I created a form in MS Access 2007 Enterprise Edition. I added a chart to it with a query as a record source. Everytime when I open the form, the wizard starts, saying "Please wait while Setup prepares the neccessary files" and soon the message "Configuring Microsoft Access Enterprise..." follows. It is annoying to see this everytime I try to use the form. Is there any particular reason for such a behaviour of the Access? Regards, Vedran. Hi Vedran, I suspect that some registry setting is not being written if you open the database as a normal user. By chance are y...

A question on joining more than one xml document to xsl file??
How do it bind the articlelink nodes in the layout.xsl?? I have several xml pages(art1.xml, art2.xml, so on) that I know how link them up via articles.xml, <?xml version="1.0" encoding="utf-8"?> <articles> <articlelink href="art1.xml"/> <articlelink href="art2.xml"/> ...... </articles> But the layout.xsl page is this: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html&quo...

Accessing an OST file
I have a user that is looking for a long lost email that she "hopes" she saved. Of course, she has many, many PST files. The email is not in any of those. There are 3 OST files in the default Outlook folder on her computer. Is there a way to open and search those files? I've done some research and have read that if the OST is orphaned, then you need to buy software that will let you convert the OST to a PST. That doesn't seem to be the case here, it is in her windows folder. Thanks "JohnB" <jbrigan@yahoo.com> wrote in message news:...

System Cache in W2K8 R2 file server
Hi, I have a file server that is constantly consuming all of the 8GB memory it has, after reading quite a bit about it I understand that it is the System Cache that is eating up all the memory. The server has somewhere between 30MB to 300MB available memory but most often about 100MB. W2K8 (not R2) has the Windows Dynamic Cache Service where I can set a max-size on the System Cache but that service doesn't run on W2K8 R2. Is there a way to limit the size on the System Cache in W2K8 R2? Thank you in advance. Stefan > > > I have a file server that is constan...

list of files
can anyone help? I recall, when previously looking around MVPS sites, seeing something which would give a list and details of files in a specified drive and now that i want to do that i cant find it again! Can anyone remember who did this/where it was? tia mike I'll assume you aren't refering to Windows Explorer? To retrieve information in any folder, you can use something like this bit of code: With Application.FileSearch .NewSearch .LookIn = SomePath '"C:\" or "C:\MyPath\MyFolder\Etc\" .SearchSubFolders = True 'or False .Ma...

Compatibility Files
Why does Money 2007 H&B make a copy of my Money file in the Compatibility File folder? As has always been the case since version 2, Money has a very difficult time converting files from only one earlier version as well as restoring earlier version backups. This is now compounded by Vista which it appears M$ has not fully designed Money 2007 for since this compatibility file is necessary. Sheesh! Very frustrating and confusing to perform an update. For hours I would see the file location on the startup screen that I thought I had deleted only to find it in the compatibility file...