finding the size of files using vc++

I need to write code in vc++ for finding the size of any file or document
that the user has clicked on.  I also need to know how to compress 
documents and then find the size of the compressed file.  Can anybody 
help me ASAP?
0
DC (43)
6/29/2005 4:31:23 PM
vc.mfc 33608 articles. 0 followers. Follow

4 Replies
309 Views

Similar Articles

[PageSpeed] 56

> need to write code in vc++ for finding the size of any file or document
that the user has clicked on.

Take a look at CFileFind

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

0
ajaykalra (6842)
6/29/2005 4:58:10 PM
Use GetFileSize().

"dc" <dc@discussions.microsoft.com> wrote in message
news:BC8EB795-2850-4C89-9CFC-6B5A9A76AA3E@microsoft.com...
> I need to write code in vc++ for finding the size of any file or document
> that the user has clicked on.  I also need to know how to compress
> documents and then find the size of the compressed file.  Can anybody
> help me ASAP?


0
6/29/2005 6:08:59 PM
If you go to www.codeproject.com and search for 'compression' you will come up 
with some hits that might help you.

dc wrote:
> I need to write code in vc++ for finding the size of any file or document
> that the user has clicked on.  I also need to know how to compress 
> documents and then find the size of the compressed file.  Can anybody 
> help me ASAP?
0
isemmel (236)
6/29/2005 7:27:27 PM
dc wrote:
> I need to write code in vc++ for finding the size of any file or document
> that the user has clicked on.  I also need to know how to compress 
> documents and then find the size of the compressed file.  Can anybody 
> help me ASAP?


for the compression of files, u can look up the open source data 
compression lib, zlib. It's easy to use and it's fast.
0
6/30/2005 4:20:04 AM
Reply:

Similar Artilces:

how can I fix the size of frame? once I fixed ,the user cannot changed its size
handle WM_GETMINMAXINFO see http://www.codeguru.com/forum/showthread.php?t=318933 "msnews.microsoft.com" <on_lixing@163.com> д���ʼ� news:OgxZDM45FHA.472@TK2MSFTNGP15.phx.gbl... > > Handle CFrameWnd::OnGetMinMaxInfo and specify whatever size you want for your frame to be. -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "msnews.microsoft.com" <on_lixing@163.com> wrote in message news:OgxZDM45FHA.472@TK2MSFTNGP15.phx.gbl... > > ...

Conditional Comment using Cell value as part of it
What I'm trying to do is the following: if cell(a1) is different from 0(zero) then, cell(b1) should have a comment that say, the value of cell(c1) is the payment, next line the value of cell(a1) was refund, next line Total for today = cell(c1)-cell(a1) Example a1 = $10.00 c1 = $30.00 B1 (comment): $30.00 is the payment (c1) $10.00 was refund (a1) Total for today: $20.00 (c1-a1) can anyone help me on that? thanks in advance ...

Change font size based on value of a cell
If the value of A1>0, I need the font size in a merged cell to change from the default 10 to 16. It needs to return to the default size when A1 returns to a value of 0. Can someone help with this? Thanks. Michael Here's a little macro that will do it....... Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Range("a1").Value = 0 Then Range("B1:E3").Font.Size = 10 Else Range("B1:E3").Font.Size = 16 End If Range("B1").Select End Sub Vaya con Dios, Chuck, CABGx3 "MichaelRLanier@gmail.com" wrote: > ...

Why is .NET 2.0 required to deploy an app using VC2005 C++ Setup project?
I just created a setup project for my mfc app. I noticed that in the prerequisites section the .NET 2.0 is checked by default. My app does not need the framework (at least this is what I think). If I clear the checkbox, build the project, and then try to deploy it on a machine with ..NET 1.1 the installer fails with a message complaining about missing .NET 2.0. I'm not sure if this the installer that needs the framework or my app. Are there any mfc8 dlls dependant on the framework? Thanks Hi, > I just created a setup project for my mfc app. I noticed that in the > p...

Calculation time
I have a large file, approx 10MB, in excel 2003. Most of the data relates to calculations for around 5,000 records, and the workbook takes too long to recalculate. All the vlookup's have been replaced with Index / Match, but it's still slow, and I have a number of macros that rely upon it recalculating. Based on a post here, I went to this site: http://msdn.microsoft.com/en-us/library/aa730921.aspx and ran the timer macros to try and isolate the problem. The FullCalcTimer takes around 19 secs The ReCalcTimer takes 0.00013 secs, and The SheetTimer takes no more than 0.01...

Upload of file containing images hyperlinked to web page. #2
Hi there. I am using Publisher 2003 with internet explorer using XP SP3. I have prepared my web page and I have kept the images that are hyperlinked to the page in a separate foler from the publication file (which I have not yet published to a web site format). I already know that the FTP protocol from my host does not work and I have to load the files one at a time. I create the directory and within that directory I upload my individual files. My question is: Almost all of the pictures are linked to larger pictures or descriptions. During the creation of the web site I have kept...

