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 / Need help for a joystick dll for dbpro

Author
Message
XANAX 2B
21
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 9th Mar 2006 07:31 Edited at: 9th Mar 2006 07:33
Hello world !
I'm trying to convert a free source code i've found on the web to a really free dll to use 4 joysticks, wich can be available on my website in the futur if i don't fail.
Does a big master of the c++ can help me about one or two questions please ?

It use directinput but the functions inside the source code needs "hinstance" and "hwnd".
I don't know how to obtain them from the db window.

An idea please ?

You can download my freewares here:
www.basic-sombre.com
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 9th Mar 2006 14:12 Edited at: 9th Mar 2006 14:14
you may need to use functions in the win32API.

FREE Automatic file updates for your distributed Games and Apps - see Program Announcements Forum - DBP Demo
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 9th Mar 2006 14:12
They are both available in the globstruct as hWnd and hInstance.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
CJB
Valued Member
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Essex, UK
Posted: 9th Mar 2006 14:34
That's exactly what I was going to say! (You will need to install DX SDK if you haven't already done so).

XANAX 2B
21
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 9th Mar 2006 16:38 Edited at: 9th Mar 2006 22:00
And how to access to globstruct IanM ? Can you give me a little sample code please ?

You can download my freewares here:
www.basic-sombre.com
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 9th Mar 2006 22:06 Edited at: 9th Mar 2006 22:07
Ok,



DBPro will call this function automatically when it loads your DLL. Then you can access the hWnd & hInstance like this:



[EDIT]Forgot to tell you ... you can get the globstruct.h file from C:\Program Files\Dark Basic Software\Dark Basic Professional\Help\documents\Files\Third Party Commands\TESTCOMMANDS2
... or the equivalent location if you installed DBPro somewhere else.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
XANAX 2B
21
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 10th Mar 2006 07:09
Thanks a lot !
i'll do my best to do this dll

You can download my freewares here:
www.basic-sombre.com
XANAX 2B
21
Years of Service
User Offline
Joined: 20th Jun 2003
Location: Corsica (France)
Posted: 10th Mar 2006 22:39 Edited at: 10th Mar 2006 22:41
The dll is done !
I've tested it with 3 joysticks (with 8 buttons) and it works for me.
(tested : 3 same joypads thurstmaster)

Thanks a lot !

You can download it for free at [href]www.basic-sombre.com[/href]
it's called MyJoy11 and there is a test program for dbpro within.
See the download page

You can download my freewares here:
www.basic-sombre.com

Login to post a reply

Server time is: 2024-11-22 00:29:09
Your offset time is: 2024-11-22 00:29:09