Solved

don't want program on control alt delete menu

Posted on 1998-11-28
3
156 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Rewrite URL With Encoded Characters 6 64
only14 challenge 19 64
pre4 challenge 19 88
FizzBuzz challenge 9 73
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now