Click here to Skip to main content
15,898,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionErrors not being reported on Windows Server 2003 box Pin
Interrobang8-Oct-10 10:06
Interrobang8-Oct-10 10:06 
AnswerRe: Errors not being reported on Windows Server 2003 box Pin
Rolf Kristensen8-Oct-10 12:01
Rolf Kristensen8-Oct-10 12:01 
QuestionWhen is an MFC application fully realized or how to reclaim focus/activation ? Pin
Maximilien8-Oct-10 4:26
Maximilien8-Oct-10 4:26 
AnswerRe: When is an MFC application fully realized or how to reclaim focus/activation ? Pin
Moak8-Oct-10 5:03
Moak8-Oct-10 5:03 
GeneralRe: When is an MFC application fully realized or how to reclaim focus/activation ? Pin
Maximilien8-Oct-10 8:08
Maximilien8-Oct-10 8:08 
GeneralRe: When is an MFC application fully realized or how to reclaim focus/activation ? Pin
Moak8-Oct-10 9:04
Moak8-Oct-10 9:04 
AnswerRe: When is an MFC application fully realized or how to reclaim focus/activation ? Pin
Sauro Viti8-Oct-10 5:04
professionalSauro Viti8-Oct-10 5:04 
AnswerRe: When is an MFC application fully realized or how to reclaim focus/activation ? Pin
Joe Woodbury10-Oct-10 9:08
professionalJoe Woodbury10-Oct-10 9:08 
An application cannot directly make itself the foreground app; only the active application can do that.

However, there are some fun tricks like having application B make application A the foreground app.

Another method is to attach to the foreground application:

DWORD foregroundProcessId = GetWindowThreadProcessId(::GetForegroundWindow(), NULL);
DWORD curThreadId = GetCurrentThreadId();

AttachThreadInput(foregroundProcessId, curThreadId, TRUE);

// do one or more of the following

ShowWindow(hWnd, SW_SHOW);
BringWindowToTop(hWnd);
SetActiveWindow(hWnd);
SetForegroundWindow(hWnd);
SetFocus(hWnd);

AttachThreadInput(foregroundProcessId, curThreadId, FALSE);

QuestionScrollbar move with mouse ? Pin
mesajflaviu8-Oct-10 2:51
mesajflaviu8-Oct-10 2:51 
AnswerRe: Scrollbar move with mouse ? Pin
Sauro Viti8-Oct-10 3:51
professionalSauro Viti8-Oct-10 3:51 
GeneralRe: Scrollbar move with mouse ? Pin
mesajflaviu8-Oct-10 5:49
mesajflaviu8-Oct-10 5:49 
GeneralRe: Scrollbar move with mouse ? Pin
Sauro Viti8-Oct-10 10:25
professionalSauro Viti8-Oct-10 10:25 
GeneralRe: Scrollbar move with mouse ? Pin
mesajflaviu9-Oct-10 2:27
mesajflaviu9-Oct-10 2:27 
AnswerRe: Scrollbar move with mouse ? Pin
mesajflaviu11-Oct-10 0:30
mesajflaviu11-Oct-10 0:30 
QuestionCodeJocks ToolkitPro in VS 2010? Pin
Stefan_Lang7-Oct-10 5:42
Stefan_Lang7-Oct-10 5:42 
AnswerRe: CodeJocks ToolkitPro in VS 2010? Pin
Rhuros7-Oct-10 23:29
professionalRhuros7-Oct-10 23:29 
GeneralRe: CodeJocks ToolkitPro in VS 2010? Pin
Stefan_Lang8-Oct-10 2:58
Stefan_Lang8-Oct-10 2:58 
GeneralRe: CodeJocks ToolkitPro in VS 2010? Pin
Rhuros8-Oct-10 3:27
professionalRhuros8-Oct-10 3:27 
GeneralRe: CodeJocks ToolkitPro in VS 2010? Pin
Stefan_Lang8-Oct-10 3:41
Stefan_Lang8-Oct-10 3:41 
AnswerRe: CodeJocks ToolkitPro in VS 2010? Pin
Rhuros8-Oct-10 4:47
professionalRhuros8-Oct-10 4:47 
GeneralRe: CodeJocks ToolkitPro in VS 2010? Pin
Stefan_Lang8-Oct-10 6:25
Stefan_Lang8-Oct-10 6:25 
QuestionVC++ debugger, mouse-over variable inspection question Pin
Dave Calkins7-Oct-10 3:18
Dave Calkins7-Oct-10 3:18 
AnswerRe: VC++ debugger, mouse-over variable inspection question Pin
Dave Calkins7-Oct-10 5:31
Dave Calkins7-Oct-10 5:31 
GeneralRe: VC++ debugger, mouse-over variable inspection question Pin
Dave Calkins7-Oct-10 6:10
Dave Calkins7-Oct-10 6:10 
GeneralRe: VC++ debugger, mouse-over variable inspection question Pin
Code-o-mat7-Oct-10 22:25
Code-o-mat7-Oct-10 22:25 

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.