Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Making a window .dll

Author
Message
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 7th May 2005 08:01
Does anybody know how to make a transparent window and one that remebers it's size and shape? And does anyone know how to make dbp start in the .dll window?
Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 7th May 2005 15:09
been trying to do it but all i can do so far with transperency is make the dbp window transperent

X-Patch x-patch.exe(gui):75% make.exe:5% x-patch.dll(runtime dll):0% developed on win xp home sp2
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 22nd May 2005 04:50
Quote: " Does anybody know how to make a transparent window and one that remebers it's size and shape?"

You could have the information written to an ini file and then read the data when the program starts and then rewrite the data if the information has changed.


Click sig for DB Network X
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 22nd May 2005 10:30
I don't know what to write in the ini.
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 4th Jun 2005 10:58
Quote: "And does anyone know how to make dbp start in the .dll window?"


DBP is odd in this way, you cannnot have the DBP's original window encapsulated in another window or form that is created by the user.

Quote: " Does anybody know how to make a transparent window and one that remebers it's size and shape?"


You can have BlueGUI make the window transparent.

Quote: " I don't know what to write in the ini"


You could just create a file lets say called "test.ini". You could then write a line for each setting that you want. Example

Window Location X: ???
Window Location Y: ???
Window Height: ???
Window Width: ???
Window Transparency %: ??

Then you would have the program write the lines like above, and then you will have the program read the lines when the program starts and sets the settings.


Click sig for DB Network X
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 5th Jun 2005 05:57 Edited at: 5th Jun 2005 05:59
If BlueGUI can affect the dbp window why can't I make a dll that does? After my program reads the lines how do I move the window? And how is my program suppose to know when the window is moved?
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 6th Jun 2005 08:19
If you plan to make a dll then you might be able to make a form with the information (buttons, etc.) that you want then you might be able to set the form as DBP windows parent. The same principle could possibly be used with BlueGUI


Click sig for DB Network X
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 6th Jun 2005 10:35
How do you set a DBP windows parent?
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 7th Jun 2005 18:48
@BlackShadow

Using the usual tricks to make the window transparent will not work very well with the DBPro window.

If you try doing it will BlueGUI you'll see that the results are extremely slow. This is because Windows 2000/XP still uses a purely 2D drawing system called GDI.

The next version of Windows (Longhorn) will be able to use DirectX to take advantage of 3D hardware and produce all kinds of realtime effects. Until then, the only option I can suggest is to find a way of capturing the desktop image behind the window, rendering it to a plane, and displaying it behind your other 3D graphics.


BlueGUI Windows Plugin
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 8th Jun 2005 01:42 Edited at: 8th Jun 2005 02:16
Transparencty isn't the only thing I want to do to a window so could someone please tell me how to se a dbp parent window? Also how do I move my window, and get the position of my window using the dbp exe?
EddieB
20
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 8th Jun 2005 01:55
You want every one to tell you everything. Learn C++ then come back and ask FFS!

Give a man a fish and feed him for a day, teach a man to fish and feed him his entire life.....
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 8th Jun 2005 02:06
I am not asking how to do anything in C++, Just how to set some things in DBP.
IanG
20
Years of Service
User Offline
Joined: 25th Sep 2004
Location: Cyberspace
Posted: 8th Jun 2005 04:30
i don't think you can - you'll need to use call dll or a tpc

Used to be Phoenix_insane registered in september 2003 despite what the date says to the left <--
PC - amd athlon 2.0ghz, 512mb, GeForce FX 5200 128mb, 200gb, xp pro sp2
Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 8th Jun 2005 08:15 Edited at: 8th Jun 2005 08:15
oooh thats so easy i bet even u could make it in C++
just take a look at the win32api
u cna do it from dbp though with user32.dll

and i cant find the function to get the position of the window but i know it is out there
and my tpc that i made contains a center window function(centers the window with the desktop) just request it and i will attach it


Win32api entries

BOOL SetWindowPos(

HWND hWnd, // handle of window
HWND hWndInsertAfter, // placement-order handle
int X, // horizontal position
int Y, // vertical position
int cx, // width
int cy, // height
UINT uFlags // window-positioning flags
);

formerly shadows of emptiness
EddieB
20
Years of Service
User Offline
Joined: 29th Sep 2004
Location: United Kingdom
Posted: 8th Jun 2005 16:10
Change:



to



