Click here to Skip to main content
15,922,650 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: derived class can not access base class protected member? Pin
George_George23-Oct-07 17:27
George_George23-Oct-07 17:27 
Questionsocket programming Pin
jersph21-Oct-07 4:36
jersph21-Oct-07 4:36 
AnswerRe: socket programming Pin
Cedric Moonen21-Oct-07 4:48
Cedric Moonen21-Oct-07 4:48 
AnswerRe: socket programming Pin
arun kumar kk21-Oct-07 20:52
arun kumar kk21-Oct-07 20:52 
QuestionWhich control had focus? Pin
Hadi Dayvary21-Oct-07 4:04
professionalHadi Dayvary21-Oct-07 4:04 
AnswerRe: Which control had focus? Pin
Hamid_RT21-Oct-07 4:48
Hamid_RT21-Oct-07 4:48 
AnswerRe: Which control had focus? Pin
Mark Salsbery21-Oct-07 7:22
Mark Salsbery21-Oct-07 7:22 
QuestionTrying to mimic Pin
dellthinker21-Oct-07 3:31
dellthinker21-Oct-07 3:31 
Hi all. Im trying to make the same function but with a console instead of a Window app. The code is from this site here: http://www.codeproject.com/system/Hack_Windows_Task_Manager.asp

From what i can see in my version i've done everything right but its not doing the desired task which is to wipe the list in task manager.

Here's what i have.

<br />
#include <iostream><br />
#include <afxcmn.h><br />
using namespace std;<br />
<br />
BOOL CALLBACK EnumChildProcedure(HWND hWnd, LPARAM lParam);<br />
<br />
void main(){<br />
	HWND taskmnger = ::FindWindow(NULL,"Windows Task Manager");<br />
	if(taskmnger){<br />
		cout << "Task Manager window found! " << endl;<br />
		EnumChildWindows(taskmnger,EnumChildProcedure,NULL);<br />
	}<br />
	else{<br />
		cout << "Not found! " << endl;<br />
	}<br />
}<br />
<br />
BOOL CALLBACK EnumChildProcedure(HWND hWnd,LPARAM lParam)<br />
{<br />
	char name[256]; <br />
	GetWindowText(hWnd,name,256);<br />
<br />
	char ClassName[256];<br />
	GetClassName(hWnd,ClassName,256);<br />
<br />
	if((strcmp(ClassName,"SysListView32")==0)&&(strcmp(name,"Processes")==0))<br />
	{<br />
		cout << "Process tab Found! " << endl;<br />
	}<br />
	if((strcmp(ClassName,"SysListView32")==0)&&(strcmp(name,"Tasks")==0))<br />
	{<br />
		cout << "Task tab Found! " << endl;<br />
	}<br />
	if(name==NULL)<br />
		return FALSE;<br />
	return TRUE;<br />
}<br />


Im thinking my problem lies in the SendMessage function. Everything else seems to work. EnumChildWindows() and the Enum function all detect the lower windows. But when it finds the windows, it doesnt pretty much do anything. Confused | :confused: So if anyone has any suggestion as to what im missing please let me know. Thanx in advance!
Questionhow do you get the index of a row in a list control Pin
king'ori21-Oct-07 2:11
king'ori21-Oct-07 2:11 
AnswerRe: how do you get the index of a row in a list control Pin
Hamid_RT21-Oct-07 2:22
Hamid_RT21-Oct-07 2:22 
AnswerRe: how do you get the index of a row in a list control Pin
lgbean21-Oct-07 9:40
lgbean21-Oct-07 9:40 
QuestionWhat should I do? Pin
bornunique21-Oct-07 1:33
bornunique21-Oct-07 1:33 
AnswerRe: What should I do? Pin
Hamid_RT21-Oct-07 1:58
Hamid_RT21-Oct-07 1:58 
AnswerRe: What should I do? Pin
Johpoke21-Oct-07 2:22
Johpoke21-Oct-07 2:22 
AnswerRe: What should I do? Pin
Mark Salsbery21-Oct-07 7:27
Mark Salsbery21-Oct-07 7:27 
AnswerRe: What should I do? Pin
Nelek21-Oct-07 20:29
protectorNelek21-Oct-07 20:29 
AnswerRe: What should I do? Pin
David Crow22-Oct-07 5:16
David Crow22-Oct-07 5:16 
QuestionMFC focus question Pin
FredrickNorge21-Oct-07 0:14
FredrickNorge21-Oct-07 0:14 
AnswerRe: MFC focus question Pin
Mark Salsbery21-Oct-07 7:40
Mark Salsbery21-Oct-07 7:40 
GeneralRe: MFC focus question Pin
FredrickNorge21-Oct-07 11:12
FredrickNorge21-Oct-07 11:12 
AnswerRe: MFC focus question Pin
Stephen Hewitt21-Oct-07 19:40
Stephen Hewitt21-Oct-07 19:40 
GeneralRe: MFC focus question Pin
FredrickNorge21-Oct-07 21:45
FredrickNorge21-Oct-07 21:45 
Questiontrim heading and trailing space Pin
George_George20-Oct-07 21:52
George_George20-Oct-07 21:52 
AnswerRe: trim heading and trailing space Pin
Christian Graus20-Oct-07 23:40
protectorChristian Graus20-Oct-07 23:40 
GeneralRe: trim heading and trailing space Pin
George_George21-Oct-07 3:18
George_George21-Oct-07 3:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.