Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - time-killer-games

346
Finished Games / Re: Window Styler, Web Browser, and Embed Program
« on: October 05, 2014, 06:06:37 PM »
Agreeing with everything you just said. We've never really had a "good" president since Abraham Lincoln. Whether Republishit or Democrap.

Back on topic. My browser extension's crashing problem when calling BrowserDestroy() is finally fixed. Whoop whoop. ;D

347
Finished Games / Re: Window Styler, Web Browser, and Embed Program
« on: October 04, 2014, 10:22:01 PM »
Quote
confess the murder of Pancho Villa if they so choose
I will confess to that. But python being better than C++? Never!

It's said that once they got an elephant to admit he was the mouse that stole the presidents cheese  :D

I like playing golf while children are being beheaded in Syria, does that make me a donkey?


Well, that is the democrat animal. But I prefer the term ass.

I like assigning healthcare to screw the whole nation over while not effecting myself or the government itself, does that make me an ass?


No. It means you're on something.

Can we please leave irrelevent politics shit out of my topic? k' thanks! ;) :P

348
Programming Help / Re: C++ DestroyWindow() alternative
« on: October 04, 2014, 03:07:20 PM »
The funny thing is I've already tried setting the parent to the desktop handle a day or two ago and it still crashes. But I'll try it with the parent param as NULL and get back to you! Thank you! I'm a geek in training! ;D

349
Issues Help Desk / Re: Bad C++ generation
« on: October 04, 2014, 03:02:18 PM »
Hey I'm from Virginia too now I can rape you! :D

350
Programming Help / Re: C++ DestroyWindow() alternative
« on: October 04, 2014, 02:19:13 PM »
I can't do that because it requires DestroyWindow() which crashes GameMaker.

While using the hwnd param as the game handle can close the game:
Code: [Select]
SendMessage(hWnd, WM_CLOSE, 0, 0);I try the same thing on my browser handle and it just acts like it isn't supposed to do anything which is weird.

351
Programming Help / C++ DestroyWindow() alternative
« on: October 04, 2014, 01:45:29 PM »
DestroyWindow() closes my browser control but I recently discovered it also causes the game to crash after about 5-10 seconds.

Is there any other means possible I can close my browser window without closing or crashing the parent? GMStudio doesn't seem to like DestroyWindow(), and CloseWindow() doesn't actually close anything it just minimizes.  TerminateProcess() closes everything including the parent process.

Please help.

352
Finished Games / Re: Window Styler, Web Browser, and Embed Program
« on: October 02, 2014, 10:27:40 PM »
Thanks but I can't really compare to your genius. ;D I still can't contribute to ENIGMA effectively because of my limited C++ knowledge.

353
Finished Games / Re: Window Styler, Web Browser, and Embed Program
« on: October 02, 2014, 09:59:06 PM »
Thank you Bob, you're too kind. :)

The window focus issues that "Web Browser" and "Embed Program" aka "HostExe" had are no longer present. I fixed them, and the new version is now public both on the GMStudio Maketplace and in the OP download links! :D

354
Off-Topic / Re: What we could have if Enigma would be closed source :(
« on: October 02, 2014, 06:23:43 PM »
Actually hairy, that's not my only point. Contributors come and go. They explode with contributions one day and die in a car accident or lose interest in the project all-together the next. If you guys only gave specific people the code, that's self-destruction. ENIGMA right now is a huge heaping pile of shit no one notices or cares about other than like what? Two people in all of planet earth? Those two people are develops so they don't count they don't just make games with ENIGMA they are willing to put up with the shitty engine because they know how to tweak it until it does something right, little do they know, nothing hardly ever in a decade gets fixed around here. Something gets fixed then ten things break. I agree with Bob.

Closed-sourcing the shit heap will do nothing but decrease it's chances of becoming anything more than what it is, for the lack of a better word, "good soil". That's right, poop. Less people will be willing to help develop it. And the nature of closed-source is that the people who are in charge won't be as willing to share their code with "just anybody". And boom! Enigma gets wiped out just like the dinosaurs.

Robert and sorlok can't do it all by themselves, that's a joke. No one can do all that kinda work in such small numbers. We need to grow our community, not die it off.

355
Finished Games / Re: Window Styler, Web Browser, and Embed Program
« on: October 02, 2014, 06:03:51 PM »
@Bob

Turns out I found a super easy fix which had nothing to do with any of your suggestions. Thanks anyways.

It makes the child window and parent have the same focus at all times. it works great with all window styles except fake fullscreen but I'm sure it won't be long now before I fix that too.

356
General ENIGMA / Re: General Enigma Questions
« on: October 02, 2014, 03:52:00 PM »
1) GML plus C++ plus many GML-like function the GM doesn't have (video_add(), etc) = EDL.