Give a man a fish and feed him for a day, teach a man to fish and feed him his entire life.....
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 9th Jun 2005 01:50
Thankyou very much for your help. Offset of reality, I would like to see your tpc.
Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 9th Jun 2005 02:55 Edited at: 9th Jun 2005 02:57
okie dokie
i dont have a list of keywords yet but you can just look into the .ini file and read it pretty easy (keyword=help file=paremeter1,paremeter2)

*attached*

edit:
add transperency to window is not very good so i wouldnt reccommend using it but u can still try it and see what it does
and the keyword=IN DEVELOPMENT=... the in development is aimed at the help files not the actual function

formerly shadows of emptiness

Attachments

Login to view attachments
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 11th Jun 2005 11:07
Last question, how am I can I close the original window dbp made? I think you can use the WM_Destroy command but how do I tell my dll to close the dbp window.
Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 11th Jun 2005 16:29
hmmm
i guess i didnt include information about whats there and whats not
i have plans for adding a dll window but currently it is not there
u can use call dll and MakeWindowEx though to make it
the closest thing i got to closing the dbp window is hiding it
(ummm it is something with the extended window styles) but then i cant figure out how to unhide it

formerly shadows of emptiness
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 11th Jun 2005 17:50
Quote: "how am I can I close the original window dbp made? I think you can use the WM_Destroy command but how do I tell my dll to close the dbp window."

Get the DBPro window and pass that - but if your in the DLL that was called by the DBPro program it may crash...

Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 13th Jun 2005 01:47
How would I pass dbp's window handle to the dll?
1tg46
20
Years of Service
User Offline
Joined: 1st Feb 2004
Location: I dont know!
Posted: 13th Jun 2005 08:11
WinAPI


Click sig for DB Network X
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 13th Jun 2005 08:58
What do you mean? Do I pass it as a dword, string, integer, what.
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 13th Jun 2005 09:13
Quote: " What do you mean? Do I pass it as a dword, string, integer, what."


You do understand that destroying the DarkBASIC window will stop the application from running (since DarkBASIC apps respond to WM_CLOSE and WM_DESTROY messages by freeing resources and then closing themselves), and therefore it has the same effect as simply calling the END command.


BlueGUI Windows Plugin
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 14th Jun 2005 01:32
So is there a way to hide the dbp window (including in the taskbar). By making a new window dbp transmits its output to the new window right?
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 15th Jun 2005 01:55
nobody knows? well I would still like to know how you would pass a handle to a dll. (I have a little idea with some asm code but I need to know how to pass the handle from dbp to a dll.)
Eddie B
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 15th Jun 2005 01:59
Black Shadow, Stop going ahead of your self. I know alot of C++ etc. And I am making a GUI dll. So far I have windows done and you dont know that much C++ and you want to do that :S

Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 15th Jun 2005 02:19
For your information I have a function that can close the dbp window, and I have a little asm porgect going that will keep the dbp exe running after the window is closed. I don't know how to pass the dang handle to the dll, I know select parts of C++ well and other select parts not so well.
Eddie B
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 15th Jun 2005 02:25
Ok Ok , What ever suits you

Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 15th Jun 2005 02:53
dbp code


that is just code without string tables u can also very easily make it with stringtables

and here is the send_handle function in C++(this does not include the standard dll startup code)


if u do not know the standard dll code then ask me to post and i will

formerly shadows of emptiness
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 16th Jun 2005 01:40
Thankyou.
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 21st Jun 2005 08:11
Yes, I am stupid. I have been trying what you posted forever now. I want to use this in my dll function
. I have tried using unsigned long HWND hndle but my compiler wants me to put a comma inbetween HWND and hndle. I have tried unsigned long hwnd but then I get an illeagle conversion message when it gets to the SendMessage. I tried so many thing on google and looked in various C++ books. I just can't figure it out. If you don't wish to kill me yet please help me.
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 21st Jun 2005 10:55
you can't send a message externally from the window protocol, you'll have to prototype your own WindowsProc; then Send<>Recieve Messages that way.

I won't tell you exactly how to do it, because quite frankly I don't think you understand quite what your doing; and creating CallBack functions can be dangerous in the wrong hands.
(provides a tad too much power)

Try doing some research, MSDN isn't exactly hard to understand.

Eddie B
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 21st Jun 2005 16:08
Im not sure lol, Try this. I am asuming you have the CoreData and Global struct.



