Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Can someone make a program that maximizes CMD and disables the maximize button?
(1/1)
Coding Prodigy:
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
Ceniza:
May I ask how that is related to Code::Blocks? It looks like a WINAPI question to me.
Coding Prodigy:
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;
}
Ceniza:
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.
Coding Prodigy:
Oh! Okay. Sorry about that! I'm kinda new with this . . . ;D :-[
Navigation
[0] Message Index
Go to full version