Click here to Skip to main content
15,914,221 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Syntax Error Pin
romuzu14-Mar-06 21:12
romuzu14-Mar-06 21:12 
GeneralRe: Syntax Error Pin
Nibu babu thomas14-Mar-06 21:14
Nibu babu thomas14-Mar-06 21:14 
GeneralRe: Syntax Error Pin
romuzu14-Mar-06 21:35
romuzu14-Mar-06 21:35 
GeneralRe: Syntax Error Pin
Nibu babu thomas14-Mar-06 21:44
Nibu babu thomas14-Mar-06 21:44 
QuestionCombo box - Event Handler - CBN_SELCHANGE Pin
Joy Anne14-Mar-06 20:42
Joy Anne14-Mar-06 20:42 
AnswerRe: Combo box - Event Handler - CBN_SELCHANGE Pin
Nibu babu thomas14-Mar-06 20:47
Nibu babu thomas14-Mar-06 20:47 
QuestionFull Screen, please check problem in code Pin
Aqueel14-Mar-06 20:18
Aqueel14-Mar-06 20:18 
AnswerRe: Full Screen, please check problem in code Pin
Nibu babu thomas14-Mar-06 20:23
Nibu babu thomas14-Mar-06 20:23 
Aqueel wrote:
Please tell me what is "test.exe". Is it output file of my project.
Thank you.


Yes you are right.

It is trying to get the handle to the console window based on it's caption. This won't work. As caption contains the full path.

Aqueel wrote:
But nothing happens after when this code runs.


This is because hwndConsole is NULL.

Do the following to get it working...

TCHAR oldTitle[MAX_PATH];
GetConsoleTitle(oldTitle, MAX_PATH);//get the old title
TCHAR *newTitle = _T("My new title...zx1213");//new title
SetConsoleTitle(newTitle);//set it
//now find the window and maximize it
HWND hwndConsole = NULL;
hwndConsole = FindWindow(NULL, newTitle);//use new title to find the window
if(NULL != hwndConsole)
{
SetForegroundWindow(hwndConsole);
ShowWindow(hwndConsole, SW_MAXIMIZE);
}
SetConsoleTitle(oldTitle);//restore the title back

Nibu thomas
Software Developer

GeneralRe: Full Screen, please check problem in code Pin
Aqueel14-Mar-06 20:36
Aqueel14-Mar-06 20:36 
GeneralRe: Full Screen, please check problem in code Pin
Nibu babu thomas14-Mar-06 20:37
Nibu babu thomas14-Mar-06 20:37 
GeneralRe: Full Screen, please check problem in code Pin
Aqueel14-Mar-06 21:16
Aqueel14-Mar-06 21:16 
GeneralRe: Full Screen, please check problem in code Pin
Nibu babu thomas14-Mar-06 22:27
Nibu babu thomas14-Mar-06 22:27 
GeneralRe: Full Screen, please check problem in code Pin
Aqueel15-Mar-06 20:04
Aqueel15-Mar-06 20:04 
GeneralRe: Full Screen, please check problem in code Pin
Nibu babu thomas15-Mar-06 20:13
Nibu babu thomas15-Mar-06 20:13 
AnswerRe: Full Screen, please check problem in code Pin
Gavin Taylor15-Mar-06 0:08
professionalGavin Taylor15-Mar-06 0:08 
QuestionMDI Application Pin
Subramaniam s.V.14-Mar-06 19:41
Subramaniam s.V.14-Mar-06 19:41 
AnswerRe: MDI Application Pin
Rudolf Jan15-Mar-06 1:09
Rudolf Jan15-Mar-06 1:09 
Questionopening notepad Pin
rajeev8214-Mar-06 18:56
rajeev8214-Mar-06 18:56 
AnswerRe: opening notepad Pin
Nibu babu thomas14-Mar-06 19:04
Nibu babu thomas14-Mar-06 19:04 
AnswerRe: opening notepad Pin
Aqueel14-Mar-06 19:08
Aqueel14-Mar-06 19:08 
GeneralRe: opening notepad Pin
rajeev8214-Mar-06 19:37
rajeev8214-Mar-06 19:37 
GeneralRe: opening notepad Pin
Hamid_RT14-Mar-06 20:03
Hamid_RT14-Mar-06 20:03 
AnswerRe: opening notepad Pin
Hamid_RT14-Mar-06 19:29
Hamid_RT14-Mar-06 19:29 
AnswerRe: opening notepad Pin
Rudolf Jan15-Mar-06 1:15
Rudolf Jan15-Mar-06 1:15 
Questiontrapping enter key . Pin
rajeev8214-Mar-06 18:45
rajeev8214-Mar-06 18:45 

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.