2) yes, as explained in point #1.

3) ENIGMA has almost everything except platform-specific stuff that the current platforms in ENIGMA (Windows, Mac, Linux are the only targets supported) doesn't currently support. So that means no Windows 8 store, Windows Phone, Android, iOS, etc functions (yet). Such as virtual_key_ad(), IAP, appstore achievement functions, etc.

All GML functions added are made to work exactly as it does in GM to maintain compatibility as decent as the ENIGMA developers and contributors can handle. This means all argument counts, argument usages, function names, and function capabilities are the same, unless someone broke something. Syntax is the same to, but with optional C++ syntaxing for stuff like namespace and classes also added.

4) Just type C++ code in the in the "Execute Code" DND like you normally would with GML, but you can make use of both, meaning no strict syntax shit C++ would normally force on you. Also since it's open source, you may modify the C++ of the engine itself too if you'd like.

5) Yes, modify LGM in java as the IDE is also open source. :P but good idea worth bouncing off with Josh, ISM, or Robert so they can do that for you.

6) yes ENIGMA's speed, performance and game file sizes KILL GM, GMStudio, and their crappy YYC. I've tested this myself, so has Robert, and others.

Hopefully that's about it. You're welcome. :D



357
Off-Topic / Re: What we could have if Enigma would be closed source :(
« on: October 02, 2014, 03:12:11 PM »
This discussion is so pointless it makes my..

358
Finished Games / Re: Window Styler, Web Browser, and Embed Program
« on: October 02, 2014, 02:52:29 PM »
Okay scratch what I said in the above post, it will compile fine now..
Code: [Select]
#include "main.h"
#define DLL extern "C" _declspec(dllexport)
HANDLE handle=NULL;
HWND apphwnd;
HWND game;
HWND childhwnd;
RECT rect;

LRESULT CALLBACK DllChildWndProc (HWND hWndParameter, UINT message,WPARAM wParam, LPARAM lParam)
{
  switch (message) {
    case WM_CREATE:
    return 0;
    break;
  }
  return DefWindowProc(hWndParameter, message, wParam, lParam);
}

void MergeChildWithParent(HWND childWindowhWnd, UINT message,WPARAM wParam, LPARAM lParam){
  SetWindowLong(childWindowhWnd, GWL_WNDPROC, DllChildWndProc(childWindowhWnd,message,wParam,lParam));
}

int CALLBACK EnumWindowsProc(HWND hwnd, LPARAM param)
{
DWORD pID;
DWORD TpID = GetWindowThreadProcessId(hwnd, &pID);
if (TpID == (DWORD)param)
{
apphwnd=hwnd;
return false;
}
return true;
}

HANDLE StartProcess(LPCTSTR program,LPCTSTR args)
{

     HANDLE hProcess = NULL;
     PROCESS_INFORMATION processInfo;
     STARTUPINFO startupInfo;
     ::ZeroMemory(&startupInfo,sizeof(startupInfo));
     startupInfo.cb=sizeof(startupInfo);
     if(::CreateProcess(program,(LPTSTR)args,
                        NULL,
                        NULL,
                        FALSE,
                        0,
                        NULL,
                        NULL,
                        &startupInfo,
                        &processInfo))
        {
            WaitForInputIdle(processInfo.hProcess,INFINITE);
::EnumWindows(&EnumWindowsProc,processInfo.dwThreadId);
        hProcess=processInfo.hProcess;
        }
     return hProcess;
}

DLL double HostingStartEmbed(double WindowHandle,char *Exe,char *Title,char *Class)
{
    if (handle!=NULL)
{
    TerminateProcess(handle,0);
    handle=NULL;
}

    game=FindWindow("YYGameMakerYY",NULL);

    if ((HWND)(DWORD)WindowHandle!=NULL)
    {
    childhwnd=FindWindow(Class,Title);
    GetClientRect((HWND)(DWORD)WindowHandle,&rect);
    handle=StartProcess(Exe,"");

    if (childhwnd==NULL)
{
        if(apphwnd!=NULL)
        {
            ::SetParent(apphwnd,(HWND)(DWORD)WindowHandle);
            SetWindowLong(apphwnd, GWL_STYLE, WS_VISIBLE);
            ::MoveWindow(apphwnd,rect.left,rect.top,rect.right,rect.bottom, true);
        }
}
else
    {
        ::SetParent(childhwnd,(HWND)(DWORD)WindowHandle);
        SetWindowLong(childhwnd, GWL_STYLE, WS_VISIBLE);
        ::MoveWindow(childhwnd,rect.left,rect.top,rect.right,rect.bottom, true);
    }
    }
    else
    {
    childhwnd=FindWindow(Class,Title);
    GetClientRect(game,&rect);
    handle=StartProcess(Exe,"");

    if (childhwnd==NULL)
{
        if(apphwnd!=NULL)
        {
            ::SetParent(apphwnd,game);
            SetWindowLong(apphwnd, GWL_STYLE, WS_VISIBLE);
            SetWindowLong(apphwnd, GWL_EXSTYLE, WS_EX_APPWINDOW|WS_EX_TOOLWINDOW);

            ::MoveWindow(apphwnd,rect.left,rect.top,rect.right,rect.bottom, true);
        }
}
else
    {
        ::SetParent(childhwnd,game);
        SetWindowLong(childhwnd, GWL_STYLE, WS_VISIBLE);
        ::MoveWindow(childhwnd,rect.left,rect.top,rect.right,rect.bottom, true);
    }
    }

return 0;
}

DLL double HostingEndEmbed()
{
    if (handle!=NULL)
{
    TerminateProcess(handle,0);
    handle=NULL;
}
return 0;
}

DLL double HostingSetRectangle(double Left,double Top,double Right,double Bottom)
{
    if (childhwnd==NULL)
{
        if (apphwnd!=NULL)
        {
            ::MoveWindow(apphwnd,Left,Top,Right,Bottom,true);
        }
}
else
    {
        ::MoveWindow(childhwnd,Left,Top,Right,Bottom,true);
    }
return 0;
}
But I have no idea what to do next. Or.. Is there still something wrong with what I have right now?

359
Finished Games / Re: Window Styler, Web Browser, and Embed Program
« on: October 02, 2014, 02:00:17 PM »
Sorry for taking so long Bob, I have the code and error message at the ready.

Code:
Code: [Select]
#include "main.h"
#define DLL extern "C" _declspec(dllexport)
HANDLE handle=NULL;
HWND apphwnd;
HWND game;
HWND childhwnd;
RECT rect;

long LRESULT CALLBACK DllChildWndProc (HWND hWndParameter, UINT message,WPARAM wParam, LPARAM lParam)
{
  switch (message) {
    case WM_CREATE:
      return 0;
  }
  return DefWindowProc(hWndParameter, message, wParam, lParam);
}

void MergeChildWithParent(HWND childWindowhWnd) {
  SetWindowLong(childWindowhWnd, GWL_WNDPROC, DllChildWndProc);
}

int CALLBACK EnumWindowsProc(HWND hwnd, LPARAM param)
{
DWORD pID;
DWORD TpID = GetWindowThreadProcessId(hwnd, &pID);
if (TpID == (DWORD)param)
{
apphwnd=hwnd;
return false;
}
return true;
}

HANDLE StartProcess(LPCTSTR program,LPCTSTR args)
{

     HANDLE hProcess = NULL;
     PROCESS_INFORMATION processInfo;
     STARTUPINFO startupInfo;
     ::ZeroMemory(&startupInfo,sizeof(startupInfo));
     startupInfo.cb=sizeof(startupInfo);
     if(::CreateProcess(program,(LPTSTR)args,
                        NULL,
                        NULL,
                        FALSE,
                        0,
                        NULL,
                        NULL,
                        &startupInfo,
                        &processInfo))
        {
            WaitForInputIdle(processInfo.hProcess,INFINITE);
::EnumWindows(&EnumWindowsProc,processInfo.dwThreadId);
        hProcess=processInfo.hProcess;
        }
     return hProcess;
}

DLL double HostingStartEmbed(double WindowHandle,char *Exe,char *Title,char *Class)
{
    if (handle!=NULL)
{
    TerminateProcess(handle,0);
    handle=NULL;
}

    game=FindWindow("YYGameMakerYY",NULL);

    if ((HWND)(DWORD)WindowHandle!=NULL)
    {
    childhwnd=FindWindow(Class,Title);
    GetClientRect((HWND)(DWORD)WindowHandle,&rect);
    handle=StartProcess(Exe,"");

    if (childhwnd==NULL)
{
        if(apphwnd!=NULL)
        {
            ::SetParent(apphwnd,(HWND)(DWORD)WindowHandle);
            SetWindowLong(apphwnd, GWL_STYLE, WS_VISIBLE);
            ::MoveWindow(apphwnd,rect.left,rect.top,rect.right,rect.bottom, true);
        }
}
else
    {
        ::SetParent(childhwnd,(HWND)(DWORD)WindowHandle);
        SetWindowLong(childhwnd, GWL_STYLE, WS_VISIBLE);
        ::MoveWindow(childhwnd,rect.left,rect.top,rect.right,rect.bottom, true);
    }
    }
    else
    {
    childhwnd=FindWindow(Class,Title);
    GetClientRect(game,&rect);
    handle=StartProcess(Exe,"");

    if (childhwnd==NULL)
{
        if(apphwnd!=NULL)
        {
            ::SetParent(apphwnd,game);
            SetWindowLong(apphwnd, GWL_STYLE, WS_VISIBLE);
            SetWindowLong(apphwnd, GWL_EXSTYLE, WS_EX_APPWINDOW|WS_EX_TOOLWINDOW);

            ::MoveWindow(apphwnd,rect.left,rect.top,rect.right,rect.bottom, true);
        }
}
else
    {
        ::SetParent(childhwnd,game);
        SetWindowLong(childhwnd, GWL_STYLE, WS_VISIBLE);
        ::MoveWindow(childhwnd,rect.left,rect.top,rect.right,rect.bottom, true);
    }
    }

return 0;
}

DLL double HostingEndEmbed()
{
    if (handle!=NULL)
{
    TerminateProcess(handle,0);
            handle=NULL;
}
return 0;
}

DLL double HostingSetRectangle(double Left,double Top,double Right,double Bottom)
{
    if (childhwnd==NULL)
{
        if (apphwnd!=NULL)
        {
            ::MoveWindow(apphwnd,Left,Top,Right,Bottom,true);
        }
}
else
    {
        ::MoveWindow(childhwnd,Left,Top,Right,Bottom,true);
    }
return 0;
}

Error:
Code: [Select]
s\HostExe\main.cpp|9|error: expected initializer before 'DllChildWndProc'|
||=== Build finished: 1 errors, 0 warnings (0 minutes, 0 seconds) ===|

Note: apart from fixing that error I'm aware I'll still have more to do but one thing at a time I guess.

360
Finished Games / Re: Window Styler, Web Browser, and Embed Program
« on: October 02, 2014, 12:45:20 PM »
I discovered all this time BrowserDestroy() wasn't working and it was never working to begin with. I only tested destroying the browser at game end which is stupid because when the game ends all child windows are closed automatically.Meaning if anyone wanted to close the browser at any point before the game ends, the window (until now) would still be there!

BrowserDestroy() is now fixed in the most recent Marketplace update, and from the same link in the OP. :D