Jump to content


Photo

Embed Dll


  • Please log in to reply
70 replies to this topic

#1 tangibleLime

tangibleLime

    Lunatic

  • GMC Elder
  • 2520 posts
  • Version:GM:HTML5

Posted 02 December 2005 - 01:44 AM

Embed DLL

Information
With this DLL, you can embed one into into another. You can also un-embed it. It also comes with a few hwnd functions to help you get the hwnd of the windows to embed and unembed.

Functions
Embed
Unembed
HWND from Class
HWND from Title
HWND from Point (x and y)
Desktop HWND (for un-embedding)

Special Notes
None

Download
Click Here to Download
  • 1
Posted ImagePosted Image

#2 pythonpoole

pythonpoole

    Scorpion Software

  • New Member
  • 1894 posts

Posted 02 December 2005 - 03:19 AM

Excellent :D

I've seen a similar Embed DLL but this one has a lot more features :wacko:

Good Work! :blink:
  • 0
- Ben

#3 hughman

hughman

    GMC Member

  • GMC Member
  • 568 posts

Posted 02 December 2005 - 03:21 AM

hmm... interesting
great idea for a dll...

edit: very nice!
don't have much use for it but will save it in case I ever do
I guess it's a nice idea but don't really know why to embed it
why would this be used?

Edited by hughman, 02 December 2005 - 03:51 AM.

  • 0

#4 Mousier Goatee

Mousier Goatee

    Mobile Cheese Factory

  • New Member
  • 48 posts

Posted 02 December 2005 - 05:07 AM

Once again, great work.
This is one of those DLL's that won't be on the most popular usage list
but it's just nice to have them out there in case you need them.

-Mousier Goatee :blink:
  • 0

#5 pythonpoole

pythonpoole

    Scorpion Software

  • New Member
  • 1894 posts

Posted 02 December 2005 - 08:48 AM

won't be on the most popular usage list

don't really know why to embed it why would this be used?

I think you two need to think about the usefullness more.

This can be used to create fake child windows. Take just about any program, for example, Game Maker Each script window, and resource properties window is a child of the main Game Maker Window.

Using this DLL you can open up a different GM made EXE within another one and have them communicate with eachother using textfiles or mplay functions.

Just about every program has child windows embedded into the program. From MS Word, to Firefox, to a billion more.


This is an essential DLL for software programming and also probably useful for SubOS development.

Ben
  • 0
- Ben

#6 tangibleLime

tangibleLime

    Lunatic

  • GMC Elder
  • 2520 posts
  • Version:GM:HTML5

Posted 02 December 2005 - 07:50 PM

Thanks for the comments, and thanks (pythonpoole) for the useage explination.
  • 0
Posted ImagePosted Image

#7 JJProductions

JJProductions

    Agamma Corpus

  • New Member
  • 2211 posts

Posted 02 December 2005 - 10:56 PM

Theres a differnt DLL which also has these functions and more...

Link removed - this is not your topic.

But good job anyways :GM122:

Edited by Smarty, 23 June 2006 - 08:04 AM.

  • 0

#8 tangibleLime

tangibleLime

    Lunatic

  • GMC Elder
  • 2520 posts
  • Version:GM:HTML5

Posted 04 December 2005 - 03:18 AM

Thanks
  • 0
Posted ImagePosted Image

#9 InfernalStrife

InfernalStrife

    www.devportal.tk

  • New Member
  • 77 posts

Posted 24 December 2005 - 05:57 PM

