|
Hi, I am Steve, and I need your help. I have a problem: I have to make this
program in Visual C++, that takes a file, encrypts it, in whatever way, and then sends
it to some address, specified by me. Can you help me with this? I mean, can you
send me some code for encryption and sending the file on the net, or on the
interface I have to use? I am just a newbie, and I do not know so much C++ to
do this.
Thanks,
Steve
You can write me some suggestions on my email address: "steve_cluj@email.ro"
Steve
|
|
|
|
|
i dunno think the workspace with all of ur requirement ! here.but you can find all of them as a seperate project..just find out them and integrate..do something from ur side tooo..CP ians didnt like to SpoonFeed...we can say what..but !how..
Renjith-The CPian.
|
|
|
|
|
"take a file and encrypt it" is easy if you don't care the encrypt method. but "send it to some address", how do you want to do? by mail or send file by a connection? i guess your program need to work in both site, sender and receiver. right? then in sender, it take a file, encrypt, send to a receiver; in receiver, your program listen the port, get the encrypt file, decrypt it.
you need to give more details.
Jimmy
|
|
|
|
|
Well, I have to send the file over the net, by a connection. And you said it right, something like this I have to make. Just some more programming on sockets, and the method of encryption does not matter much. The program has to know only how to encrypt, to decrypt, to send to a specific address and port, and to receive the file, with a confirmation. That's all. The problem is the code...Can you help me on this part?
Thanks for the reply
steve
|
|
|
|
|
Well, I have to send the file over the net, by a connection. And you said it right, something like this I have to make. Just some more programming on sockets, and the method of encryption does not matter much. The program has to know only how to encrypt, to decrypt, to send to a specific address and port, and to receive the file, with a confirmation. That's all. The problem is the code...Can you help me on this part?
Thanks for the reply
steve
|
|
|
|
|
Hi.
Is there a function to get a substring of a CString object? I can use GetAt() in a loop. Nonetheless, I was wondering if there is a function specifically for accessing a substring of a CString object similar to an STL string object.
Thanks,
Kuphryn
|
|
|
|
|
Certainly! The Mid() function has two overloads. In both cases, the first parameter is the starting index of the substring. If you pass a second parameter, it is the count of characters in the substring to return. Or if only one integer is passed, the remainder of the string is returned.
Scot Brennecke
Software Developer
VC++ MVP
|
|
|
|
|
|
|
How to change the caption for a STATIC control under a dialog box with codes? I've try sending WM_SETTEXT to the STATIC's wndhandle (obtain from ::GetDlgItem)... but it does nothing.
|
|
|
|
|
Oh. Thanks anyway. I've tested that out. We need to SET it after ShowWindow... *sigh*... is it true?
|
|
|
|
|
No, that isn't true. But you should use SetWindowText instead of WM_SETTEXT.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Yep.. I did that (both SetWindowText and WM_SETTEXT)... but no text is changed.... if I set it between Create and ShowWindow, nothings happen.
But if I set it after ShowWindow, yes it works!
And btw, I'm using the old MFC 4.21 (i.e. from VC++ 97)
|
|
|
|
|
You can associate a dialog class member with the static control. But you need to change the default control id of the static control for that.
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
|
|
|
|
|
I already change the default id to something else (e.g. IDC_SOMEDIALOG_LABEL)
|
|
|
|
|
Hi. I am also new in templates. I wrote a template class:
template<class t=""> class CExample
Now, I asked this before but am really confused.
I know that to declare it I do:
CExample<class t=""> m_Example;
What if I want to do this using "new"?
Is it
CExample<uint>* m_pExample;
m_pExample = new CExample<uint>;
Something like this???
Then to clean up:
delete m_pExample; (Anything special)
THanks in advance.
|
|
|
|
|
You need to check the "Display as-is" checkbox so the template params show up properly.
Given this class:
template <class T> class CExample
{
public:
T increment(T t) { return ++t; }
}; you refer to the class later with CExample plus a typename which takes the place of T :
CExample<int>* pExampleInt = new CExample<int>();
pExampleInt->increment ( 123 );
delete pExampleInt;
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Hi Mike.
What do you mean by "Display as is?"
|
|
|
|
|
The checkbox below your post as you type it which says "Display this message as-is (no HTML)"
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
Hi all,
Can I rotate a CDialog (andd all its controls 90degrees (or 270 for that matter)?
How? Is it a matter of rotating the CDialog and then all controls within it will follow or do I have to do it one control at a time?
Don't ask why and , but can I do it?
TIA, Jose
|
|
|
|
|
No.
Well, yes, you can if you handle all the drawing yourself (and now we're speaking all NC painting also), intercepting and changing x&y mouse positions and so on.
But short of that? No. It would be easier to turn the screen 90 degrees to be unable to read it normally.
I won't ask "why angry and confused" (whatever that means).
|
|
|
|
|
Theoretically, you can draw anything on your screen, just derive your own dialog class from CDialog and override all the painting related methods.
|
|
|
|
|
I have seen many documentations on cutting, copying, pasting, filenames to and from Explorer into an App... but I do not understand how it is done. I am looking for source code to demonstrate it. If someone could please point me in the right direction, coded samples would be a great help. Thank you.
<><><><><><><><><><><><><><>
Matthew R. Miller
mattrmiller@computersmarts.net
www.computersmarts.net
|
|
|
|
|
Check out my article on drag & drop in the Shell section - it uses the same data format (DROPFILES) as copy/paste.
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Ok, I'm a newbe when it comes to templates, even though I've been programming C/C++ for over 25 years. I just havn't gotton around to learning templates.
What I want to do is write a template string class that supports either char* and wchar_t* (but not necessarily at the same time). I know I can do this:
template<class type="">
class UStringT
{
public:
UStringT() { sptr = NULL; }
~UStringT() {if(sptr) delete[] sptr;}
TYPE c_str() {return sptr;}
void operator=(TYPE* string);
private:
TYPE* sptr;
};
So far, so good. Now the hard part -- how to use standard C/C++ library functions functions: for example, if I want the length of the string, it needs to call strlen() it TYPE is char*, or wcslen() if TYPE is wchar_t*. How do I put that logic in the template?
** This does NOT work ***
If TYPE == char
return strlen(string)
else if TYPE == wchar_t
return wcslen(string);
|
|
|
|