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.

Code Snippets / Sample to use native Windows gui in a DB window

Author
Message
Sean
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 19th Feb 2003 02:10
Hello everyone,

This is my first contribution to DB since the very early days. I've been gone for quite a while, good to be back. Anyways, the code sample below uses a .dll created with PureBasic to demonstrate how to place real "Windows" as children of the DB directX window. It also shows how to add controls (buttons etc.) to the window and get messages back into DB. You will need to d/l the .dll and place it into the same folder as your project files (or windows/system). When you click the button, the windows handle for the button is displayed in the main DB window! If you would like the dll source code please e-mail at wickedrush@wickedrush.com and i will send the source. I'm sure that a similar lib could be created with C++ or whatever.

link to dll..http://www.wicekdrush.com/purebasic.dll

Sean
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 19th Feb 2003 02:15
sorry, no edit function yet

correct link:http://www.wicekdrush.com/purebasic.dll
Sean
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 19th Feb 2003 02:16
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 19th Feb 2003 03:08
hmm

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
ESC
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United States
Posted: 19th Feb 2003 07:45
Wow, that's pretty impressive. I did have a few problems, though. First, The background wasn't refreshed when I dragged the window until I released the mouse button. Second, It doesn't work in fullscreen exlusive (at least not very well). Other than that, it's great

"That's not a bug, it's a feature!"
"When all else fails, read the instructions"
-ESC
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 19th Feb 2003 12:36
ESC, When in exclusive you can't have any other windows open. The App becomes "exclusive" and hijacks the screen for itself.

However, in any Desktop (including full screen) mode it will work fine, as it's just another window.

Visit [url]www.lightning-systems.co.uk[/url]
You are the th person to view this signature.
Freddix
AGK Developer
21
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 19th Feb 2003 18:39
hum . . . then it is possible to make DLLs with pure basic for DBPro . . .
Could you give a DLL skeleton for DBPro under PureBAsic ?

Sean
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 20th Feb 2003 04:10
I would just like to add,
Please, Do NOT write a wrapper of PureBasic functions etc. and distribute it as freeware for all! PB is the hard work of one man and something like that could seriously hurt the PB project, and even get you into legal troubles. That being said.. Have fun
turchino
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Italy
Posted: 22nd Feb 2003 17:34
I repost this forgotten code snippet.
The only problem of the code below is if you move the window the old one remains.

(Somebody is so clever to integrate the above code with this one in order to resolve the "leave trail" problem?)
(I don't know where to post this question..)


Login to post a reply

Server time is: 2024-04-27 03:44:18
Your offset time is: 2024-04-27 03:44:18