Solved

Setting Win32 Console app in foreground

Posted on 1998-12-22
2
289 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

920 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now