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 / Does a freesource DLL exist for this purpose:?

Author
Message
Galiem
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: United States
Posted: 24th Mar 2003 07:38
Is there a public DLL used to specify menu items within a window? DBPro allows you to run your program in a windowed mode, however, I have seen no native commands for a menu bar...

I could hardcode this using sprites, but it would slow my program abit, considering the images would have to be resampled on the fly to provide for window resizes, and such. I am sure the API has support for this, however, I am not entirely certain what DLL is used, and what the calls are.

Any help in this area would be greatly appreciated, as it would speed up my project by a day or two (depending on how much "free" time I have at work.. /sigh tech support can be very slow sometimes).
Galiem
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: United States
Posted: 24th Mar 2003 08:40
Nevermind this question. It seems I asked something a little far fetched just for a forum...

I can see it is easy enough to create a menu using C++, just from tinkering with it, and can even embed the menu into the DLL.

However, what I can also see is that it would be incredibly difficult to associate the menu with a DBPro program. For this purpose, Visual Basic would work better, which, unfortunately, I do not have access to, nor the money to purchase.

For those out there who come across this same problem, and search the forums for an answer, here are the options:

1: Write your menu directly into your program
2: Gain access to calls in the Windows API, so that you may code the menu into an included file in your program more easily and efficiently...

The second choice would be he most difficult, but would produce the best results... This leads up to another question:

Does any guru out there know how to gain access to the API through the DBPro editor directly? There must be a way, I know. Matter of fact, I will eventually know it, even if it's too tough to answer here... Perhaps simply including the neccessary native Windows DLL's would do it?

To repay the DBPro community for help with this, once it is known to me how to do it, I will write a utility that will make this much easier for others. The utility will work by creating an executable file that is hidden when run.. From there, the user could call the file from their main DBPro source (kinda like a class in C++), and have the file create the menu for them each time the program is run.

Hope someone can help, and hope that perhaps I will in times to come...
Whenever I post a tough question like this, I'll do my best to give something back to the community, such as the utility mentioned, so nobody gets annoyed with my constant prattling ROFL x-d

MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 24th Mar 2003 10:27
You cant use the Windows API without a lot of effort because they need callback functions (which you cant pass from DBPro) - you would have to set one up in C and make DBPro do some waiting until a button or something is pressed and exit the C part. A few people are already working on this.

And you cant access them through the editor - only through a running program.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 24th Mar 2003 15:22
You could include a menu in a DBPro program, because you have access to the window handle, allowing you to subclass it. However, you will not be able to redraw the display easily from your code. This would leave undrawn portions of the DBPro window as you drop down the different parts of your menu.

You can call API functions directly from DBPro (search for my IP address example posted on this site), but as MrTAToad said, you don't have the ability to provide callback functions.
Hubdule
23
Years of Service
User Offline
Joined: 3rd Sep 2002
Location: Gundelsheim
Posted: 24th Mar 2003 15:54
Wait for next Patch Lee is working on native Windows support. Then it'll be very easy to create menus, buttons and all that stuff (btw. the P4 installer is made with a beta of these commands )

Galiem
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: United States
Posted: 24th Mar 2003 16:20
Good to hear of it in the works x-d

I am begining to study the calls for the API in C, but don't know much about it yet... I can imagine what callbacks are... Correct me if I am getting the gest of it wrong, please.

My program would pass parameters to the API to draw a menu (though I know there are more uses for the API than this, I'll stick on topic [b]) )

Within my program, the user accesses a drop down menu, and then the callback would be when the API tries to get back in touch with my code for the data needed to redaw the part of the window that had been obscured by the drop-down?
Perhaps also the data needed to refresh the menu itself?

Well, I am definitely part of the Dark Basic Pro community now, as I am now waiting eagerly for a patch that is probably a long ways away

Thank you kindly for the info 8)

Freddix
AGK Developer
23
Years of Service
User Offline
Joined: 19th Sep 2002
Location: France
Posted: 24th Mar 2003 19:36
You can also try my system called "Magic-Windows" that can make drageable windows , buttons , menus and more . . .

Galiem
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: United States
Posted: 25th Mar 2003 15:56
Hmmm *scratches chin*

And after that BMP made at exactly 1280 X 1024 with the menu bar and drop downs, plus the pixel positions for all neccessary fillers just to fill in till we get access to the API...

Still seet 8) Looking it up now! Thank you Freddix 8)

Galiem
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location: United States
Posted: 25th Mar 2003 15:59
Ummm... Any chance for a link? In Google, I'm showing everything from a window making company to a touchy feely story called "Magic Windows of the Soul"...

Attreid
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 25th Mar 2003 17:54
for magic windows :
http://cordierfr.free.fr/html/index_english.html it's on the left

Quote: "however, I have seen no native commands for a menu bar... "

a menu bare with buttons "File", "Edit", ... ?
http://forum.games-creators.org/viewtopic.php?t=2468

(a dictionary french=> english might help you ^^)

Bu$herie
How many civilians is he going to kill ? I know that Bush will sit at God's left, next to Saddam.
Attreid
23
Years of Service
User Offline
Joined: 27th Nov 2002
Location:
Posted: 25th Mar 2003 17:56
oh, I didn't tell you : ask harobike if you can use his menu bar
do it on the forum or by mail ; if it's by mail, write in the mail's object "Question à propos de votre éditeur de menu"

Bu$herie
How many civilians is he going to kill ? I know that Bush will sit at God's left, next to Saddam.

Login to post a reply

Server time is: 2026-07-10 20:57:18
Your offset time is: 2026-07-10 20:57:18