Click here to Skip to main content
15,918,268 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionContext Menu to a CTreeCtrl Pin
Like2Byte3-Feb-09 11:24
Like2Byte3-Feb-09 11:24 
AnswerRe: Context Menu to a CTreeCtrl Pin
Code-o-mat3-Feb-09 11:56
Code-o-mat3-Feb-09 11:56 
GeneralRe: Context Menu to a CTreeCtrl Pin
Like2Byte3-Feb-09 12:02
Like2Byte3-Feb-09 12:02 
GeneralRe: Context Menu to a CTreeCtrl Pin
rvangaal11-Jan-11 8:20
rvangaal11-Jan-11 8:20 
Question(HTML .hm file) Pin
sabdalla803-Feb-09 11:13
sabdalla803-Feb-09 11:13 
AnswerRe: (HTML .hm file) Pin
krmed4-Feb-09 0:51
krmed4-Feb-09 0:51 
GeneralRe: (HTML .hm file) Pin
sabdalla804-Feb-09 4:55
sabdalla804-Feb-09 4:55 
QuestionCapture Window Focus Change Pin
mjmim3-Feb-09 9:57
mjmim3-Feb-09 9:57 
Hey Guys,

If I want to know the process ID of the window that currently has focus then I call GetForegroundProcessID()....

I am trying to think of the best way to capture a change in the focused window.

I could create a systemhook on WH_CALLWNDPROC and search for a WM_ACTIVATE or WM_FOCUS message and check the process to whom it's being sent.

or

I could poll every x seconds and check who the window in focus is.

Is there any option that I am not thinking of that won't hurt my perfomance like system hooks will?
AnswerRe: Capture Window Focus Change Pin
Stuart Dootson3-Feb-09 10:31
professionalStuart Dootson3-Feb-09 10:31 
QuestionCreating a Cwnd larger than desktop resolution Pin
Member 42276043-Feb-09 8:55
Member 42276043-Feb-09 8:55 
AnswerRe: Creating a Cwnd larger than desktop resolution Pin
«_Superman_»3-Feb-09 18:27
professional«_Superman_»3-Feb-09 18:27 
QuestionLine Break For Rich Edit Controls Pin
ForNow3-Feb-09 6:29
ForNow3-Feb-09 6:29 
QuestionLine Number macros to use in output of Message Box? Pin
ldsdbomber3-Feb-09 5:44
ldsdbomber3-Feb-09 5:44 
AnswerRe: Line Number macros to use in output of Message Box? Pin
Stuart Dootson3-Feb-09 6:01
professionalStuart Dootson3-Feb-09 6:01 
QuestionSerial Interface Baud Rate higher than 115200 Pin
stebefbe3-Feb-09 5:31
stebefbe3-Feb-09 5:31 
AnswerRe: Serial Interface Baud Rate higher than 115200 Pin
Roger Stoltz3-Feb-09 5:51
Roger Stoltz3-Feb-09 5:51 
QuestionHelp on CString Pin
parth.p3-Feb-09 5:08
parth.p3-Feb-09 5:08 
AnswerRe: Help on CString Pin
krmed3-Feb-09 6:13
krmed3-Feb-09 6:13 
GeneralRe: Help on CString Pin
parth.p3-Feb-09 6:26
parth.p3-Feb-09 6:26 
GeneralRe: Help on CString Pin
Cedric Moonen3-Feb-09 7:25
Cedric Moonen3-Feb-09 7:25 
GeneralRe: Help on CString Pin
parth.p3-Feb-09 7:28
parth.p3-Feb-09 7:28 
GeneralRe: Help on CString Pin
CPallini3-Feb-09 9:38
mveCPallini3-Feb-09 9:38 
QuestionAvoid use of page file Pin
RomTibi3-Feb-09 4:52
RomTibi3-Feb-09 4:52 
AnswerRe: Avoid use of page file Pin
Stuart Dootson3-Feb-09 5:58
professionalStuart Dootson3-Feb-09 5:58 
GeneralRe: Avoid use of page file Pin
RomTibi3-Feb-09 8:51
RomTibi3-Feb-09 8:51 

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.