Corrupt pst file #5
I was using Outlook 2000 and two days ago it stopped working, saying I have a corrupt pst file. I have used PST2GB and then Inbox Repair tool about a million times but Inbox Repair tool gets an error at the end. I have tried a program called Kernel for Outlook but that didn't work very good. A bunch of stuff was missing and then Outlook 2000 wouldn't start any more. So I went and bought Office 2007 and I still can't import, open or do anything else with my old files. I can't begin to explain how important it is that I get my Contacts and Calendar back. I know that...

Decreasing size of XMLSerilaized Payload
Does anyone have any tips/hints for reducing the size of the XML produced? I can think of a couple: 1. Use XmlAttributeAttribute to save space 2. Used XmlIgnore for properties that are calculated rather than reference private fields. On Mon, 14 Nov 2005 11:49:08 -0000, Dirc wrote: > Does anyone have any tips/hints for reducing the size of the XML produced? > > I can think of a couple: > > 1. Use XmlAttributeAttribute to save space > 2. Used XmlIgnore for properties that are calculated rather than reference > private fields. XML Serialization will never be effic...

Getting size of "window" in OnDraw()
I finally found a (seemingly) reliable way to get the size of the "window" for both the screen & a printed page by doing this in CMyView::OnDraw( CDC *pdc): if( pdc->IsPrinting() ) { hRes = pdc->GetDeviceCaps( HORZRES ); vRes = pdc->GetDeviceCaps( VERTRES ); rectContext = CRect( CPoint( 0 , 0 ) , CPoint( hRes , vRes ) ); } else { GetClientRect( &rectContext ); hRes = rectContext.Width(); vRes = rectContext.Height(); } nRows = vRes / rowHeight; I'm doing this because GetDeviceCaps() for the screen re...

How to use Find (Ctrl-F) to find non-alpha
Is there some way to search a sheet for anything BUT a-z or A-Z? tx ;-) Finding numerals or a mixture of numbers and letters (and other characters) works ok for me. What are you having trouble with? On 10/22/2010 16:31, Heather Mills wrote: > Is there some way to search a sheet for anything BUT a-z or A-Z? > > tx ;-) -- Dave Peterson On Fri, 22 Oct 2010 17:54:28 -0500, Dave Peterson <petersod@XSPAMverizon.net> wrote: >Finding numerals or a mixture of numbers and letters (and other characters) >works ok for me. > >What are you having trouble with? > >...

Power Point Viewer 2007 won't open ".pps" files
Using Windows 7, Home Premium, 32 bit. No Office 2007 installed. Using Microsoft Works. Have experienced several issues with Office PPT Viewer 2007. Cleared them, but additionally each time I try to open a .pps file, either from the Desktop or Windows Mail, I receive the following: "C:\Users|AMD\AppData\Local\Microsoft\Windows\TemporaryInternetFiles\content.IE5\E7D22GOW\Gathering of Mustangs and Legends2007.pps is not a valid Win32 application". I have opened this file many times on another computer, so don't think it is an issue with the file. The software has be...

Advanced find, and the grouping and ungrouping of clauses
One of my users has come with this replicable issue: 1. Put in a number of line items in the Advanced Find, select the rows, and click "Group OR" 2. Run it - - it works fine. 3. Go back, ungroup the selection. 4. Add another line item, select rows, and click on the "Group OR" What happens: 1. The "OR" clause doesn't appear 2. The first line item in the Advanced Find disappears 3. There is a message of "Error on page" If you attempt to click "Group OR" again, the NEXT line item in the Advanced Find disappears. Has anyone else experience...

Advanced Find Question 11-13-07
Is there any way to remove entities from the Advanced Find Query / Window? I would like to remove them as possible entities to "search" against. Thanks in advance, Hi, That is not possible. I assume if some user dont have read rights on some entity then it will not appear in Advance Find. -- PLEASE do click on Yes or No button if this post is helpful or not for our feedback. uMar Khan :: Freelance Consultant My Email :: imumar at gmail dot com My Blog :: http://umarkhan.wordpress.com "CPW" wrote: > Is there any way to remove entities from the Advanced Find Que...

ON as a file container
ON has become my sole work place., I now keep many important PDF files on ON pages. But I am scared of doing this. I am afraid one day ON will loose these files. For example because I change the location of the page which contains PDF files. How reasonable is it to keep PDF files embedded in ON? Now you will advise me to keep backups of PDF files in separate windows folders but this I don't want to do. The reason is that this is cumbersome. Each time I inset a PDF on a ON page I need to create a windows folder that should have a logical name and location. But ON is there exac...

Can't view template file in Tools>Options>File Locations
I have created a template and saved it to a shared folder. When users who have access to this folder try to add this template to their 'On my computer...' template list by selecting Tools>Options>File Locations>Workgroup templates>Modify, the template is not visible in the 'Modify Location' window. The template is visible in Windows Explorer, and when users navigate to its location in Word using File>New. Why would the template not appear in the 'Modify Location' window? Any ideas for how I can make it appear? In that dialog, you will no...

