1.

Solve : Maximise Window.?

Answer»

I am writing a C program and I want that when I run the code, the window maximises itself automatically. Is there any function or command which I can use?

Thanks Learn something new every day. Always thought the C++ had the windows not C.

Code: [Select]ShowWindow(hWnd,SW_SHOWMAXIMIZED)

hWnd would be the window handle

Good luck. Thanks a lot SIDEWINDER. It should work.

But how should I set the window handle ?Wait a minute Sidewinder.
I think you MISUNDERSTOOD my question. Let me explain myself a bit better.

I wrote a C program which runs in a DOS prompt window. But the window is set by default to be 25 characters in height, i.e. it is not completely maximised. I would like a command which can maximise the command prompt window automatically.

Hope this is a better explanation.

Thanks again for your interest. OK, this has nothing to do with C and everything to do with the command prompt.

Try STARTING your program and use the /max switch to CONTROL the window size:

Code: [Select]start /max C-program

Good luck. As, I said C and C++ programming language. While writing a program
and I want that when I run the code, the window maximizes itself automatically. Is there any function or any short cut to Maximize.

_______________________________________ ____

priya1

[link Removed - please do not advertise other websites]Quote from: priya1 on August 29, 2008, 01:12:01 AM

As, I said C and C++ programming language. While writing a program
and I want that when I run the code, the window maximizes itself automatically. Is there any function or any short cut to Maximize.

The question is ambiguous. What window? The program window or the command window. Either way the question has been asked and answered.

If it's the program window, see reply #1 above.
If it's the command window, see reply #4 above



Discussion

No Comment Found