Click here to Skip to main content
15,901,982 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: LoadImage returns handle instead of NULL Pin
Tim Smith10-Dec-03 16:08
Tim Smith10-Dec-03 16:08 
GeneralRe: LoadImage returns handle instead of NULL Pin
mexicanchili11-Dec-03 3:24
mexicanchili11-Dec-03 3:24 
QuestionShould I be using struct instead? Pin
b_girl10-Dec-03 3:23
b_girl10-Dec-03 3:23 
AnswerRe: Should I be using struct instead? Pin
Antti Keskinen10-Dec-03 3:39
Antti Keskinen10-Dec-03 3:39 
GeneralRe: Should I be using struct instead? Pin
b_girl10-Dec-03 4:25
b_girl10-Dec-03 4:25 
GeneralRe: Should I be using struct instead? Pin
Antti Keskinen10-Dec-03 7:43
Antti Keskinen10-Dec-03 7:43 
AnswerRe: Should I be using struct instead? Pin
Navin10-Dec-03 4:49
Navin10-Dec-03 4:49 
GeneralRe: Should I be using struct instead? Pin
b_girl10-Dec-03 5:04
b_girl10-Dec-03 5:04 
The data I'm using is fairly specific... it did cross my mind before to write some sort of generic file reading/writing class, but my only concern was the number of times that I actually end up reading and writing each file, not to mention the time taken to parse each of these files...

For example:

Say I have 5 dialog boxes. Each of these dialog boxes utilizes it's own file. The file is read from when it's initialized (unless it's the first time it's being initialized, in which case the file is just created), and written to when it's closed (only OnOK of the dialog though). Each dialog box will be opened at least once. When the user is done, they click on one of the menu items in the main menu bar and that causes another file to be created and written to, making our grand total of files 6. This last file is just all the other files combined into one large file, and after the large file is written, all the other 5 files are deleted.

So, my next idea was to create one structure for each of the 5 dialog boxes. These strucures will all be member variables in the CMainFrame class. So now I'm avoiding creating, writing to/reading from & parsing each of those 5 files, but I'm still easily able to create the 1 large file at the end.

So, I still could make the general-purpose file reading/writing class like you suggested, but I still would be performing all these file operations a whole bunch of time... and my little structure idea does seem to avoid all that, but I'm not sure if it's any better...
GeneralRe: Should I be using struct instead? Pin
Big Art10-Dec-03 6:02
Big Art10-Dec-03 6:02 
GeneralRe: Should I be using struct instead? Pin
b_girl10-Dec-03 6:10
b_girl10-Dec-03 6:10 
QuestionHow to interpret Call stack window message ? Pin
Deepak Samuel10-Dec-03 2:35
Deepak Samuel10-Dec-03 2:35 
AnswerRe: How to interpret Call stack window message ? Pin
Mike Dimmick10-Dec-03 2:41
Mike Dimmick10-Dec-03 2:41 
GeneralDLL Dialog Pin
macmac3810-Dec-03 2:18
macmac3810-Dec-03 2:18 
GeneralRe: DLL Dialog Pin
Antti Keskinen10-Dec-03 3:04
Antti Keskinen10-Dec-03 3:04 
GeneralRe: DLL Dialog Pin
macmac3810-Dec-03 4:46
macmac3810-Dec-03 4:46 
GeneralSearching in a DC Pin
Tommy2k10-Dec-03 2:05
Tommy2k10-Dec-03 2:05 
GeneralRe: Searching in a DC Pin
Antti Keskinen10-Dec-03 3:09
Antti Keskinen10-Dec-03 3:09 
QuestionHow to transparentize a window under Win9x? Pin
dot9910-Dec-03 1:31
dot9910-Dec-03 1:31 
AnswerRe: How to transparentize a window under Win9x? Pin
Antti Keskinen10-Dec-03 3:23
Antti Keskinen10-Dec-03 3:23 
GeneralRe: How to transparentize a window under Win9x? Pin
dot9910-Dec-03 3:53
dot9910-Dec-03 3:53 
GeneralRe: How to transparentize a window under Win9x? Pin
Antti Keskinen10-Dec-03 8:02
Antti Keskinen10-Dec-03 8:02 
GeneralRe: How to transparentize a window under Win9x? Pin
dot9910-Dec-03 12:09
dot9910-Dec-03 12:09 
AnswerRe: How to transparentize a window under Win9x? Pin
Member 36996310-Dec-03 12:17
Member 36996310-Dec-03 12:17 
AnswerRe: How to transparentize a window under Win9x? Pin
Anonymous10-Dec-03 18:35
Anonymous10-Dec-03 18:35 
Generallink with one of the multithreaded C run-time libraries. Pin
Caoimh10-Dec-03 1:30
Caoimh10-Dec-03 1:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.