Jump to content


Photo

Minimize The Gm Window


  • Please log in to reply
1 reply to this topic

#1 the_doominator

the_doominator

    Eight Star

  • New Member
  • 925 posts

Posted 22 September 2007 - 10:39 PM

Here it is, finally, I feel really stupid for not seeing this function yet.

For all of those who don't know, here's why I made this: So far all Minimizing DLL's have the "minimize" animation coming from the center of the screen, and down to the taskbar. This function actually duplicates what would happen if you pressed the minimize button on the border.

It just wraps the WM_SYSCOMMAND message for Game Maker. It comes with source, but don't expect too much. Its only one function.

Download
I removed this dll and implemented the only function into my Window DLL
However, the source is still here....

and just in case (you == Not_Downloading) here is the full source (really!)
#include <windows.h>#define export extern "C" __declspec(dllexport)export double perform_syscommand(double Window, double Style){    int Int = (int) Style;    if (Int != 0)    {        switch (Int)        {            case 1:                return (double) SendMessage( (HWND)(int) Window , WM_SYSCOMMAND , SC_MINIMIZE , (LPARAM) NULL );              break;            case 2:                return (double) SendMessage( (HWND)(int) Window , WM_SYSCOMMAND , SC_MAXIMIZE , (LPARAM) NULL );              break;            case 3:                return (double) SendMessage( (HWND)(int) Window , WM_SYSCOMMAND , SC_RESTORE , (LPARAM) NULL );              break;            case 4:                return (double) SendMessage( (HWND)(int) Window , WM_SYSCOMMAND , SC_CLOSE , (LPARAM) NULL );              break;            case 5:                return (double) SendMessage( (HWND)(int) Window , WM_SYSCOMMAND , SC_DEFAULT , (LPARAM) NULL );              break;            default:                return 0;              break;        }    }    else return 0;}

Edited by the_doominator, 14 October 2007 - 09:27 PM.

  • 0

#2 Armagedn

Armagedn

    GMC Member

  • New Member
  • 100 posts

Posted 26 September 2007 - 01:43 AM

Thank you very much for your professional DLL writing abilities. This is quite useful and better than other similar DLL's because it looks natural. C'est Supercool!!
  • 0