|
Hi everybody,
i like to draw a loading rect on a view and overlay a "shadow" on the entire view.
I made the shadow this way :
for(int x=0; x<rect.width();{
for(int y=0; y<rect.height();{
pDC->SetPixel(x,y,RGB(0,0,0));
}
}
But the shadow isn't drawn over the controls.
Rather the controls are drawn over the shadow
Is there a possibility to do that?
Big thanks for help
modified on Friday, November 7, 2008 4:37 AM
|
|
|
|
|
Well... What about creating a popup dialog without caption and borders and drawing whatever you want...?
Hint: Have a try to WS_EX_TRANSPARENT style too...
|
|
|
|
|
Yepp, thats the easiest solution
But in my MDI Application it's possible to continue the work in other views.
These other views, which aren't loading huge data, are still editable.
WS_EX_TRANSPARENT
Ok, i'll google after this
Thanks
If you have further ideas how to resolve this problem, i would be very happy 
|
|
|
|
|
baerten wrote: But in my MDI Application it's possible to continue the work in other views.
These other views, which aren't loading huge data, are still editable.
Ofcourse, you can continue the work, if you create the dialog as modeless...
|
|
|
|
|
Okay, i see ...
If the working view gets the focus, i show up the modeless dialog.
Because if i don't do it, the user couldn't see to which view has a "waiting dialog"
Thanks for the idea 
|
|
|
|
|
I have create a MFC single document application. But now i need to open another window to open and access its view class against a button on toolbar. can it possible in MFC SDI?
|
|
|
|
|
So you need to communicate to another application... make the use of window messages and WM_COPYDATA can help you a lot.
|
|
|
|
|
Hello all,
I am building Win32 application. My requirement is to expire this application on a particular date let say for e.g. on 31 december, 2008. If i use system's local time then user will be able to run it by changing its date/time.
So is there any way to get global time in my VC application. Please help me out in this situation.
Any help would be greatly appreciated.
Thanks
|
|
|
|
|
If client PC is connected to internet then you can ask one of the many time servers for the current time. Otherwise as far as I know there is no way to find the correct time locally. May I ask why you need to do so. Are you trying to build a demo application which expires after a number of days. In that case you should store the time of the installation somewhere in the user PC and check against it.
Saurabh
|
|
|
|
|
Thanks for your reply. I also thought about the suggestion for getting global time from server till PC is connected to Internet that you have mentioned. But that's not my requirement. what could be the other way to do so?? As I told you that i need to expire it on particular date. Your suggestion would work if i need to expire it after number of days from its installation.
Please help me out if you still have some suggestions. by the way thanks again for you reply.
Thanks
|
|
|
|
|
As far as I know there is no way to determine the correct time irrespective of the time user has set in the machine. Actually if you think about it there is no such thing as correct time. In Singapore the current time is 15:15 07-11-08, in India it is 12:45 07-11-08 but in Los Angeles it is 11:15 PM on 06-11-08. So which one will you choose?
-Saurabh
|
|
|
|
|
yaa... I think you are right. Let me think over hoe to accomplish it. Thank you very much for your replies.
Thanks
|
|
|
|
|
I think you should be asking why do I need to do that? What actually am I trying to accomplish?
-Saurabh
|
|
|
|
|
I didn't get you in your previous reply. If you are asking what i am trying to accomplish is clear. I want to expire my application on particular date. but i can't use local time/date to check it as user may change its local time/date. That's why i am thinking of some other way.
Please help me if u have some suggestions for me.
Thanks
|
|
|
|
|
I don't think that is the goal.
If that is the goal then may I ask why do you want you application to suddenly stop working for every user. What purpose the purpose of this?
There is no suggestion I can give you for finding time, even if you assume that you want time in a particular time zone. As far as I know there is no way for a standalone computer to determine current time. In fact no device can have such capability because time is not absolute.
-Saurabh
|
|
|
|
|
Hemang Raval wrote: Your suggestion would work if i need to expire it after number of days from its installation.
If you already know that 31-Dec-2008 is the expiration date, and you installed the software today, then simply set the value to 53.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hello,
you can save the current date every time the program runs, so you can check against the date for alterations.
Hope this helps
Bekir.
|
|
|
|
|
What if date has been altered before program was installed?
Saurabh
|
|
|
|
|
Hello,
Either limit the number of days also or if you are providing a license, do not proceed if the supplied date is earlier than the start date of the license.
You could also use both, if you want it.
The only drawback of this approach is that, if the user changes the date to an earlier date for any purpose (reports ), and mistakenly opened your program also, he/she would be pissed off .
Bekir.
|
|
|
|
|
Actually that is the interesting thing. OP do not want to disable application after a given number of days, he wants to disable it on a particular date.
-Saurabh
|
|
|
|
|
My suggestion is to follow what beko said. In addition to that you can mark it as expired once the expiry date reached. After that you should not allow the application to continue working even if the date is changed back.
|
|
|
|
|
Thank u to all. I really appreciate your help. I got a clue from all of your replies. Again thanks a lot to u all.
|
|
|
|
|
I am working on an mfc application in which I am opening a dialog box containing smileys on button click. Now what I want is to close the dialog dialog box with smileys when mouse click event is fired anywhere on the screen.
Thanks
Dhiraj Kumar Saini
|
|
|
|
|
You can use SetCapture, then you will get the click event anywhere on the screen and at that time you can check the coordinates and close the dialog if it is outside the dialog.
|
|
|
|
|
Can you help me out with some article.
|
|
|
|