Click here to Skip to main content
15,889,831 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: CFileDialog &amp; OLE DB template problem Pin
godzooky6-Jan-04 7:05
godzooky6-Jan-04 7:05 
GeneralRe: CFileDialog &amp; OLE DB template problem Pin
kjarzabek6-Jan-04 9:11
kjarzabek6-Jan-04 9:11 
GeneralRe: CFileDialog &amp; OLE DB template problem Pin
kjarzabek6-Jan-04 10:27
kjarzabek6-Jan-04 10:27 
QuestionHow to hide DOS prompt?? Pin
Danny Chan6-Jan-04 2:42
Danny Chan6-Jan-04 2:42 
AnswerRe: How to hide DOS prompt?? Pin
David Crow6-Jan-04 2:44
David Crow6-Jan-04 2:44 
AnswerRe: How to hide DOS prompt?? Pin
Selvam R6-Jan-04 2:58
professionalSelvam R6-Jan-04 2:58 
GeneralRe: How to hide DOS prompt?? Pin
Hauptman(n)6-Jan-04 4:04
Hauptman(n)6-Jan-04 4:04 
AnswerRe: How to hide DOS prompt?? Pin
valikac6-Jan-04 6:33
valikac6-Jan-04 6:33 
AnswerRe: How to hide DOS prompt?? Pin
shultas6-Jan-04 15:30
shultas6-Jan-04 15:30 
GeneralRe: How to hide DOS prompt?? Pin
Danny Chan6-Jan-04 16:49
Danny Chan6-Jan-04 16:49 
GeneralRe: How to hide DOS prompt?? Pin
shultas6-Jan-04 17:52
shultas6-Jan-04 17:52 

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.