|
ummmm
dwStartTickCount = GetTickCount(); // at the start
dwEndTickCount = GetTickCount(); //at the end
dwTicksToRun = dwEndTickCount - dwStartTickCount;
???
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away" biz stuff about me
|
|
|
|
|
How to make a license file which makes the application expire after a specific date, and also how to stop copying the .exe file.
|
|
|
|
|
I'm sorry, but you're basically asking for someone to write you an article. You should post such questions to the article suggestions forum.
Do you know how to open and close a text file ? Use the registry ? Find out the current date/time from the system ? How do YOU think such a system would work ?
There is no way to stop people from copying a file.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Christian Graus wrote:
There is no way to stop people from copying a file
which is probably a good thing, else it'd be stuck in d:\projects\myapp\debug all the time. Hard to distribute.
Signature space for rent. Apply by email to....
|
|
|
|
|
Jon Hulatt wrote:
which is probably a good thing, else it'd be stuck in d:\projects\myapp\debug all the time. Hard to distribute.
Hmmm... maybe they'll add that to force us to distribute all our apps by ASP.NET......
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
|
Forget about 'expiring' if you're trying to protect your shareware app. Cracker d00dz will be able to break it very easily.
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|
|
Hello all.
I'm now creating a ActiveX control using mfc ActiveX control wizard.This control draws lines and arcs defined. Can I export my classes in this project? how? Thank u for any suggestion!
Best Regards
Denkor
|
|
|
|
|
I know that it provides IHTMLEventObj for access event process.
But I don't know how it acknowledge me when event occured.
|
|
|
|
|
can a variable be inserted into a structure(declared in some header file and containing some variables) during run-time? If yes, how?
|
|
|
|
|
I doubt it. You're asking an application to change the size of a class within itself. That's a big change.
Why would you want to ?
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Do you mean a self-growing array like std::vector()?
You can't change the declaration you gave to your compiler, this is compile-time.
But you can declare 'here is a pointer to any amount of memory'.
Strings do this all the time.
Or you can declare 'here are any number of XY objects': this would be a std::vector.
I hope this helped
|
|
|
|
|
When IE connect to a website using SSL,IE will display a dialog to ask user to select a certificate of him(or her).
In fact,IE connect to the system's CSP and search user's certificate.
my question is:
if my certificate is stored in other place,but not in the system's CSP or a SmartCard,how can I have IE use my certificate when it connect to a SSL website?
For example,I store my certificate(and private key) in my own USB card,which is not compatible with the SmartCard.What can I do?
I think that if I can hold up the event which occur when IE connect to the system CSP for requiring a user certificate(and private key),it will be simple!
thanks advance!
|
|
|
|
|
Hi I had a structure which looks like this:
1.
struct CMyStruct
{
5-6 CString ...;
int ...;
long ...;
1 CStringArray ...;
};
2.
My application is going to generate a lot of instances of CMyStruct; I therefore thought it to be a good idea to use the CArray MFC template class to *manage* my structs. (Adding, deleting etc.)
3.
Accordingly, I put the following definition in my dialog header file.
#include <afxtempl.h>
#include <Mystruct header file>
CArray<CMyStruct,CMyStruct&>MyStructArray;
4. After this I began using it in the following manner:
CMyStruct myStruct;
PopulateMyStruct(&myStruct);//Structure populated
MyStructArray.Add(myStruct);//ERROR PRODUCING LINE
5. On compilation i receive the following error:
\INCLUDE\afxtempl.h(443) : error C2582: 'CMyStruct' : 'operator =' function is unavailable
C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xlocale(467) : while compiling class-template member function 'void __thiscall CArray<struct CMyStruct,struct CMyStruct &>::SetAtGrow(int,struct CMyStruct &)'
6. What could I be doing wrong??
Any help would be greatly appreciated.
|
|
|
|
|
Imlementation of SetAtGrow method uses an operator =. You need to implement one for your struct/class.
Pavel
Sonork 100.15206
|
|
|
|
|
does CMyStruct have an "operator =" member ? looks like that's what the compiler wants.
have you considered std::vector instead of CArray? overall, std::vector is a nicer way to deal with an array of things.
-c
Alcohol is the anesthesia by which we endure the operation of life.
-- George Bernard Shaw
|
|
|
|
|
hi there,
just wanted to let you'll know:
When i remove the CStringArray from the structure it works!
|
|
|
|
|
This is because of CStringArray has no "=" operator.
Best regards
Holger Persch
|
|
|
|
|
OK thats fine, but what happens when I **NEED** a CStringArray in my structure.
(Right now i have replaced the CStringArray by a char**) but thats not very elegant!)
|
|
|
|
|
then you need to write an "=" operator for your struct. in it, you'll copy all the data items from the input struct to "this".
-c
Alcohol is the anesthesia by which we endure the operation of life.
-- George Bernard Shaw
|
|
|
|
|
Do you mean implementing a = operator that copies from one CStringArray into another.
P.S:I say this, because i am now using a statically allocated char[][], thereby eliminating the need for copying!
|
|
|
|
|
Yes - you need to impliment operator = for CStringArray, as Chris has already said twice now.
As he has also said, the MFC container classes are plain ugly compared to STL, and std::vector would solve all of these problems as well as opening up a whole world of elegant container design to you.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
The "=" operator can look like this:
class CMyClass
{
.
.
.
const CMyClass &operator =(const CMyClass &src)
{
m_String = src.m_String;
m_StringArray.RemoveAll();
m_StringArray.Append(src.m_StringArray);
m_StringArray.FreeExtra();
return *this;
}
public:
CString m_String;
CStringArray m_StringArray;
};
Best regards
Holger Persch
|
|
|
|
|
Thanks so much for this Holger, that was very kind of you.
|
|
|
|
|
Is there any reason for which you prefer RemoveAll/Append/FreeExtra over CStringArray::Copy?
Tomasz Sowinski -- http://www.shooltz.com
*** Si fractum non sit, noli id reficere. ***
|
|
|
|