I attempted to use this a long time ago in my development of a Windows shell in GM. The project has been a success (http://devportal.fir...net/nushell.rar) however I was unable to use this in the final cut for the releases. The problem I had was I want to embed every window that is run from within the shell into the shell. I.E., I'd need to be able to get a window's HWND from the filename or the file handle in GM. Has this been udpated to a point where this is possible?

(Wonderful work though, you are by far my favorite DLL maker ^-^. Your DLLs provide the abstract functionality that I need to program applications and such in GM [Most people just do games, I do both ^-^])
  • 0

#10 Shinnoki

Shinnoki

    GMC Member

  • New Member
  • 582 posts

Posted 25 December 2005 - 01:08 AM

how exactly does the example work? all it did was that it opened notepad using execute_shell and then nothing. They were two separate windows so how do i embed one to the other?
  • 0

#11 GearGOD

GearGOD

    Deus Verus

  • GMC Member
  • 2153 posts

Posted 25 December 2005 - 01:13 AM

Nice work. One of the most useful things I've seen for a while now. And like all useful things, most people think it's useless.
  • 0
Engineers are not programmers. Stop thinking that you can save a few bucks by writing code yourself instead of hiring a programmer. Your code sucks.

#12 SleeK GeeK

SleeK GeeK

    The Biggest And The Best

  • New Member
  • 769 posts

Posted 25 December 2005 - 08:39 AM

Nice work. One of the most useful things I've seen for a while now. And like all useful things, most people think it's useless.

<{POST_SNAPBACK}>

Its not useless, and at the same time its not very useful, is it? The only use i can see is while creating a SubOS and other such things. Game Maker, was designed to make games and most game creators dont need embeding windows and other such things. Same applies to many of the dlls even i created.

Back on the topic, the dll is pretty cool.

Regards,
SleeK GeeK.
  • 0

#13 GearGOD

GearGOD

    Deus Verus

  • GMC Member
  • 2153 posts

Posted 25 December 2005 - 11:04 AM

The only use i can see is while creating a SubOS and other such things.

The use I saw straight away was to create a level/asset editor and not have to bother writing a huge gui for it. Here's what I did:
Posted Image
  • 0
Engineers are not programmers. Stop thinking that you can save a few bucks by writing code yourself instead of hiring a programmer. Your code sucks.

#14 ..::Origin::..

..::Origin::..

    GMC Member

  • New Member
  • 435 posts

Posted 25 December 2005 - 11:33 AM

The only use i can see is while creating a SubOS and other such things.

The use I saw straight away was to create a level/asset editor and not have to bother writing a huge gui for it. Here's what I did:
Posted Image

<{POST_SNAPBACK}>


off-topic-Does that compile it into .exe??
  • 0

#15 Shinnoki

Shinnoki

    GMC Member

  • New Member
  • 582 posts

Posted 25 December 2005 - 03:54 PM

seriously, am i missing something, this is all that happens when i run the example ( i have 6.1 REG )

Posted Image
  • 0

#16 tangibleLime

tangibleLime

    Lunatic

  • GMC Elder
  • 2520 posts
  • Version:GM:HTML5

Posted 25 December 2005 - 03:56 PM

Sir sir, you're computer is loading Notepad too slowly! The diagnosis: extend the waiting time for the program to embed!
  • 0
Posted ImagePosted Image

#17 Shinnoki

Shinnoki

    GMC Member

  • New Member
  • 582 posts

Posted 25 December 2005 - 04:30 PM

extended the sleeping time to 6000, didn't help. Notepad was opened long time before the GM window. Still no embedding, they opened as separate windows.

Edited by Shinnoki, 25 December 2005 - 04:31 PM.

  • 0

#18 tangibleLime

tangibleLime

    Lunatic

  • GMC Elder
  • 2520 posts
  • Version:GM:HTML5

Posted 25 December 2005 - 04:45 PM

Aye, you are not english. Change the string in the example to the caption of your version of notepad!
  • 0
Posted ImagePosted Image

#19 Shinnoki

Shinnoki

    GMC Member

  • New Member
  • 582 posts

Posted 25 December 2005 - 04:50 PM

Ohhh, so that was the problem. Hm, seems to be working now.
U should add a note about it to ur first post.
Thnx.

Edited by Shinnoki, 25 December 2005 - 04:50 PM.

  • 0

#20 Jay Da Master

Jay Da Master

    Block: Coming Soon...

  • New Member
  • 242 posts

Posted 21 June 2006 - 08:26 AM

Excuse me for being overly ignorant, but what is the 'Class' of a window? A n00bish question, I know. I just need to get the handle of a window that the user has opened.
  • 0

#21 comspy

comspy

    Veni Vidi Vici

  • New Member
  • 990 posts

Posted 21 June 2006 - 12:47 PM

hoora!

I found what i was looking for! Hoora!

One question though Roach, how do you change the program it opens?
  • 0

#22 bugeye999

bugeye999

    GMC Member

  • New Member
  • 260 posts

Posted 22 June 2006 - 12:49 AM

I just get an error defining an external function :)
  • 0

