Click here to Skip to main content
16,005,178 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Live video processing / DirectX Pin
merlinos9-Jun-04 17:49
merlinos9-Jun-04 17:49 
GeneralRe: Live video processing / DirectX Pin
Andrew Walker10-Jun-04 15:26
Andrew Walker10-Jun-04 15:26 
GeneralRe: Live video processing / DirectX Pin
merlinos13-Jun-04 17:00
merlinos13-Jun-04 17:00 
GeneralRe: Live video processing / DirectX Pin
Andrew Walker16-Jun-04 0:48
Andrew Walker16-Jun-04 0:48 
QuestionHow to open new windows at the top of z-order, when process is not current process ? Pin
Defenestration8-Jun-04 12:34
Defenestration8-Jun-04 12:34 
AnswerRe: How to open new windows at the top of z-order, when process is not current process ? Pin
Ravi Bhavnani8-Jun-04 21:42
professionalRavi Bhavnani8-Jun-04 21:42 
AnswerRe: How to open new windows at the top of z-order, when process is not current process ? Pin
Diddy9-Jun-04 2:32
Diddy9-Jun-04 2:32 
GeneralRe: How to open new windows at the top of z-order, when process is not current process ? Pin
Defenestration9-Jun-04 18:01
Defenestration9-Jun-04 18:01 
Diddy wrote:
AttachThreadInput(GetWindowThreadProcessId(::GetForegroundWindow(),NULL),
GetCurrentThreadId(),TRUE);

SetForegroundWindow();
SetFocus();

AttachThreadInput(GetWindowThreadProcessId(::GetForegroundWindow(),NULL),
GetCurrentThreadId(),FALSE);


This is exactly what I want, thanks.

Two questions though:

Shouldn't the ThreadProcessId be stored when GetWindowThreadProcessId() is first called ? Otherwise, when you call it the second time, you are getting the ThreadProcessId of your apps window and not the original window, since it is no longer the Foreground Window.

Also, will it not make the other app unstable, because by stealing the threads input for a short period, you are also stealing its' messages. This means that certain messages, received during the time that my app has the other apps thread input, will not be handled by the other app. Bit of a convoluted description, I knowBlush | :O )

Anyway, will it make the other app (or my app) unstable ?

Thanks again for your help.
GeneralRe: How to open new windows at the top of z-order, when process is not current process ? Pin
Diddy9-Jun-04 23:44
Diddy9-Jun-04 23:44 
GeneralRe: How to open new windows at the top of z-order, when process is not current process ? Pin
Defenestration10-Jun-04 11:20
Defenestration10-Jun-04 11:20 
GeneralInteger & floating point divide by zero... Pin
herbert_chow8-Jun-04 12:12
herbert_chow8-Jun-04 12:12 
GeneralRe: Integer & floating point divide by zero... Pin
John R. Shaw8-Jun-04 15:52
John R. Shaw8-Jun-04 15:52 
GeneralRe: Integer & floating point divide by zero... Pin
Anonymous8-Jun-04 18:06
Anonymous8-Jun-04 18:06 
GeneralRe: Integer & floating point divide by zero... Pin
John R. Shaw8-Jun-04 19:04
John R. Shaw8-Jun-04 19:04 
GeneralRe: Integer & floating point divide by zero... Pin
Ryan Binns8-Jun-04 18:26
Ryan Binns8-Jun-04 18:26 
GeneralRe: Integer & floating point divide by zero... Pin
herbert_chow8-Jun-04 20:34
herbert_chow8-Jun-04 20:34 
GeneralChild window resizing.. Pin
Bob Stanneveld8-Jun-04 12:10
Bob Stanneveld8-Jun-04 12:10 
GeneralRe: Child window resizing.. Pin
valikac8-Jun-04 12:57
valikac8-Jun-04 12:57 
GeneralRe: Child window resizing.. Pin
Bob Stanneveld9-Jun-04 5:01
Bob Stanneveld9-Jun-04 5:01 
GeneralRe: Child window resizing.. Pin
Vadim Tabakman8-Jun-04 13:57
Vadim Tabakman8-Jun-04 13:57 
GeneralRe: Child window resizing.. Pin
Bob Stanneveld9-Jun-04 5:03
Bob Stanneveld9-Jun-04 5:03 
GeneralSolution! Pin
Bob Stanneveld9-Jun-04 5:01
Bob Stanneveld9-Jun-04 5:01 
QuestionWhy do VC++6 Service Packs cause code size to vary ? Pin
Defenestration8-Jun-04 11:49
Defenestration8-Jun-04 11:49 
AnswerRe: Why do VC++6 Service Packs cause code size to vary ? Pin
John R. Shaw8-Jun-04 16:09
John R. Shaw8-Jun-04 16:09 
GeneralRe: Why do VC++6 Service Packs cause code size to vary ? Pin
Defenestration8-Jun-04 16:53
Defenestration8-Jun-04 16:53 

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.