Click here to Skip to main content
15,926,507 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Delete File Handle Error Pin
Joaquín M López Muñoz7-May-02 11:52
Joaquín M López Muñoz7-May-02 11:52 
Generalwaiting for a small amount of time Pin
Alex Griffing7-May-02 11:27
Alex Griffing7-May-02 11:27 
GeneralRe: waiting for a small amount of time Pin
Christian Graus7-May-02 11:32
protectorChristian Graus7-May-02 11:32 
GeneralRe: waiting for a small amount of time [slightly corrected] Pin
Joaquín M López Muñoz7-May-02 11:39
Joaquín M López Muñoz7-May-02 11:39 
GeneralVS7 Rant Pin
Todd Smith7-May-02 11:11
Todd Smith7-May-02 11:11 
GeneralRe: VS7 Rant Pin
Tom Archer7-May-02 11:18
Tom Archer7-May-02 11:18 
GeneralRe: VS7 Rant Pin
Tim Smith7-May-02 15:40
Tim Smith7-May-02 15:40 
QuestionHow do I retrieve a list of applications running? Pin
Neil scsn7-May-02 11:06
Neil scsn7-May-02 11:06 
Hi,
I have the below function to retrieve the applications that are running.
The only problem is that it doesnt retrieve the applciation name, but the
name on top of the window.

Is there any way I can just return the name of the application?
Instead of returning 'Inbox - Microsoft Outlook', but getting it to return
'Microsoft Outlook'

static BOOL CALLBACK AddWinsList(HWND hWnd, LPARAM lParam);
BOOL CALLBACK AddWinsList(HWND hWnd, LPARAM lParam)
{
if (!IsWindowVisible(hWnd) || GetWindow(hWnd, GW_OWNER) != NULL)
return TRUE;

TCHAR szClassName[80];
GetClassName(hWnd, szClassName, 80);

if (lstrcmpi(szClassName, _T("Progman")) == 0)
return TRUE;

char szWndText[556];
GetWindowText(hWnd, szWndText, 556);
if (strlen(szWndText) > 0) AfxMessageBox(szWndText);//Displays name
return TRUE;
}


// do callback
EnumWindows((WNDENUMPROC)AddWinsList, (LPARAM)0);

Thanks
neil

AnswerRe: How do I retrieve a list of applications running? Pin
Todd Smith7-May-02 11:12
Todd Smith7-May-02 11:12 
AnswerRe: How do I retrieve a list of applications running? Pin
Tom Archer7-May-02 11:20
Tom Archer7-May-02 11:20 
AnswerRe: How do I retrieve a list of applications running? Pin
Ravi Bhavnani7-May-02 11:45
professionalRavi Bhavnani7-May-02 11:45 
GeneralBlock Thread while running a child process Pin
Mike Doner7-May-02 10:10
Mike Doner7-May-02 10:10 
GeneralRe: Block Thread while running a child process Pin
Tim Deveaux7-May-02 10:13
Tim Deveaux7-May-02 10:13 
GeneralRe: Block Thread while running a child process Pin
Joaquín M López Muñoz7-May-02 10:14
Joaquín M López Muñoz7-May-02 10:14 
GeneralRe: Block Thread while running a child process Pin
Carlos Antollini7-May-02 10:22
Carlos Antollini7-May-02 10:22 
GeneralRe: Block Thread while running a child process Pin
Mike Doner7-May-02 10:25
Mike Doner7-May-02 10:25 
GeneralCMap question Pin
7-May-02 9:39
suss7-May-02 9:39 
GeneralRe: CMap question Pin
Joaquín M López Muñoz7-May-02 9:48
Joaquín M López Muñoz7-May-02 9:48 
GeneralRe: CMap question Pin
Chris Losinger7-May-02 9:48
professionalChris Losinger7-May-02 9:48 
GeneralRe: CMap question Pin
Christian Graus7-May-02 11:34
protectorChristian Graus7-May-02 11:34 
GeneralRe: CMap question Pin
Alexandru Savescu7-May-02 23:43
Alexandru Savescu7-May-02 23:43 
GeneralRe: CMap question Pin
Christian Graus8-May-02 10:59
protectorChristian Graus8-May-02 10:59 
GeneralDeleting a file Pin
kyledunn7-May-02 9:11
kyledunn7-May-02 9:11 
GeneralRe: Deleting a file Pin
Joaquín M López Muñoz7-May-02 9:18
Joaquín M López Muñoz7-May-02 9:18 
GeneralRe: Deleting a file Pin
kyledunn7-May-02 9:35
kyledunn7-May-02 9:35 

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.