Hi. :)
I made a DLL in CodeBlocks / GCC MinGW compiler, that can be called to change the border style of the active window. One of those functions I created can change the window from being fixed, to resizeable, with the maximize (and minimize) button enabled.
#include "main.h"
#include <cstdlib>
#define DLL extern "C" _declspec(dllexport)
DLL double Resizeable()
{
SetWindowLongPtr(GetActiveWindow(),GWL_STYLE, WS_VISIBLE|WS_SYSMENU|
WS_BORDER|WS_CAPTION|
WS_SIZEBOX|WS_MINIMIZEBOX|
WS_MAXIMIZEBOX|WS_CLIPCHILDREN
);
return 0;
}
The window initially is a size smaller than the screen resolution, to be exact it's 640x480 and my screen display is 1280x1024. So when I maximize the window, it fills the entire display area above the task bar, just as all maximized applications should.
The problem is, when I try to "un-maximize", (or press the maximize button when already maximized), it doesn't do anything. Instead of returning to its original size/pos and automatically remembering that original size/pos, it just stays maximized and filling the screen.
A little help or code snippet anyone?
Thanks.
Samuel