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.

DarkBASIC Professional Discussion / Simple Messagebox DLL with Keywords

Author
Message
Twisted Steel Software
16
Years of Service
User Offline
Joined: 21st May 2007
Location: Teh Interwebs
Posted: 10th Apr 2008 12:54 Edited at: 10th Apr 2008 12:58
Hello all,

This is my very first DLL for DarkBasic Professional. So far... It's just a few messagebox commands, but I plan to add more.

To make a messagebox appear, simply:


reason for underscores in the command? I figure if it has parentheses, It's going to be underscored. Makes things a little clearer, yes?

The null there would hold the number of the button that was pushed.

To get two parameters, for instance:


Just put a plus sign between them.

Any feedback would be great. Anything you'd like to see in here? (I'm fairly new to DLLs in DBP, but, you can mention anything =P)
Hope you like it,
Jim

(PS)
It's named Twisted Steel Software AddOns because that's the name I chose for my company (if I ever manage to get it registered (O.o))

Meh...

Attachments

Login to view attachments
Twisted Steel Software
16
Years of Service
User Offline
Joined: 21st May 2007
Location: Teh Interwebs
Posted: 10th Apr 2008 12:59 Edited at: 10th Apr 2008 13:00
EDIT: Darn... can't change forum names? Seems silly... is there anyway I could get it changed to Twisted Steel Software?... thanks to whoever knows

Meh...
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 10th Apr 2008 13:28
You mean you'd like your user name changed to Twisted Steel Software?

That's no problem, we don't allow people to change forum names because people are fickle, they'd change names all the time, we'd loose track of trouble makers because they could just change their name, plus people could choose a really inappropriate name or masquerade as someone else.


less is more, but if less is more how you keeping score?
Twisted Steel Software
16
Years of Service
User Offline
Joined: 21st May 2007
Location: Teh Interwebs
Posted: 10th Apr 2008 13:51
Van B: I see. That'd be great if you could do that for me. I understand fully the reasons for not allowing it, it's nice to know the mods care on these forums =D

Meh...
Twisted Steel Software
16
Years of Service
User Offline
Joined: 21st May 2007
Location: Teh Interwebs
Posted: 11th Apr 2008 01:37
Anyone try it yet? I know, it doesn't have many good commands... but, I bet someone could use it.

Meh...
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 11th Apr 2008 01:49 Edited at: 11th Apr 2008 01:57
Probably because MessageBox is simple enough to call using load dll and call dll. You really don't need a plug-in to use it, and its a modal dialog, which isn't pretty at all in 3D apps.

If you go to the DBC forum, I've put an example of a modeless MessageBox function in there. That would be useful. Modeless dialogs in general are a good thing, just a bit difficult to use...hence the need for a plug-in.

I mean no offense...its just not really necessary.

EDIT: One thing about how you use a function to get the MB_ value. You don't add those values...you OR them ||. Adding them will cause it to use the wrong type in some cases. I would not use a function, just have the user pass the number.
Twisted Steel Software
16
Years of Service
User Offline
Joined: 21st May 2007
Location: Teh Interwebs
Posted: 11th Apr 2008 02:41
Ahhh, it's two ||.. not one... that might be why it wasn't working. Yea, I know it can be called from user32.dll... but, it's basically just a little test DLL...

Meh...
jinzai
17
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 11th Apr 2008 02:51
I thought so, which is why I wanted to make clear that I wasn't trying to insult your effort..and also why I suggested looking into using modelelss dialogs.

I have had the best results from creating my own windows classes, and using them to avoid hooking into DBPro's message procedure. It also gives you another window, very useful for outputting program states without cluttering up the game itself.
Cheers.

Login to post a reply

Server time is: 2024-04-26 18:39:42
Your offset time is: 2024-04-26 18:39:42