Expanind DoS Window

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Oct 2009
Posts: 128
Reputation: restrictment is on a distinguished road 
Solved Threads: 9
restrictment's Avatar
restrictment restrictment is offline Offline
Junior Poster

Expanind DoS Window

 
0
  #1
33 Days Ago
Hey, I have been searching this for a while now, and I cannot find a c++ code that expands the window once opened. I have found multiple codes that claim it opens it in an expanded window, but in the end all I get is compiling errors.

If someone would be so kind as to give a full example code that will open the window in a larger format, it would be greatly appreciated.

Note: I am using Visual Studios Express Edition, not sure if it matters or not..

Edit: I just realized how retarded my typo was on the header. It's supposed to be 'expanded'. Sorry..I'm tired.
Last edited by restrictment; 33 Days Ago at 1:43 am.
Reply With Quote Quick reply to this message  
Join Date: Oct 2005
Posts: 302
Reputation: Clinton Portis is an unknown quantity at this point 
Solved Threads: 31
Clinton Portis's Avatar
Clinton Portis Clinton Portis is offline Offline
Posting Whiz
 
1
  #2
33 Days Ago
This guy can do some amazing stuff with the DOS console window.. best tutorial I've seen for become a master of the console:

http://www.adrianxw.dk/index.html

I think you'd be interested in, "Win32 Console Applications - Part 6"
http://www.adrianxw.dk/SoftwareSite/...Consoles6.html
Last edited by Clinton Portis; 33 Days Ago at 1:58 am.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 128
Reputation: restrictment is on a distinguished road 
Solved Threads: 9
restrictment's Avatar
restrictment restrictment is offline Offline
Junior Poster
 
0
  #3
33 Days Ago
Originally Posted by Clinton Portis View Post
This guy can do some amazing stuff with the DOS console window.. best tutorial I've seen for become a master of the console:

http://www.adrianxw.dk/index.html

I think you'd be interested in, "Win32 Console Applications - Part 6"
http://www.adrianxw.dk/SoftwareSite/...Consoles6.html
Works Great in how he made the window smaller and then back to normal again...didn't know you could do that.

However, it didn't really show me how to start it in full screen. I am really new to C++, so maybe I missed something..
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 73
Reputation: pspwxp fan is an unknown quantity at this point 
Solved Threads: 6
pspwxp fan pspwxp fan is offline Offline
Junior Poster in Training
 
0
  #4
33 Days Ago
If you want the CMD to be full screen, just press Alt+Enter :/
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,358
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1463
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning
 
-7
  #5
32 Days Ago
try this: compiled with vc++ 2008 express
  1. #include <windows.h>
  2. #include <iostream>
  3. using std::cin;
  4.  
  5. int main()
  6. {
  7. HWND hWnd = GetConsoleWindow();
  8. ShowWindow(hWnd,SW_MAXIMIZE);
  9. cin.get();
  10. return 0;
  11. }
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 128
Reputation: restrictment is on a distinguished road 
Solved Threads: 9
restrictment's Avatar
restrictment restrictment is offline Offline
Junior Poster
 
0
  #6
32 Days Ago
Originally Posted by Ancient Dragon View Post
try this: compiled with vc++ 2008 express
  1. #include <windows.h>
  2. #include <iostream>
  3. using std::cin;
  4.  
  5. int main()
  6. {
  7. HWND hWnd = GetConsoleWindow();
  8. ShowWindow(hWnd,SW_MAXIMIZE);
  9. cin.get();
  10. return 0;
  11. }
Thanks for the input...but I still get errors!!
  1. 1>conversation.obj : error LNK2028: unresolved token (0A0002BF) "extern "C" int __stdcall ShowWindow(struct HWND__ *,int)" (?ShowWindow@@$$J18YGHPAUHWND__@@H@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
  2. 1>conversation.obj : error LNK2019: unresolved external symbol "extern "C" int __stdcall ShowWindow(struct HWND__ *,int)" (?ShowWindow@@$$J18YGHPAUHWND__@@H@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)
  3. 1>C:\Users\Jake\Documents\Visual Studio 2008\Projects\test\Debug\test.exe : fatal error LNK1120: 2 unresolved externals
  4. 1>Build log was saved at "file://c:\Users\Jake\Documents\Visual Studio 2008\Projects\test\test\Debug\BuildLog.htm"
  5. 1>test - 3 error(s), 0 warning(s)
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 320
Reputation: cikara21 is an unknown quantity at this point 
Solved Threads: 63
cikara21's Avatar
cikara21 cikara21 is offline Offline
Posting Whiz
 
0
  #7
32 Days Ago
It worked with me..
  1. #include <windows.h>
  2. #include <iostream>
  3.  
  4. //maybe you should add this
  5. #pragma comment(lib,"kernel32.lib")
  6. #pragma comment(lib,"user32.lib")
  7. // this will puts a lib-search record in the object file
  8.  
  9. using std::cin;
  10.  
  11. int main()
  12. {
  13. HWND hWnd = GetConsoleWindow();
  14. ShowWindow(hWnd,SW_MAXIMIZE);
  15. cin.get();
  16. return 0;
  17. }
Last edited by cikara21; 32 Days Ago at 5:16 pm.
.:-cikara21-:.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 128
Reputation: restrictment is on a distinguished road 
Solved Threads: 9
restrictment's Avatar
restrictment restrictment is offline Offline
Junior Poster
 
0
  #8
32 Days Ago
Originally Posted by cikara21 View Post
It worked with me..
  1. #include <windows.h>
  2. #include <iostream>
  3.  
  4. //maybe you should add this
  5. #pragma comment(lib,"kernel32.lib")
  6. #pragma comment(lib,"user32.lib")
  7. // this will puts a lib-search record in the object file
  8.  
  9. using std::cin;
  10.  
  11. int main()
  12. {
  13. HWND hWnd = GetConsoleWindow();
  14. ShowWindow(hWnd,SW_MAXIMIZE);
  15. cin.get();
  16. return 0;
  17. }
Do you have the express edition?
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 7
Reputation: SCoder1 is an unknown quantity at this point 
Solved Threads: 0
SCoder1 SCoder1 is offline Offline
Newbie Poster

Different Compiler maybe?

 
0
  #9
32 Days Ago
Maybe you two could possibly have different compilers?
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC