Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 18th, 2006, 9:32 PM   #1
Eric the Red
Hobbyist Programmer
 
Eric the Red's Avatar
 
Join Date: Feb 2006
Posts: 214
Rep Power: 0 Eric the Red is an unknown quantity at this point
Explain this code please

now i've found out how to hide and application so that it doesn't appear in the taskbar:

#include <windows.h>
#include <stdio.h>
#include <winuser.h>
#include <windowsx.h>

HWND stealth;
AllocConsole();
stealth=FindWindowA("ConsoleWindowClass",NULL);
ShowWindow(stealth,0);

However, i don't completly understand what is going on. I really don't like to copy and past code. So can someone please tell me what is going on line by line.

Maybe a link to this, if the explanation is too long.
Eric the Red is offline   Reply With Quote
Old Feb 18th, 2006, 10:07 PM   #2
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,207
Rep Power: 5 grumpy is on a distinguished road
If you look in the win32 help file (which has been provided with most compilers targeting windows over the last few years) you will be able to find information on the functions being called in your code. You can also do a search on the MSDN site.

FindWindowA() would be listed as FindWindow() in the help file (FindWindow() is usually a macro that expands to a call to FindWindowA() internally).
grumpy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:49 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC