Link to home
Start Free TrialLog in
Avatar of lama
lama

asked on

don't want program on control alt delete menu

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!
ASKER CERTIFIED SOLUTION
Avatar of thresher_shark
thresher_shark

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thresher_shark
thresher_shark

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.
Avatar of lama

ASKER

I like it, I like it!  Thanks again!