#23 JJProductions

JJProductions

    Agamma Corpus

  • New Member
  • 2211 posts

Posted 22 June 2006 - 02:10 AM

You do realize that this topic is more than six months old? The class of a window refers to the type of window it is. For instance, internet explorer has a class name of IEXPLORE, which instead of targeting one window, it would target all windows under the class of IEXPLORE, which means it would target all Internet explorer windows open. Kapeesh? Next time google it.
  • 0

#24 BZGaming

BZGaming

    GMC Member

  • New Member
  • 514 posts

Posted 22 June 2006 - 03:22 AM

@bugeye999: Did you extract all the files out of the zip file before you tried it?

BZ
  • 0

#25 SleeK GeeK

SleeK GeeK

    The Biggest And The Best

  • New Member
  • 769 posts

Posted 22 June 2006 - 05:19 PM

You do realize that this topic is more than six months old? The class of a window refers to the type of window it is. For instance, internet explorer has a class name of IEXPLORE, which instead of targeting one window, it would target all windows under the class of IEXPLORE, which means it would target all Internet explorer windows open. Kapeesh? Next time google it.

<{POST_SNAPBACK}>

To be more precise, a class of a window can be considered to be the style of a window. When creating a window, you can customize it in numberous ways (by modifying the window structure) and then register its class/style, so you dont need to specify them time and again for windows that may use the same style. A button, listbox etc are window classes.

Regards,
SleeK GeeK.
  • 0

#26 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 23 June 2006 - 12:03 AM

Just think that you will be able to embed compiled swf movies (.exe) in the game project... that's would be perfect for cutscenes if you used
fscommand("fullscreen","true") in the flash movie. -_-
  • 0
GM 8.1 / GM:HTML5 User

#27 SleeK GeeK

SleeK GeeK

    The Biggest And The Best

  • New Member
  • 769 posts

Posted 23 June 2006 - 02:20 AM

@kio

Absolutely, but the problem while embedding something ingame is that the latency of it being loaded and getting embedded. I dont know if this would work, but one of the way would be that the exe launching the GUI (or other program) should have its window state as hidden. If it finds its parent window to be one of the command line arguments (it would be sent to it while launching it, to ensure that having other gm games running doesnt make things complicated), it will be shown. As i said, i dont know if it would work, but theres no reason for it to not work too.

The second option is that all the exe file windows that have to be embedded would be opened by gm by giving a command line parameter of the window handle. The exe would open itself, set its default window state to hidden (much like the above), and instead of GM waiting and executing the embedding process, which can fail in many circumstances, the exe program itself sets its parent and embeds into the GM window. This way there may not be any problem, but this second method much of defeats the purpose of this dll itself.

Regards,
SleeK GeeK.
  • 0

#28 pacneppro

pacneppro

    GMC Member

  • New Member
  • 5 posts

Posted 23 June 2006 - 04:14 AM

is there a way i could use this to embed my program into say world of warcraft or somethin? BTW i love your dll -_-
  • 0

#29 BZGaming

BZGaming

    GMC Member

  • New Member
  • 514 posts

Posted 23 June 2006 - 03:55 PM

no, this dll is only for embeding things into gm, not the other way around...


BZ
  • 0

#30 SleeK GeeK

SleeK GeeK

    The Biggest And The Best

  • New Member
  • 769 posts

