Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Setting Win32 Console app in foreground

Posted on 1998-12-22
2
294 Views
Last Modified: 2013-12-03
I want to get an NT console application running in full screen mode in foreground. SetForeground window works only if the application is not in fullscreen mode.
Any ideas ?
0
Comment
Question by:HERESON
2 Comments
 
LVL 2

Accepted Solution

by:
zyqwert earned 70 total points
ID: 1417557
This worked for me on NT.

When you alt+tab away from a full screen console mode app, it is minimized, so a SetForegroundWindow will bring it to the foreground, but it will still be minimized.  To get it back in sight, tell it to show itself with ShowWindow:

case WM_LBUTTONDOWN:
{
   // I assume you know exactly which console window you want.
    HWND h= FindWindow("ConsoleWindowClass", NULL);
    SetForegroundWindow(h);
    ShowWindow(h, SW_MAXIMIZE);
}

0
 

Author Comment

by:HERESON
ID: 1417558
I've found the same answer by myself ths weekend.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question