Click here to Skip to main content
15,914,013 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to disable Shift key Pin
Anonymous30-Jan-04 2:52
Anonymous30-Jan-04 2:52 
QuestionAbout the WM_ENABLE? Pin
zhaopzhi29-Jan-04 18:13
zhaopzhi29-Jan-04 18:13 
AnswerRe: About the WM_ENABLE? Pin
Weiye Chen29-Jan-04 20:26
Weiye Chen29-Jan-04 20:26 
GeneralNeed a SDK Cool Button Pin
Cael29-Jan-04 18:08
Cael29-Jan-04 18:08 
GeneralRe: Need a SDK Cool Button Pin
alex.barylski29-Jan-04 18:12
alex.barylski29-Jan-04 18:12 
GeneralRe: Need a SDK Cool Button Pin
Cael30-Jan-04 3:48
Cael30-Jan-04 3:48 
GeneralRe: Need a SDK Cool Button Pin
Michael Dunn29-Jan-04 19:43
sitebuilderMichael Dunn29-Jan-04 19:43 
GeneralDetecting that a window has closed Pin
Ryan Binns29-Jan-04 18:07
Ryan Binns29-Jan-04 18:07 
What would be the "best" way to detect if a window in another process has closed (either been destroyed or received a WM_CLOSE)? I can think of 2 solutions:
  1. Sit in a busy loop calling IsWindow() on the HWND of the window
  2. Install a WH_CBT hook and look for the HCBT_DESTROYWND notification code
The first option is the easiest, but not good in terms of efficieny. The second is slightly more complex (though it's not too difficult) and would involve interprocess communication. It also has a performance hit on the system, although its processing would not be complex.

Does anyone have any other solutions?

Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

GeneralRe: Detecting that a window has closed Pin
basementman30-Jan-04 10:16
basementman30-Jan-04 10:16 
Questiondetecting logoff vs shutdown. WM_Endsession ?? Pin
rohit.dhamija29-Jan-04 18:07
rohit.dhamija29-Jan-04 18:07 
AnswerRe: detecting logoff vs shutdown. WM_Endsession ?? Pin
pankaj hedau17-Sep-10 21:43
pankaj hedau17-Sep-10 21:43 
Question0x8000?????? Pin
wow999929-Jan-04 18:06
wow999929-Jan-04 18:06 
AnswerRe: 0x8000?????? Pin
Ryan Binns29-Jan-04 18:11
Ryan Binns29-Jan-04 18:11 
GeneralRe: 0x8000?????? Pin
Steve S30-Jan-04 1:35
Steve S30-Jan-04 1:35 
GeneralRe: 0x8000?????? Pin
Ryan Binns30-Jan-04 1:56
Ryan Binns30-Jan-04 1:56 
GeneralRe: 0x8000?????? Pin
Steve S30-Jan-04 2:44
Steve S30-Jan-04 2:44 
GeneralRe: 0x8000?????? Pin
Ryan Binns30-Jan-04 3:00
Ryan Binns30-Jan-04 3:00 
GeneralRe: 0x8000?????? Pin
Tim Smith30-Jan-04 4:22
Tim Smith30-Jan-04 4:22 
GeneralRe: 0x8000?????? Pin
Ryan Binns30-Jan-04 13:25
Ryan Binns30-Jan-04 13:25 
GeneralRe: 0x8000?????? Pin
Steve S1-Feb-04 2:25
Steve S1-Feb-04 2:25 
AnswerRe: 0x8000?????? Pin
фил29-Jan-04 21:52
фил29-Jan-04 21:52 
QuestionVC++ .Net Flaw?? Pin
closecall29-Jan-04 18:01
closecall29-Jan-04 18:01 
AnswerRe: VC++ .Net Flaw?? Pin
bneacetp29-Jan-04 19:13
bneacetp29-Jan-04 19:13 
GeneralRe: VC++ .Net Flaw?? Pin
Prakash Nadar29-Jan-04 22:39
Prakash Nadar29-Jan-04 22:39 
GeneralRe: VC++ .Net Flaw?? Pin
bneacetp30-Jan-04 7:09
bneacetp30-Jan-04 7:09 

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.