Eddie B and always will be
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 23rd Jun 2005 04:36 Edited at: 23rd Jun 2005 04:37
I have heard of this glob and globstruct or whatever. I assume there is documentation on it somewhere. Where. Also, Eddie B the code you posted doesn't work my copiler wants me to delcare g_pGlob as a function. By the way I am getting some C++ books any day now so I will learn some stuff.
Eddie B
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 23rd Jun 2005 07:55
Yeah Cool, Of course it wont.. Get Globalstruct from the top of this board... And put it in the same folder as your project.. Try this code:



Your dll maybe large but there are many things you can do to strip it

Eddie B and always will be
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 23rd Jun 2005 07:58 Edited at: 23rd Jun 2005 09:41
do I need to make a stringtable for ReceiveCoreDataPtr and use it as a command or is it just part of the dll.
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 23rd Jun 2005 09:38
Also, where do I get #include "dxdiag.h","D3dx9tex.h" and anything that might be included in them?
Eddie B
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 23rd Jun 2005 16:20
You need to download the DirectX Sdk for the headers...You dont need a string table for receivingcoredaterptr. For returning a number in a string table you just do this:

NAMEOFIT[%L%Functionname

Eddie B and always will be
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 24th Jun 2005 02:38 Edited at: 24th Jun 2005 07:28
I have the latest direct x version but not the sdk, whrere do you get it? Also, will the user of my game that uses the dll I am making need the SDK or just the latest direct x.
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 24th Jun 2005 07:29 Edited at: 24th Jun 2005 07:36
I installed the SDK, so where are the files? (My compiler can't find them and I can't find them in C:\DXSDK\include\)
Keaz
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 25th Jun 2005 00:32
Quote: " whrere do you get it? "

Get the DirectX SDK here: http://www.microsoft.com/downloads/search.aspx?displaylang=en&categoryid=2
Quote: " will the user of my game that uses the dll I am making need the SDK or just the latest direct x."

No, they won't need the SDK. All the necessary info will be compiled into your dll using #include statement. They'll just need the latest DirectX.

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Keaz
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 25th Jun 2005 00:35 Edited at: 25th Jun 2005 00:36
*Browser Error - Double Post* Please delete.

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Keaz
21
Years of Service
User Offline
Joined: 22nd Sep 2003
Location: Somewhere in south Texas
Posted: 25th Jun 2005 00:37
Search your computer and copy them to the directory you need them at.

Breaking Stuff=Fun!,Bug Testing<>Fun!, Bug Testing=Breaking Stuff, so...
Bug Testing=Fun! Hmmmm....
DOES NOT COMPUTE! SYSTEM MALFUNTION!
Eddie B
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 25th Jun 2005 01:18
No Just an an Include Directory in project options.

Eddie B and always will be
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 25th Jun 2005 02:33
Thanks, I got everything in the right place but now my compiler keeps giving me this error
. This is my dllmain code
. I am trying to figure out what is wrong with my function but my real concern is why it has a problem with globstruct.h.
Eddie B
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 25th Jun 2005 04:09
Stop going ahead of your self, Your realy starting to anoy me now..

Try compiling this code..



and any way, That code you have there is mis matched , This should be this

DLLIMPORT void closewindow(void)
{
SendMessage(g_pGlob->WM_CLOSE, 0, 0);
}

To

DLLIMPORT void closewindow(void)
{
ShowWindow(g_pGlob->hwnd,SW_HIDE);
}

Well That will hide the window ...
Sorry but your realy going ahead of your self here..

Eddie B and always will be
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 26th Jun 2005 03:30 Edited at: 26th Jun 2005 04:45
The main code you posted works, but if you try to add any functions to it it won't compile. By the way my send message function worked in all my other progects.

Edit:
I can add basic functions but as soon as I start with the ShowWindow command or the sendmessage command my compiler starts spitting hundreds of errors at me.
Eddie B
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location:
Posted: 26th Jun 2005 06:11
What errors exactly ? that "might" help dont ya think

Eddie B and always will be
Black Shadow
20
Years of Service
User Offline
Joined: 14th Oct 2004
Location:
Posted: 26th Jun 2005 06:26
Oh, sorry.

and that is all of it. Thanks for helping me even though you think I am annoying.

Login to post a reply

Server time is: 2024-11-21 14:25:13
Your offset time is: 2024-11-21 14:25:13