Posted 23 June 2006 - 04:03 PM

no, this dll is only for embeding things into gm, not the other way around...


BZ

<{POST_SNAPBACK}>

I am quite sure that it CAN be done, unless there is some built in protection to prevent it. Something like this would let you embed your GM program/game into Warcraft or any other program

embed_do(window_handle(),[handle of the program you want your program to be embedded in, can be found by hwnd_title or other ways])

Regards,
SleeK GeeK.
  • 0

#31 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 23 June 2006 - 06:02 PM

As far as I know, Warcraft is a fullscreen game, so I doubt if it can be embedded.
But no, you can't embed you gm-made game into Warcraft, because it doesn't call the embed.dll.
  • 0
GM 8.1 / GM:HTML5 User

#32 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 23 June 2006 - 06:11 PM

WoW can run in windowed ...
  • 0

#33 pacneppro

pacneppro

    GMC Member

  • New Member
  • 5 posts

Posted 23 June 2006 - 06:17 PM

no, this dll is only for embeding things into gm, not the other way around...


BZ

<{POST_SNAPBACK}>

I am quite sure that it CAN be done, unless there is some built in protection to prevent it. Something like this would let you embed your GM program/game into Warcraft or any other program

embed_do(window_handle(),[handle of the program you want your program to be embedded in, can be found by hwnd_title or other ways])

Regards,
SleeK GeeK.

<{POST_SNAPBACK}>

this is the code im using
dll_define();
execute_shell("knightonline.exe",0);
sleep(5000);
kohandle = hwnd_title("knight online client"); 
embed_do(window_handle(),kohandle);

but the problem is the game im playing somehow closes whenever it isnt selected.....
but that sorta did work....
  • 0

#34 takua108

takua108

    GMC Member

  • GMC Member
  • 582 posts

Posted 24 June 2006 - 04:25 AM

WoW is rendered using DirectX or OpenGL (I dunno which I haven't played it and don't plan on it), and if it's the former, I can't see you embedding DirectX (what GM uses) inside of DirectX, and if it's the latter, then it's pretty much impossible to embed DirectX into OpenGL.

Anyways, I'm probably missing something, but how do I get stuff returned by the embedded program? I'm ignorant of this sort of thing.
  • 0

#35 SleeK GeeK

SleeK GeeK

    The Biggest And The Best

  • New Member
  • 769 posts

Posted 24 June 2006 - 08:57 AM

There are many ways by which you can do that. Several ways are shared memory, through file, through registry or maybe through custom window messages. For GM, files and registry seem to be a good option (though slow).

@kio
I did not understand what you meant by "because it does not call the embed.dll." AFAIK, the embedding is done by using the SetParent and MoveWindow API, and can be called by any application. GM can set itself to be embedded into something, or embed two third-party application. I embedded two notepads into each other. But the problem is, they dont get drawn until the paint event is called (in cases of many application), so you may have to send that message to them constantly.

I am pretty sure full-screen applications may have a window name or atleast a class name.

Regards,
SleeK GeeK.

Edited by SleeK GeeK, 24 June 2006 - 08:58 AM.

  • 0

#36 metalhead1023

metalhead1023

    GMC's only emo kid

  • New Member
  • 612 posts

Posted 08 July 2006 - 06:46 PM

could we make a game with 2 screens like the DS
  • 0

#37 coolsmile

coolsmile

    Programmer

  • New Member
  • 1346 posts

Posted 08 July 2006 - 07:35 PM

Simply put, yes
  • 0

#38 myuusmeow

myuusmeow

    GMC Member

  • New Member
  • 269 posts

Posted 09 July 2006 - 06:10 AM

Can it be possible to change the width/height of the embeded window?

PS, roach, you pwn!
  • 0

#39 SleeK GeeK

SleeK GeeK

    The Biggest And The Best

  • New Member
  • 769 posts

Posted 09 July 2006 - 03:09 PM

Can it be possible to change the width/height of the embeded window?

