Click here to Skip to main content
15,902,938 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dynamically read and write a file Pin
valikac6-Jan-04 6:23
valikac6-Jan-04 6:23 
GeneralRe: Dynamically read and write a file Pin
mryazdani6-Jan-04 9:14
mryazdani6-Jan-04 9:14 
GeneralRe: Dynamically read and write a file Pin
mryazdani6-Jan-04 9:36
mryazdani6-Jan-04 9:36 
GeneralRe: Dynamically read and write a file Pin
Mike Nordell6-Jan-04 19:48
Mike Nordell6-Jan-04 19:48 
GeneralCListCtrl Question Pin
DimkaSPB6-Jan-04 5:10
DimkaSPB6-Jan-04 5:10 
GeneralRe: CListCtrl Question Pin
David Crow6-Jan-04 9:25
David Crow6-Jan-04 9:25 
GeneralRe: CListCtrl Question Pin
Michael Dunn6-Jan-04 10:38
sitebuilderMichael Dunn6-Jan-04 10:38 
GeneralRe: CListCtrl Question Pin
DimkaSPB6-Jan-04 10:57
DimkaSPB6-Jan-04 10:57 
Generalping in VC++ Pin
achip6-Jan-04 4:39
achip6-Jan-04 4:39 
GeneralRe: ping in VC++ Pin
valikac6-Jan-04 6:29
valikac6-Jan-04 6:29 
GeneralRe: ping in VC++ Pin
achip7-Jan-04 5:13
achip7-Jan-04 5:13 
GeneralRe: ping in VC++ Pin
David Crow6-Jan-04 7:18
David Crow6-Jan-04 7:18 
QuestionHow 2 capture windows startup & shutdown events in app. Pin
i2c6-Jan-04 4:02
i2c6-Jan-04 4:02 
AnswerRe: How 2 capture windows startup & shutdown events in app. Pin
Nick Hodapp6-Jan-04 4:33
sitebuilderNick Hodapp6-Jan-04 4:33 
GeneralRe: How 2 capture windows startup & shutdown events in app. Pin
Jahangir Raza Shah6-Jan-04 9:30
Jahangir Raza Shah6-Jan-04 9:30 
QuestionHow 2 capture windows startup & shutdown events in app. Pin
Jahangir Raza Shah6-Jan-04 4:01
Jahangir Raza Shah6-Jan-04 4:01 
Generalopening files from a program Pin
HackerBoy6-Jan-04 3:19
HackerBoy6-Jan-04 3:19 
GeneralRe: opening files from a program Pin
keegan6-Jan-04 3:57
keegan6-Jan-04 3:57 
GeneralRe: opening files from a program Pin
Michael Gunlock6-Jan-04 4:04
Michael Gunlock6-Jan-04 4:04 
There are several options. Here are a few:
- standard C++ lib: <fstream>
- MFC: CFile, CstdioFile
- Win32 API: CreateFile()

“…is this even a good idea…”

No. There are so many reasons but the most obvious is nothing is encrypted. It appears your intent was to “password protect” a file but it only works if the file is opened with your app. What’s to stop someone from opening the file with notepad.exe for example. You have hard-coded the password into the code. Bad idea. With little effort, someone could just open your compiled exe with a hex editor and nab the password. The list goes on (and its long). Encryption is a very complex subject. If you are seriously interested consider picking up a copy of Bruce Shneier’s Applied Cryptography.

you wrote:
“ if(password = (password)) “

what you meant was:

if(password == pword)…

I have seen some of your other posts on this forum and I am not sure what compelled me to answer this one. I would suggest searching www.msdn.microsoft.com and google for your questions and if they still remain unanswered, post them as a question. “How to open a file” can be answered in less than 1 minute by searching the above sites
GeneralRe: opening files from a program Pin
HackerBoy6-Jan-04 4:17
HackerBoy6-Jan-04 4:17 
GeneralRe: opening files from a program Pin
David Crow6-Jan-04 4:22
David Crow6-Jan-04 4:22 
GeneralWhich tool to use for detecting heap fragmentation Pin
Anonymous6-Jan-04 3:18
Anonymous6-Jan-04 3:18 
GeneralRe: Which tool to use for detecting heap fragmentation Pin
2249176-Jan-04 3:41
2249176-Jan-04 3:41 
GeneralRe: Difference of Floating Point Optimization in Fortran &amp; C++ Pin
Patje6-Jan-04 2:53
Patje6-Jan-04 2:53 
GeneralCFileDialog &amp; OLE DB template problem Pin
kjarzabek6-Jan-04 2:44
kjarzabek6-Jan-04 2:44 

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.