Click here to Skip to main content
15,917,618 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioncode Pin
samar aladwan16-May-09 5:18
samar aladwan16-May-09 5:18 
AnswerRe: code Pin
CPallini16-May-09 5:27
mveCPallini16-May-09 5:27 
AnswerRe: code Pin
0x3c016-May-09 5:43
0x3c016-May-09 5:43 
AnswerRe: code Pin
David Crow16-May-09 18:07
David Crow16-May-09 18:07 
QuestionHow to let an SDI-Appliction automatically scroll Pin
susanne116-May-09 3:44
susanne116-May-09 3:44 
AnswerRe: How to let an SDI-Appliction automatically scroll Pin
«_Superman_»16-May-09 3:56
professional«_Superman_»16-May-09 3:56 
GeneralRe: How to let an SDI-Appliction automatically scroll Pin
susanne118-May-09 0:37
susanne118-May-09 0:37 
GeneralRe: How to let an SDI-Appliction automatically scroll Pin
«_Superman_»18-May-09 0:45
professional«_Superman_»18-May-09 0:45 
GeneralRe: How to let an SDI-Appliction automatically scroll Pin
susanne118-May-09 0:56
susanne118-May-09 0:56 
QuestionMFC Popup Dialog GDI DirectDraw Pin
decap00816-May-09 3:23
decap00816-May-09 3:23 
Questionneed code solution plz Pin
samar aladwan16-May-09 3:22
samar aladwan16-May-09 3:22 
AnswerRe: need code solution plz Pin
Rajesh R Subramanian16-May-09 3:41
professionalRajesh R Subramanian16-May-09 3:41 
AnswerRe: need code solution plz Pin
CPallini16-May-09 3:47
mveCPallini16-May-09 3:47 
Answerneed a code plz Pin
samar aladwan16-May-09 3:20
samar aladwan16-May-09 3:20 
GeneralRe: need a code plz Pin
Chris Losinger17-May-09 14:53
professionalChris Losinger17-May-09 14:53 
QuestionFontDialog Pin
susanne116-May-09 3:18
susanne116-May-09 3:18 
QuestionWin32: Get message notification of other application's close/exit. Pin
WindowsPistha16-May-09 2:49
WindowsPistha16-May-09 2:49 
Hello ,

My application needs to monitor all other running applications on the system. Is there some way I could get notified on exit of every application exe?

The methods I could find:

1) Use PSAPI functions to get the list of running exes at frequent intervals. At each poll compare with the previous list to find which application/process has exited.
Disadvantage: Requires constant polling, will take CPU time.

2) Set a global hook for WM_CLOSE message: Using this I would be able to get a notification when any application gets closed through the close button on the title bar

Disadvantage:
(-) Not all the applications are generating a WM_CLOSE message (Ex: Total Video Player Exe)
(-) If the application was closed through the "Exit" menu or button (e.g. File->Exit) , I can't trap that message

Is there any other better way that I missed? Please advise.
AnswerRe: Win32: Get message notification of other application's close/exit. Pin
Taran916-May-09 2:58
Taran916-May-09 2:58 
GeneralRe: Win32: Get message notification of other application's close/exit. Pin
WindowsPistha16-May-09 3:20
WindowsPistha16-May-09 3:20 
GeneralRe: Win32: Get message notification of other application's close/exit. Pin
«_Superman_»16-May-09 3:51
professional«_Superman_»16-May-09 3:51 
QuestionRe: Win32: Get message notification of other application's close/exit. Pin
Rajesh R Subramanian16-May-09 3:51
professionalRajesh R Subramanian16-May-09 3:51 
AnswerRe: Win32: Get message notification of other application's close/exit. Pin
Stuart Dootson16-May-09 13:12
professionalStuart Dootson16-May-09 13:12 
GeneralRe: Win32: Get message notification of other application's close/exit. Pin
WindowsPistha17-May-09 2:56
WindowsPistha17-May-09 2:56 
GeneralRe: Win32: Get message notification of other application's close/exit. Pin
Randor 17-May-09 7:03
professional Randor 17-May-09 7:03 
GeneralRe: Win32: Get message notification of other application's close/exit. Pin
Identity Undisclosed3-Jun-09 19:43
Identity Undisclosed3-Jun-09 19:43 

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.