Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Coding Prodigy on February 19, 2013, 11:22:22 pm

Title: Can someone make a program that maximizes CMD and disables the maximize button?
Post by: Coding Prodigy on February 19, 2013, 11:22:22 pm
Okay, do I made a really cool and advanced batch file with over 3,000 lines of code. So far, I made it have a title sequence with sound that termporarily pauses Windows Media Player, and a part that checks for updated versions. Now when I start it, there is a big windows logo made of 0's and 1's, but it's too big to fit in a normal window. Can someone please make me a code in C++ that maximizes it and then disables the maximize button on the window and menu? (ONLY THAT WINDOW; NOT THE OTHERS) I have a Windows Vista 32-bit. The title of the window is Title Sequence. The window class is "ConsoleWindowClass"

Help would be greately appreciated, Coding Prodigy.
maximize button of that i
Title: Re: Can someone make a program that maximizes CMD and disables the maximize button?
Post by: Ceniza on February 20, 2013, 05:38:01 pm
May I ask how that is related to Code::Blocks? It looks like a WINAPI question to me.
Title: Re: Can someone make a program that maximizes CMD and disables the maximize button?
Post by: Coding Prodigy on February 21, 2013, 03:56:12 am
It is related to code blocks because I almost made that one that worked in this program! The only issue was that it only worked when the window was in it's normal state. I needed it to be maximized, and then disable the maximize button. Here's the non-working code:

#include <iostream>
 #include <Windows.h>

int main()
 {

HWND hwnd = FindWindowA("ConsoleWindowClass", "Title Sequence");// replace Title Sequence with the name of whatever window you want to target. You could also target by class name, the first param
 RemoveMenu(GetSystemMenu(hwnd, FALSE), SC_MAXIMIZE, MF_GRAYED);
std::cin.get();
 return 0;
 }
Title: Re: Can someone make a program that maximizes CMD and disables the maximize button?
Post by: Ceniza on February 21, 2013, 07:19:48 pm
I still don't see how it is related to Code::Blocks. Code::Blocks is just an IDE, not a compiler. We do not provide support for general programming questions, and that includes the use of APIs (like WINAPI) other than Code::Blocks' SDK (which you would use to extend the IDE through plugins).

I suggest you to ask that kind of question in a place like StackOverflow. I also suggest you to read the forum rules, as you are clearly violating them.
Title: Re: Can someone make a program that maximizes CMD and disables the maximize button?
Post by: Coding Prodigy on February 21, 2013, 11:06:26 pm
Oh! Okay. Sorry about that! I'm kinda new with this . . .  ;D :-[