|
SelvaKr wrote: to keep an application alive even after an user logs off. i.e When the second user logs in, the applications that are opened by the first user should remain open
I think you need to wrote a windows service application. Good luck!
|
|
|
|
|
Thanks for your reply Moga...
But i dont want to keep my app as a service...Any other way apart from this...
Is there any other way like XP's hibernation technique or only changing the user identities ....
Thanks.
~ Selva
|
|
|
|
|
If you detect that your app is being closed, and store it's state to a local file, you can read it again when the app opens. You would have to do something fairly funky for it to work like hibernation.
Christian Graus - C++ MVP
|
|
|
|
|
Hi Graus,
Thanks for your reply.
But this approach will again require all my supporting dlls to load again which will lead in time consumption again
Or is it possible to switch the identities of all the running applications instead of logoff/login. Will it change the user privilege of windows too?
Thanks.
~ Selva
|
|
|
|
|
SelvaKr wrote: Or is it possible to switch the identities of all the running applications instead of logoff/login. Will it change the user privilege of windows too?
No, that's not going to work.
Christian Graus - C++ MVP
|
|
|
|
|
SelvaKr wrote: An another thing i dont want run my application as a service
Why not? A service is exactly the solution to what you're asking.
SelvaKr wrote: Is it possible to hibernate the application and wake up when the next user logs in?
Why build your own keep-alive system when the OS already has one? I suppose you could make your app persist its state to a file, then read it back in on the next launch. But then it's not actually running after logoff.
|
|
|
|
|
Did you try to add a key in the following registry path "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" to automatically start your application for all users ?
|
|
|
|
|
Thanks for your reply..
But my app should not be closed while logoff..
I dont want to start it for each login since it would take more time to load.
~ Selva
|
|
|
|
|
I see 2 solutions :
- Create a service : I know that you dont want to do this...but a service is not closed on logoff
- Use the Run Registry Key to launch your app for each logon and optimize the applicatino loading
|
|
|
|
|
Thanks buddy
~ Selva
|
|
|
|
|
hi
how can we compress the file using MFC .kindely Help me
#sanroop#
|
|
|
|
|
Read This article[^]
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
|
Hi,
I have a few years experience in programming C/C++ for Unix/Linux, and recently also .NET.
I also know about win32 api.
What would be a good introduction to MFC for an experienced programmer?
Not a book, as I won't spend money on MFC (there IS a limit! ).
I'm talking about some online resource.
I'm looking for something that won't waste my time on stuff I already know.
Thanks!
|
|
|
|
|
ncryptor wrote: Not a book, as I won't spend money on MFC
Then you're not at all serious.
ncryptor wrote: I'm talking about some online resource.
Look around you. Heaps of MFC articles here.
ncryptor wrote: I'm looking for something that won't waste my time on stuff I already know.
Impossible to recommend, we don't know what you know, and any MFC resource is likely to cover stuff you know from Win32.
Christian Graus - C++ MVP
|
|
|
|
|
1. I never said I'm serious.
2. Heaps of mfc articles - ok, i know. but could you recommend one that describes the concept (not specific classes) in-depth?
3. maybe an article about what's the conceptual difference between programming with C in win32 api (which i already am familiar with) and programming MFC?
Of course i'll have to find articles and read them.
All I'm asking is, do you happen to know a good place to start, that isn't intended for total beginners.
Thanks!
|
|
|
|
|
ncryptor wrote: 2. Heaps of mfc articles - ok, i know. but could you recommend one that describes the concept (not specific classes) in-depth?
3. maybe an article about what's the conceptual difference between programming with C in win32 api (which i already am familiar with) and programming MFC?
Maybe you can start from this one[^]
|
|
|
|
|
Thanks!
I already found that one...but Thanks!
|
|
|
|
|
Hi,
I want to add a multiple line output to a edit box. I set the properties of the edit
box as multiline, Vscroll ,auto vsroll. Then I edited the CString member variable i created as follows
txt.Format("%d) %s, %s, %s, %s, %s, %d, Score: %f \n", i+1, temp->sDateTimeCreated, temp->sAuthor, temp->sAccessLevel, temp->sReportSource, temp->sComments, temp->iRating, temp->fSearchScore);
m_DisplayString += txt;
But it doesn't go to the next line in the newline character. Instead it shows a little line. Pls help me to resolve this.
|
|
|
|
|
|
|
So I found out how to set a proxy for Internet Explorer. It's documented here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/setting_and_retrieving_internet_options.asp
My problem is the following . Using the above mechanism allows me to set the proxy for all the protocols. I want to set ( programaticaly )different proxy values for different protocols( ex. one value for http, https and another for sock ). How can i make this?
|
|
|
|
|
I have an array of 4 unsigned long's. These 4 values must be identical, if not I throw an error. What would be the most efficient way of detecting if one or more of the values are not the same? My first thought is to add the numbers then divide by 4, if this result is not the same as any one of the numbers then I have detected an error. But these numbers are often in the high range, so adding them would cause a 'wrap around' effect. Any thoughts on this?
|
|
|
|
|
Why not simply checking if the first two are the same, then the 2nd and the 3rd and finally the 3rd and the 4th ? If one of this check fails, then at least one of the number is different.
|
|
|
|
|
I thought about that. In the question I stated there are 4 values to compare, while this is true for the moment I may later extend this. I have built the code in such a way that I have the array sizes #define d so that I don't need to search for and edit hard coded values. For now though, I have done it as you stated.
|
|
|
|