|
Has your system date changed recently ? I found I had problems like that in VC6 where my files were dated after the system date, and they persisted until the date passed the date I had been set to.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
It'd probably be fairly easy to make a bot that'd post random stupid VB questions, and nobody would probably ever notice - benjymous - 21-Jan-2003
|
|
|
|
|
Do a Clean to delete all .obj files (thus timestamps as well). Also, make sure to delete by hand all temporary files, including .ncb, .opt, .aps, ....
|
|
|
|
|
I tried cleaning temp files, but it didn't work
|
|
|
|
|
Hello,
I am having a plain text file which i generated from different hardware parameters such as Disk vol serial number, MAC address, CPU speed etc(Key.txt)
I want to encrypt a file using Symmetric private key encryption in VC++. The private key used for encryption should be the file i generated (Key.txt).
Can any one help me..
Thanks in advance.
|
|
|
|
|
If I understand you right, you perform some calculation over the computer's configuration and want to use the result as a key in a symmetric encryption.
I see some problems:
1) Anyone using this computer could decrypt your file because he can recalculate the key.
2) If the configuration changes (for exampe change NIC), you can't recalculate the key, therefore you can't decrypt your data anymore.
3) Your key can be recalculated by anyone knowing the computers configuration and your algorithm. The best keys are the ones generated with known algorithms from random data. You know that "security by obscurity" doesn't work.
--
karl
|
|
|
|
|
hi karl..
Thanks for your response..OK well suppose i have calculated the key from random data. But my problem is how to encrypt a file using this key.(Symmetric encryption). I want to do this in VC++. Can you help me..please..
regards
Mahesh
|
|
|
|
|
|
Hello guys,
I created a simple dialog based application. I removed title bar from it. The problem is that when i run the program, the "empty" task bar button is shown. I don't want title bar, but i want some text and icon on task bar button. How can i do so in Windows application ???
|
|
|
|
|
In dialog properties window, select Styles tab, then uncheck Title bar check box.
A. Riazi
|
|
|
|
|
Hey, I have just started getting into MFC (from C++). I'm using Microsoft Visual C++ and I used the MFC AppWizard to create my first actual program.
Since it's my first real program I hoped to make something easy. I am hoping to have the user of the program type something in an edit box. Then when a button is pressed it outputs the text to a .txt file.
The actual program is an "alert" maker and I want to make it for HTML. The user types in the text for the alert and the program outputs the HTML for the alert with the user's message. I already have everything else set up I just need to know how to output it. Thank you.
|
|
|
|
|
Are you interesting in working with file streams or the CFile class? Have you looked at MSDN[^] yet?
Nick Parker
The only man who never makes a mistake is the man who never does anything. - Theodore Roosevelt
|
|
|
|
|
As cool as MFC is, don't scrap STL! For all my file I/O, I still rely on fstreams and iostreams! See my article, CDataFile[^], for an easy illustration of using MFC and STL for file I/O.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
ok, im using fstream.h and using ofstream to output to the file. There is one problem. I am trying to ouput HTML, some of it looks like this: and the compiler thinks that the HTML is C++ so I get lots of errors. Is there any way to get around this?
|
|
|
|
|
DuFF wrote:
<input type="button">
You're probably not escaping the quotes - try this
fstrm << "<input type=\"button\">";
Quotes inside a literal need to be escaped with a backslash.
--Mike--
Looks like I picked the wrong week to stop sniffing glue.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Thank you so much, its working. There is one small bug though. When I output the text to a file there are strings that are outputted inside the text. It works fine except if one of the strings doesn't start with a capital letter the text file is not outputted. Does anyone know how to fix this?
|
|
|
|
|
First off, I want to thank CODE PROJECT for all it's great code. I've found this site very, very resourcefull for MFC.
My question I have is about Telnet applications (read title). How do I ubild one and what should I use for best results? Should I use the Shell API and the DOS telnet application. Or should I try to create my own classes for connecting with a telnet server?
Keep in mind please, that I wish to keep this as easy as possible. I am still pretty much a begginer with MFC applications. I wish to make just a MFC look-a-like console application used for telnet sessions.
Thank you for your help in advance.
|
|
|
|
|
Sakky wrote:
First off, I want to thank CODE PROJECT for all it's great code.
Sakky wrote:
I am still pretty much a begginer with MFC applications. I wish to make just a MFC look-a-like console application used for telnet sessions.
Well, if you're gonna go... Go all out. Don't settle for "look-alikes" when you've got the real thing!
I'd start on MSDN looking over the basics of winsock and net comms. I'm sure there's something here too, it's just too late to look...
Good luck!
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Let me clear something up for you. What I ment when I said "making a look-a-like", was skinning the application. So that it would mimic the apperance of the Linux RedHat GUI system.
I think I'll try the console first, then I'll look into the net programming bit. Because I think I can use the Shell API for console commands.
Thanks for your advice tho.
|
|
|
|
|
First off, I want to thank CODE PROJECT for all it's great code. I've found this site very, very resourcefull for MFC.
My question I have is about Telnet applications (read title). How do I ubild one and what should I use for best results? Should I use the Shell API and the DOS telnet application. Or should I try to create my own classes for connecting with a telnet server?
Keep in mind please, that I wish to keep this as easy as possible. I am still pretty much a begginer with MFC applications. I wish to make just a MFC look-a-like console application used for telnet sessions.
Thank you for your help in advance.
|
|
|
|
|
I have been working on this for a couple of days. I am having trouble understanding why my program seems to hang after the input is translated. From what I can see the program never leaves the while loop. I must clarify that I still am a newbie so forgive me for my stupidity. Any help will be greatly appreciated. Here is what I have so far:
#include <iostream.h>
#include <string.h>
#include <fstream.h>
class translate
{
private:
char english[20];
public:
translate();
};
int main()
{
translate sentence;
return 0;
}
translate::translate()
{
char ans;
do
{
cout<<"Please enter a sentence:\n";
while(cin>>english)
{
if((english[0] == 'a') || (english[0] == 'a') || (english[0] == 'A') ||
(english[0] == 'e') || (english[0] == 'E') || (english[0] == 'i') ||
(english[0] == 'I') || (english[0] == 'o') ||
(english[0] == 'O') || (english[0] == 'u') || (english[0] == 'U'))
{
cout<<english<<"ay ";
="" }
="" else
="" {
="" int="" size="strlen(english);
" char="" temp="english[0];
" for(int="" i="0;" <="" size;="" i++)
="" english[i]="english[i+1];
" english[size="" -="" 1]="temp;
" cout<<="" english="" <<"ay="" cout<<"would="" you="" like="" to="" have="" another="" sentence="" translated,?\n";
="" cout<<"type="" [y]="" for="" yes="" and="" [n]="" no:\n";
="" cin="">> ans;
}
while((ans == 'y') || (ans == 'Y'));
return;
}
|
|
|
|
|
Constructors are for initializing member variables of a class instance, you should place the application specific code within a function that you call after construction, not during.
Ex:
class translate
{
public:
translate(){}
int Process();
};
int translate::Process()
{
<font color='green'>
}
Nick Parker
The only man who never makes a mistake is the man who never does anything. - Theodore Roosevelt
|
|
|
|
|
arsenalgunners01 wrote:
Pig-Latin Translator
And I thought I was up too late...
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Thanks for the advice, but that doesn't solve my problem.
|
|
|
|
|
without looking @ your code in depth.. i can suggest you a ways to solve your infinite loop problem..
instead of using while(cin>english), you can use the length of the string of the input as your while conditional variable.. every loop, you minus the conditional variable by 1.. by the time the conditional variable reach 0(meaning you have finished check every letter), your program will exit the loop for sure..
|
|
|
|
|
How can I get the length of the string if it hasn't even been inputed by that point?
|
|
|
|