PS, roach, you pwn!

<{POST_SNAPBACK}>

Thats easily possible. Roach just has to add a function that calls the MoveWindow API. By that, a specific window can be moved to a specific space inside the GM window as well as its width and height can be set.

Regards,
SleeK GeeK.
  • 0

#40 hanson

hanson

    GMC Member

  • GMC Member
  • 444 posts
  • Version:GM8

Posted 14 August 2006 - 01:04 AM

This is ausome! Good job :)

Edited by hanson, 14 August 2006 - 04:26 PM.

  • 0

#41 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 14 August 2006 - 07:56 AM

I did not understand what you meant by "because it does not call the embed.dll." AFAIK, the embedding is done by using the SetParent and MoveWindow API, and can be called by any application. GM can set itself to be embedded into something, or embed two third-party application. I embedded two notepads into each other. But the problem is, they dont get drawn until the paint event is called (in cases of many application), so you may have to send that message to them constantly.


For example, in a gm-game I use a external_call to call the functions of embed dll.
But in another game that doesn't call the functions and runs fullscreen it would be hard or impossible to embed.
  • 0
GM 8.1 / GM:HTML5 User

#42 MJGamesInc

MJGamesInc

    GMC Member

  • New Member
  • 365 posts

Posted 17 August 2006 - 07:05 AM

what else can u open besides notepad... Game_Maker.exe any others.. I would like more than notepad .... HELP??
  • 0

#43 RiChArD_fLoOd

RiChArD_fLoOd

    GMC Member

  • New Member
  • 395 posts

Posted 19 August 2006 - 05:54 PM

why dont you try it out and see for yourself if it can be embedded its pretty easy to use
  • 0

#44 ditdingiscool

ditdingiscool

    GMC Member

  • New Member
  • 335 posts

Posted 30 October 2007 - 06:16 PM

doesn't work for me :lol:
all it does is make notepad disapear :D

or am i just being stupid?
  • 0

#45 ditdingiscool

ditdingiscool

    GMC Member

  • New Member
  • 335 posts

Posted 09 December 2007 - 08:34 PM

no, this dll is only for embeding things into gm, not the other way around...


BZ

<{POST_SNAPBACK}>


Yes it can be done! i wa smessing with the example and ended up with the gamemaker Inside notpad :)
  • 0

#46 Games

Games

    GMC Member

  • Banned Users
  • 2968 posts

Posted 01 January 2008 - 05:08 AM

i just can't get it to work, it'd be so helpful too!

nvm. figured it out.

however, how can i control the child window? how can i tell it to save, maximize, close?

i mean, i guess i could make another .exe, but i mean more along the lines of..

run notepad. let the user type whatever they want. save it. close notepad.

you now basically have a text box in gm, with all the features... but how would i go about doing that?

Edited by Dan., 01 January 2008 - 05:18 AM.

Click to visit Toydaker.com
For Sale: 3 Editables, 40 dollars (demo on site above). Click to purchase.

#47 kubaszewczyk11

kubaszewczyk11

    GMC Member

  • New Member
  • 100 posts

Posted 23 February 2008 - 09:04 AM

Use files or 39dll or mplay
  • 0

#48 jcoc611

jcoc611

    GMC Member

  • New Member
  • 186 posts

Posted 12 June 2008 - 10:37 PM

Some one know how to block windows with embed DLL, such as Task Manager etc...?

If someone knows please post it. :whistle:
  • 0

Posted Image


#49 jcoc611

jcoc611

    GMC Member

  • New Member
  • 186 posts

Posted 12 June 2008 - 10:42 PM

How can I block windows, such as TaskManager?

Please answer back. :whistle:
  • 0

Posted Image


#50 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 12 June 2008 - 10:52 PM

Don't double post, that is against the rules. Also, blocking Task Manager is against the rules, do not do it.

Also, an embed DLL does not have anything to do with blocking that.

Edited by GMREC1111, 12 June 2008 - 11:06 PM.

  • 0