Solved

don't want program on control alt delete menu

Posted on 1998-11-28
3
160 Views
Last Modified: 2013-11-20
One more... How can I make it so my program doesn't show on the "Close Program" menu?  I have seen other windows apps do this, how can I?  I have looked all through the help files in Vis C, but nothing seems to work.

Thanx!
0
Comment
Question by:lama
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
thresher_shark earned 100 total points
ID: 1325455
Answer coming...
0
 
LVL 6

Expert Comment

by:thresher_shark
ID: 1325456
To prevent your application from showing up on the task list, add:

  #define REGISTER 0
  #define UNREGISTER 1

to the top of your main source code file (the one with the InitInstance function in it).  Then add:

  typedef DWORD (WINAPI *fp_RegServProc) (DWORD, DWORD);
  fp_RegServProc pRegisterServiceProcess = NULL;

  pRegisterServiceProcess = (fp_RegServProc) GetProcAddress (GetModuleHandle ("KERNEL32.dll"), "RegisterServiceProcess");

  (pRegisterServiceProcess)(0, UNREGISTER);

to your InitInstance member function.  Make sure that you have some other way of exiting your program, and realize that if your program locks up or goes berserk, you will have to restart your computer to close it!  If you have any problems or further questions, please don't hesitate to ask.
0
 

Author Comment

by:lama
ID: 1325457
I like it, I like it!  Thanks again!
0

Featured Post

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question