Click here to Skip to main content
16,013,489 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to make inactive window active Pin
V K 27-May-08 23:49
V K 27-May-08 23:49 
AnswerRe: how to make inactive window active Pin
Nitheesh George7-May-08 23:54
Nitheesh George7-May-08 23:54 
AnswerRe: how to make inactive window active Pin
Michael Schubert7-May-08 23:54
Michael Schubert7-May-08 23:54 
GeneralRe: how to make inactive window active Pin
V K 28-May-08 0:04
V K 28-May-08 0:04 
GeneralRe: how to make inactive window active Pin
Michael Schubert8-May-08 0:16
Michael Schubert8-May-08 0:16 
GeneralRe: how to make inactive window active Pin
V K 28-May-08 0:25
V K 28-May-08 0:25 
GeneralRe: how to make inactive window active Pin
Michael Schubert8-May-08 0:28
Michael Schubert8-May-08 0:28 
AnswerRe: how to make inactive window active [modified] Pin
Nibu babu thomas8-May-08 0:42
Nibu babu thomas8-May-08 0:42 
venkat.kupunaram wrote:
I want to bring inactive application to foregound. I


Does this help -> http://www.codeproject.com/KB/dialog/dlgboxtricks.aspx[^]

Look at the section -> How to steal focus on 2K/XP. There is a hidden bug corrected by one of the forum members.

Here is the correct one!

//Attach foreground window thread to our thread
DWORD ForeGroundID = GetWindowThreadProcessId(::GetForegroundWindow(),NULL);
DWORD CurrentID   = GetCurrentThreadId();
AttachThreadInput ( ForeGroundID, CurrentID, TRUE );

//Do our stuff here 
SetForegroundWindow();
SetFocus(); //Just playing safe

//Detach the attached thread
AttachThreadInput ( ForeGroundID, CurrentID, FALSE );



Nibu thomas
Microsoft MVP for VC++


Code must be written to be read, not by the compiler, but by another human being.

Programming Blog: http://nibuthomas.wordpress.com

modified on Thursday, May 8, 2008 6:57 AM

GeneralRe: how to make inactive window active Pin
V K 28-May-08 1:42
V K 28-May-08 1:42 
QuestionCppUnit: Testrunner gives memory leaks Pin
Tomerland7-May-08 23:41
Tomerland7-May-08 23:41 
Questionhard drive manufacturer and slot information urgently require Pin
Madan Chauhan7-May-08 23:10
Madan Chauhan7-May-08 23:10 
AnswerRe: hard drive manufacturer and slot information urgently require Pin
CPallini7-May-08 23:23
mveCPallini7-May-08 23:23 
GeneralRe: hard drive manufacturer and slot information urgently require Pin
Madan Chauhan7-May-08 23:31
Madan Chauhan7-May-08 23:31 
GeneralCP Offender. Pin
leckey8-May-08 3:22
leckey8-May-08 3:22 
GeneralRe: hard drive manufacturer and slot information urgently require Pin
Rajesh R Subramanian8-May-08 1:27
professionalRajesh R Subramanian8-May-08 1:27 
GeneralRe: hard drive manufacturer and slot information urgently require Pin
Madan Chauhan8-May-08 1:50
Madan Chauhan8-May-08 1:50 
AnswerRe: hard drive manufacturer and slot information urgently require Pin
Rajesh R Subramanian8-May-08 1:59
professionalRajesh R Subramanian8-May-08 1:59 
GeneralRe: hard drive manufacturer and slot information urgently require Pin
Madan Chauhan8-May-08 2:35
Madan Chauhan8-May-08 2:35 
GeneralRe: hard drive manufacturer and slot information urgently require Pin
CPallini8-May-08 2:04
mveCPallini8-May-08 2:04 
GeneralRe: hard drive manufacturer and slot information urgently require Pin
leckey8-May-08 3:23
leckey8-May-08 3:23 
GeneralRe: hard drive manufacturer and slot information urgently require Pin
CPallini8-May-08 3:30
mveCPallini8-May-08 3:30 
GeneralRe: hard drive manufacturer and slot information urgently require Pin
leckey8-May-08 3:35
leckey8-May-08 3:35 
GeneralRe: hard drive manufacturer and slot information urgently require Pin
CPallini8-May-08 4:04
mveCPallini8-May-08 4:04 
GeneralRe: hard drive manufacturer and slot information urgently require Pin
leckey8-May-08 4:06
leckey8-May-08 4:06 
GeneralRe: hard drive manufacturer and slot information urgently require Pin
CPallini8-May-08 4:09
mveCPallini8-May-08 4: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.