Moving attachments automatically to a file folder
Hi, Is there an easy way to configure Outlook 2000 to move attachments from certain messages automatically to a file folder. I mean a normal file folder in Windows, outside Exchange/Outlook environment. I would like to create an archive for attachments, and this archive would have to be accessible by several users, at the same time - so a .pst file is not a good option. It seems that I cannot use a rule or auto archive function to perform this, as they do not allow me to specify a target folder outside the Exchange environment. I do not have permissions to change the configuration o...

Mailbox/Folder Sizes
Is it possible for me to see the size of each users Mailbox and Folders? Thanks, Jeff In news:fejk42tj37tcaq1s2j3k2qmn20m91nt7gd@4ax.com, Jeff Grossman <jeff.nospam@stikman.com> typed: > Is it possible for me to see the size of each users Mailbox and > Folders? > > Thanks, > Jeff In ESM, you can see the size of each mailbox, but it won't break it down into subfolders. you can see the sizes from "Mailboxes" in the ESM...you have to drill down from Administrative Groups, to Servers, to Storage Groups, to Mailbox Stores...but from there you cannot see ...

How do I find root mean square of a periodic data in Excel
...

How do I create custom border using peoples names?
There are many it could be done. I'd set up text boxes and go from there. -- JoAnn Paules MVP Microsoft [Publisher] "Val" <Val@discussions.microsoft.com> wrote in message news:BFF16BB3-4C90-4E05-B0AA-303874A445AA@microsoft.com... > In addition to JoAnn's reply, you could use WordArt as well. WordArt allows you the opportunity to rotate, flip, arrange etc. and resize as well as save as an image. -- Brian Kvalheim Microsoft Publisher MVP http://www.publishermvps.com This posting is provided "AS IS" with no warranties, and confers no rights. &...

VC++ 2005
I am attempting to compile a project in Visual Studio 2005 which compiles and links properly in VC++ 6.0. It seems to have problems with C++ i/o functions. Here is the error I get: g:\src\analyzer\digitdialpages.h(136) : error C2146: syntax error : missing ';' before identifier 'm_InFile' Line 136: ifstream m_InFile; The statment: include <fstream> is at the top of the source file. Some assistance would be helpful. We didn't have any problems with using ifstream or ofstream in VC++ 6.0. Thanks. On Tue, 12 Dec 2006 18:22:47 -0500, "Raj Kulkarni...

Link File
Hi, I have a file which shows a link of another file, but actually it did not. How can I delete the link ? I don't want it to show a linking message everytime when I open the file. Thanks in advance for your help. Eling Hi goto: http://oaltd.co.uk/MVP/Default.htm and search for Findlink.zip (http://oaltd.co.uk/DLCount/DLCount.asp?file=FindLink.zip) "et" wrote: > Hi, > > I have a file which shows a link of another file, but actually it did not. > How can I delete the link ? I don't want it to show a linking message > everytime when I open the fi...

New 2006 trial won't work with 2005 file
Hi - I've just downloaded the new trial 2006 - by mistake actually - because i was having problems with the 2005 trial that was available just last week so I thgt I would re-d/load. Now Money is saying that it cannot convert my Money 2005 file into 2006 format because it was created in a different version. I don't have a problem paying for the software, but there's not point in my buying MS Money 06 if my 05 file won't work and has 12 months worth of data in it. Does anyone know why it won't convert my 2005 file? I don't want to loose all that information, and I would r...

want to find duplicate Phone numbers when typed in excel 2003
I create a column and when i put a phone number in I want to have it indivcate if its a duplicate perferrable in red Let's assume this is your data: A1: 12345 A2: 54321 A3: 12345 Which cell(s) should be highlighted? -- Biff Microsoft Excel MVP "trvlpal" <trvlpal@discussions.microsoft.com> wrote in message news:4C707764-79F0-4ECB-BF57-661289BB59D6@microsoft.com... >I create a column and when i put a phone number in I want to have it > indivcate if its a duplicate perferrable in red Using column "A", place this formula in "conditional formatt...

Change Chart Size
I was wondering if anyone knows how I can change the sizes of charts in excel. But i dont want to just resize by dragging the corners, i want to lock the aspect ratio, and change the width to 3.5 inches. So basically, i want to change the width of each chart to 3.5 inches exactly. Another problem I am having is when I copy and paste a chart from excel into powerpoint, all the changes to the size and text I made get changed so its not the copy I wanted. Is there any way to change this. 1) Resize using aspect ratio only after the chart is sucessfully in Powerpoint. 2) You get charts...

Word and Outlook 2003 window sizes interconnected?
This was posted a while back in another newsgroup but there were no replies. I am running Outlook 2003 and have this exact same issue. Anyone have a fix for this? Thanks. On Dec 2 2002, 5:52 pm, "Mel Huth" <melvin.h...@mail.ihs.gov> wrote: > I am running Office XP. Outlook2002 is using Word as an email editor. > When a message is prepared in a window smaller than > maximized and sent with the window the same size, when Word is opened as normal, the window size of the opening > session is the same size as the Outlook window. > > Is this normal. How can i...