|
But the user can reset the system time to an earlier time before exiting the application and use the application for ever.
|
|
|
|
|
I guess you can also write the current time down every five minutes etc, after comparing it with the stored time.
And I am about to logout for the day.
this is this.
|
|
|
|
|
how about instead of letting it run for a certain amount of time, you let them use it a certain number of times. I think that's easier.
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
That would be easier. But the users require trial periods based on time.
|
|
|
|
|
See here.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Thanks for the link. This works fine once the license expires. But, the user can work by changing the system date back to an allowed date before starting the application so that he never gets the license expired message. This way i think he can use the application for ever.
|
|
|
|
|
Check the article again. It works even if the user alters the system date. Read through the code and you'll quickly see how this is done.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hello,
You could poll a server for the date / time and compare with that. You have to get around the unavailable internet connection problem though.
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Hi,
I would like to show animation in my dialog.
I have the GIF file but I don't know how to show it.
Can anyone help me?
BTW - Does anyone know where can i find the animation which
Microsoft shows when files are being transffered from one place to another?
Regards,
Eli
|
|
|
|
|
|
Hi,
I'm trying to do some offscreen drawing. The usual teqnique is to go
CreateCompatibleDC
CreateCompatibleBitmap
SelectObject
...
but today I'm trying to create a memdc in the absence of a screen dc - so nothing to be compatible with. I guess I need to use CreateDC, but I can't put CreateDC(_T("DISPLAY"), NULL, NULL, NULL) because I don't want the drawing to appear on the display. Ideally I'd like to make a DC that simply prints into system ram (not video). Does anyone know how to do this?
Joel Holdsworth
|
|
|
|
|
|
Joel Holdsworth wrote:
but I can't put CreateDC(_T("DISPLAY"), NULL, NULL, NULL) because I don't want the drawing to appear on the display
Why can't you use that? You would use it as a basis for your own memory DC:
<br />
CDC dcDisplay;<br />
dcDisplay.CreateDC(_T("DISPLAY"), NULL, NULL, NULL);<br />
CDC dcMem;<br />
dcMem.CreateCompatibleDC(&dcDisplay);<br />
Then you should be able to just draw into the new DC.
|
|
|
|
|
D'uh, yes that's the obvious answer. How supid of me. Thanks a lot!
Joel Holdsworth
|
|
|
|
|
Hi
I have developed a custom banner using CBannerStatic class and source file give at "http://www.codeproject.com/staticctrl/bannerstatic2.asp"
Now the problem is it terminates when I press ESC or spacebar. I want to use a different key combination to terminate, like say Ctrl+Alt+A or simply say "Ctrl + Q". For that I used OnKeyDown() and put the WM_KEYDWON event in message map but it's not working. I have also used OnChar() and same way WM_CHAR but still it's not working....
Any idea or any help how to overcome this ?
Regards,
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
I think you are using it in your dialog box. So all keys pressed go to the parent window. In this case it is going to the Cancel or OK button, so the application exits.
You need to handle your particular key combination e.g, Ctrl + Q etc for the main dialog using accelerators.
this is this.
|
|
|
|
|
Thankx for you kind response...But sorry to say that I m not been able to understand what you are saying exactly ....Can you please say it in more details plz...
Regards
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
Can I see your code? Can you trace if OnkeyDown function gets called?
|
|
|
|
|
I don't mind if you want to see my code.....but where and how to send my code....can you plz give me u'r personal mail address so that I can send it over there....
And yes I have traced it but it never goes into OnKeyDown fuction.
Regards
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
My C++ program should call another program (GAMS), give data to it and then wait for the return data of this program. How do I do this in general or does anybody know how to do it with GAMS???
Thanks in advance!
|
|
|
|
|
We need to know a little more about this GAMS... is it a command line app? or a GUI app with an automation interface?
Joel Holdsworth
|
|
|
|
|
It is similar to Matlab I think... normally you have to open GAMS and you have to have a text file with all the information needed (in this case it´s a optimization problem...so you have a few equations and matrixes), and you tell GAMS "Solve it!" and the output data is put into another text file.
So I guess it´s a GUI, but my problem is that I don´t know whether it has an automation interface...boohoo...
|
|
|
|
|
try dropping the text file onto the icon for GAMS. If it opens up and runs, that means it will accept the name of the text file as a command-line argument. If this is the case, you could use ShellExecute() and just send it the path to the text file as an argument.
My articles
www.stillwaterexpress.com
BlackDice
|
|
|
|
|
Joel Holdsworth wrote:
We need to know a little more about this GAMS...
Just a guess:
Guide to Available Mathematical Software
GPS Azimuth Measurement System
Genome Annotation Management System
General Algebraic Modeling System
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
See here.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|