Click here to Skip to main content
11,490,801 members (67,501 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VC8.0 MFC
HI,
I created a open and save dialog box for a binary file in mfc8.0(visual studio 2005),requires to provide file pointers to access the same. After opening a file, required to get a copy of that (should allocate a memory for the file approx 20kb )for editing and then updated(Save). Is thier any alternate way of allocating memory in MFC other than using malloc? Please Help me out with the code.....
Please give some inputs on File pointers , i'm new to software field.
Posted 31-May-12 20:36pm
Amar_C597
Edited 31-May-12 20:39pm
v2
Comments
Chandrasekharan P at 1-Jun-12 2:24am
   
The main part of your implementation is not clear. You need to explain more on what you need to do.
Amar*kanchi at 1-Jun-12 5:12am
   
i have to open a .rom file by allocating memory and also for .bmp file. after that, required to edit the .rom file for logo updation from .bmp file.the updated file has to be saved as a different file without altering the original .rom and .bmp file
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

you are misunderstanded it. "File pointers" means not to point to allocated files in memory. Instand that maybe pointers to CFile-objects.

Please show EVERYTIME in your progreamming career the code you want to discuss.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

The way you allocate memory even within MFC projects is independent of MFC (in another words, the framework has nothing to do with memory allocation). So your question doesn't make that much sense. What's wrong with using malloc/free or new/delete?

Maybe you need to clarify your question, and post some applicable code to help us understand the issue you are facing.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 476
1 Andy Lanng 288
2 Sascha Lefèvre 240
3 OriginalGriff 178
4 Maciej Los 160
0 Sergey Alexandrovich Kryukov 9,713
1 OriginalGriff 8,475
2 Sascha Lefèvre 3,544
3 Maciej Los 3,106
4 Richard Deeming 2,370


Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 5 Jun 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100