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.

Work in Progress / FREE Windows GUI DLL for DarkBASIC Pro

Author
Message
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 9th May 2007 06:17 Edited at: 9th May 2007 06:21
I will email you when required, but I do not see the necessity of it, as I am confused as to why. Would you explain a bit more, perhaps?

Cheers,

-db


96% of the universe appears to be missing.
The admiral
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 10th May 2007 05:16
How can I check if a sub menu item has been clicked on??

The admiral
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 10th May 2007 05:55
You cant, but im working on it.

Cheers,

-db


96% of the universe appears to be missing.
The admiral
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location:
Posted: 10th May 2007 06:20
Oh lol not very useful without that functionality then heh.

The admiral
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 10th May 2007 07:29
Not unless you want to stair at your menus, lol. Or just make a "rough draft" of a project. But yes, im working on it.

Cheers,

-db


96% of the universe appears to be missing.
Alquerian
18
Years of Service
User Offline
Joined: 29th Mar 2006
Location: Reno Nevada
Posted: 10th May 2007 07:40
Hey this is looking rather fancy One Question, would it be possible to set the default selected color of colorDialog() so that it doesn't always start on black? Say I do this:

ThisColor=colorDialog(00ffaa) and my starting color would be 00ffaa?

Does this have color-picker support yet?

Visit the Wip!
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 10th May 2007 11:02
I'll go ahead and add color picker support.
And, yes, the dialogs will be completely customizeable.

Cheers,

-db


96% of the universe appears to be missing.
RPDan
16
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 19th May 2007 00:08
If you are still having trouble with the treeviews then I would like to help, but am currently having trouble getting your code to compile. If I still can't get it to compile, I'll post the error messages, otherwise I'll try to get some code to you.
RPDan
16
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 19th May 2007 18:14
My error is "Can't open .lib file" "/Framework.lib"
RPDan
16
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 19th May 2007 18:30
Don't worry - it compiled so I will try to help you with some stuff now.
RPDan
16
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 19th May 2007 20:04
I have done the message box functionality. Soon I will have a list of the integers you can use as types and the return values each button returns.

Add this to commands.cpp


Add this to commands.rc


Here are some examples.




I have attached the DLL.

Attachments

Login to view attachments
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 20th May 2007 03:13
Thank you RPDan. Glad to see you got it to compile.

Cheers,

-db

RPDan
16
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 20th May 2007 19:01
Just made it easier to use. It basicly works the same, however, now I have added commands to retrieve the value for each message box and each button. Some example code:


Also, the first parameter is the handle of the parent window.

The message box types:

The button returns:


Replace the last code I gave for commands.cpp with this:


Add replace the last code I gave for commands.rc with this:

Attachments

Login to view attachments
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 20th May 2007 23:19
Awsome. Good contribution.

Cheers,

-db

Alfa x
17
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 27th May 2007 16:37
Hi,
I want to try the DLL, but
I have problems using INI files.
I don't have any idea in how to start the DLL.
Can you help me?
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 27th May 2007 23:49
Of course I can.

Step 1
First, place the DLL (WinGUI.dll) inside the "[dbp root]\compiler\plugins-user" directory. Now go to step 2.

Step 2
If you have a premade INI proceed to step 3, if not, go to step 4.

Step 3
You will place the INI file in the "[dbp root]\editor\keywords" directory. Now, proceed to step 5.

Step 4
You will open notepad, and copy/paste the contents of the INI inside it. Click save, and choose "All files" in the drop down box. Now, pick a name for your INI, and at the end of it type ".ini". Now that the INI has succesfully been saved, proceed to step 3.

Step 5
Open Dark Basic Professional (A new instance of whatever IDE you use), and type in the following:

If that code compiles, then you can start using the WinGUI plugin.


Cheers,

-db

Alfa x
17
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 28th May 2007 01:32 Edited at: 28th May 2007 06:15
Thanks!!.
It worked perfectly.
I will try right now.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 28th May 2007 02:45
np, anymore troubles just feel free to ask.

Cheers,

-db

Radek Inkom
17
Years of Service
User Offline
Joined: 28th Feb 2007
Location: Poland
Posted: 30th May 2007 19:57
It's not a problem but I realy need it
I created 4 radioboxes and I need to precheck one of that, like in PHP. I think it's a standard option for radioboxes.
How can I do it?
Radek Inkom
17
Years of Service
User Offline
Joined: 28th Feb 2007
Location: Poland
Posted: 2nd Jun 2007 01:03
My little example.

Icluded:
1. Arrays for names and datas stored in files
2. Auto back-resize window
3. Memory for sliders
4. Auto switch off application to protect pcu using
5. Auto data save when switched off
6. any more? Open Source

Using:
1. Put your own names in gui_teksty.txt file
2. Make exe as windowed to see results
or
3. Make exe as hidden to use it

Attachments

Login to view attachments
Grandma
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location: Norway, Guiding the New World Order
Posted: 9th Jun 2007 03:59 Edited at: 9th Jun 2007 04:09
So how's the progress, boss?

I'd really like to precheck radioboxes and other like Radek mentioned. Not trying to complain, but it's getting tiresome to set all the settings of a mover (for example) over and over again for each small adjustement, and in the stage my game is in, i do alot of minor adjustements.

This is what i need to reconfigure every time i do a small adjustement *check attachement* ....silly me.

Edit: oh and one more thing pretty please, the ability to show pics in a WinGUI window? No need to rush with that though.....unless someone else here badly needs the feature.

keep up the good work, hope NGC isn't bothering you too much with with tasks to spare some time for WinGUI.

Operation Mockingbird

Attachments

Login to view attachments
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 10th Jun 2007 03:25
@Radek Inkom
Those commands are on their way.

@Grandma
Quote: "So how\'s the progress, boss?"

Progress? You mean I\'m making progress?! Well... You learn something new everyday. XD lol, but seriously, not too good. I have been stuck on the treeviews (My favorite type of GUI element). Apparently the child treeviews aren\'t having their names displayed properly. :/

Quote: "I\'d really like to precheck radioboxes and other like Radek mentioned. Not trying to complain, but it\'s getting tiresome to set all the settings of a mover (for example) over and over again for each small adjustement, and in the stage my game is in, i do alot of minor adjustements."

I am working on that now <Treeview\'s are a$$holes if you ask me>.

Quote: "Edit: oh and one more thing pretty please, the ability to show pics in a WinGUI window? No need to rush with that though.....unless someone else here badly needs the feature."

That reminds me, in my work on NF, I stumbled upon a bit of an annoying problem which I have now fixed (Yay me.). It allows you to draw directly in the window. You can draw lines and rectangles (Adding other shapes, no worries). So, I think I can get some bitmaps to be displayed. <Side note, DAP and WinGUI will be able to work with eachother, DAP is going to add a new system to it, to allow faster image writing and reading, and will be connected with WinGUI >

Quote: "keep up the good work, hope NGC isn\'t bothering you too much with with tasks to spare some time for WinGUI."

Nah, it\'s all good. ^_^ But shaders are a tricky mess if you happen to be completely used to DirectX 8.1 instead of 9.0c! lol.


@everyone
Hopefully I can get alot more done on this system soon. Read the above comments for current information.


Cheers,

-db

RPDan
16
Years of Service
User Offline
Joined: 29th Apr 2007
Location:
Posted: 18th Jun 2007 22:47
Very minor update: you can now check and uncheck submenu items.

Attachments

Login to view attachments
The ARRAYinator
18
Years of Service
User Offline
Joined: 13th Aug 2005
Location:
Posted: 18th Jun 2007 22:53
cool Just a quick question as im really just getting started with this for gamescape. How would I check it a sub menu item is clicked on. Im sure theres an easy answer but id figured Id ask,lol. Thanks!

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 19th Jun 2007 03:37 Edited at: 19th Jun 2007 12:39
@The ARRAYinator
Well, there will be an easier way to do this in the future (gui_getmenuclicked).

@RPDan
Cool. Would you mind uploading the source? You will have to make an adjustment to it, however. <For the RC file>

@Everyone
Here is what I've done with the line drawing and such so far. It's really buggy though, so I wouldn't use this unless you REALLY need it.

Add to commands.cpp


Add to commands.rc In the string table


Cheers,

-naota

The ARRAYinator
18
Years of Service
User Offline
Joined: 13th Aug 2005
Location:
Posted: 19th Jun 2007 04:39
Sounds cool but just what is the method that is used right now if any?
I didn't really have time to look through the ini. and try that much stuff out so if you can help me with that there be one less thing to wory about,lol other then that the system is awesome and have been having no trouble with the various other features.

And one last thing are tabs going to be supported in the near future? Thanks!

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 19th Jun 2007 12:38
@The ARRAYinator
The current method would be to use the low-level commands provided to get menu information.. But I'm not sure if that would work or not. You want to look up the event functions (gui_getEvent, gui_getEventHwnd, gui_getEventWparam, etc).


Cheers,

-naota

The ARRAYinator
18
Years of Service
User Offline
Joined: 13th Aug 2005
Location:
Posted: 20th Jun 2007 03:44 Edited at: 20th Jun 2007 03:51
I attempted to get that to work but it appears it doesent work on the menubars. DO you know when youll be able to get to this feature? I don't want to rush you but if you have time if you can come up with any way low or high level for me to do this that be great! also one other thing it appears the dll doesent recognize button presses just thought you would like to know that. Anways thanks for this dll its really awesome!

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 20th Jun 2007 10:50
Alright, I will see what I can do, right now. I also know that button presses aren't recognized, I will be fixing this.

Cheers,

-naota

The ARRAYinator
18
Years of Service
User Offline
Joined: 13th Aug 2005
Location:
Posted: 20th Jun 2007 18:23
Thanks dbuser! I really appreciate it!

Powermattt Wrong Way
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location:
Posted: 20th Jun 2007 19:24
Excellent DLL.
But a command doesn't work GUI_BUTTONPRESSED()

Thanks for answers
Powermattt Wrong Way
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location:
Posted: 20th Jun 2007 19:25
Quote: "I also know that button presses aren't recognized, I will be fixing this"


OK , thanks for this beautiful plugin ^^
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 21st Jun 2007 01:27 Edited at: 21st Jun 2007 01:49
@The ARRAYinator
Alright, I tried something, but it didn't seem to work. The 2 (Technically 3) commands I added had to do with menus. 1 was to grab the ID of the last menu item clicked, the 2nd/3rd was to load a menu from a dll. This could be done either through specifying the HINSTANCE of the dll (Which is allowed through my extended dll program), and the other by specifying the name of the dll (string). Neither seemed to have worked, but I'll post them anyways. Keep in mind I haven't messed with menus much.

@Powermattt Wrong Way
You're certainly welcome.

@Everyone
Enjoy the compiled DLL attatched. There is an updated INI, and the compiled DLL in there. Just as well, there is also the source, to be used with Dev-C++.

DLL now uploaded.


Cheers,

-naota

Attachments

Login to view attachments
The ARRAYinator
18
Years of Service
User Offline
Joined: 13th Aug 2005
Location:
Posted: 21st Jun 2007 03:35 Edited at: 21st Jun 2007 03:36
Thanks for trying db! Im sure things will get sorted out. I guess the only thing that is really needed in my case is the button presses and menu's but I can wait as the plugins simply awesome and Im quite suprised at how fully featured it is already. Anyways ill take a look at the updated dll either today or towmorrow morning when I have the time. Thanks!

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 21st Jun 2007 03:51 Edited at: 21st Jun 2007 04:10
You're welcome The ARRAYinator. As for buttons, check the foreground window (I think that's gui_getForegroundWindow). I will be searching on the internet for how to fix this button problem, and perhaps the treeview problem too. I hope that I can fix this menu problem though...

Cheers,

-naota

EDIT
I decided I will rewrite this to become more organised. Some parts will be completely re-written, others will be ported. It shouldn't take too long, and it will help the DLL more than it will hurt it.

Also, I will be sure to keep the commandset EXACTLY the same.

Stig Design Stig Magne
18
Years of Service
User Offline
Joined: 23rd Mar 2006
Location: Norway
Posted: 21st Jun 2007 11:48
What is This?
Sorry i Have Programming Alott in DBC
Butt Nott in DBP.
So What is This a External Programming Codes For Windows GUI LayOut.

Stig Design (Free Games,Sources,Textures,Photo`s)
Lisence Free at http://dashboard.filefront.com/StigDesign/
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 21st Jun 2007 12:30
Yes, it's a plugin which allows the use of the windows gui through easy code. In other terms, it's a "special" dll which dbp can use to extend the language, this particular dll allows for the use of windows native GUI.

Cheers,

-naota

The ARRAYinator
18
Years of Service
User Offline
Joined: 13th Aug 2005
Location:
Posted: 21st Jun 2007 16:30
Ok I had a few minutes to look at some stuff and im a little puzzled at this:


Quote: "As for buttons, check the foreground window (I think that's gui_getForegroundWindow). "


First of all theres only a set foreground window and I don't see how its applicable to getting buttons to work. If you could maybe explain about how it would work id be intrested. Thanks!

Grandma
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location: Norway, Guiding the New World Order
Posted: 21st Jun 2007 17:53
@ ARRAYinator

Look at the previous page, there are a few workarounds there you can use temporarily.

Operation Mockingbird
The ARRAYinator
18
Years of Service
User Offline
Joined: 13th Aug 2005
Location:
Posted: 21st Jun 2007 19:01
OH I see now I will try that. Thanks!

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 22nd Jun 2007 02:29
Guess your question is answered then, eh? I will be using version 3 of my Dev-C++ DBP Plugin Template, which involves an SDK. So, to be able to use the source, you would have to download that. I haven't yet started on the new source though, I spent all day creating that (yesterday), lol!

Cheers,

-naota

Powermattt Wrong Way
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location:
Posted: 24th Jun 2007 13:11
I have a problem with menu : I made my menu correctly but i cannot retrieve the last menu to have been clicked. GUI_GETMENUCLICKED() always returns 0

What can i do ?
The ARRAYinator
18
Years of Service
User Offline
Joined: 13th Aug 2005
Location:
Posted: 24th Jun 2007 20:46
@powermattt I believe dbuser posted above that it didnt work

I have a few questions to whoever can help. These are not extremely important at the moment but Is there a way to write and read from an editbox? AS for writing I have tried this:

Quote: " gui_insertString TSedit,temp$, 2"


But it doesent seem to work and I have tried different positions. As for reading I havent tried that yet. But THe button press workaround is working fine so alot of my problems are solved. Anyways thatnks again for all your help and this plugin is really awesome!

Super Smash
18
Years of Service
User Offline
Joined: 4th Jul 2005
Location: At my computer
Posted: 24th Jun 2007 22:07
Hey, this is awesome and i really want to learn how to use it, can some one or is there a tutorial on how to use this?

I rule you all
-SuperSmashcz
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 25th Jun 2007 05:04
Powermattt Wrong Way
I'm afraid they do not work currently, I am sorry for the inconvenience.

The ARRAYinator
Hi. I believe that the commands you are looking for are gui_setWindowText and gui_getWindowText (Or was it gui_getWindowTextEx I have an example somewhere, can't get it to you at the moment though. Have fun.

Super Smash
Tutorials are not priority at the moment because it is going to be rewritten in my new DBPPluginSDK. <In the program announcements under "Dev-C++ DBPro Plugin Template">
There is an example on the front page, I believe.



Cheers,

-naota

The ARRAYinator
18
Years of Service
User Offline
Joined: 13th Aug 2005
Location:
Posted: 25th Jun 2007 22:39 Edited at: 25th Jun 2007 23:12
@db user those commands work great! There is only one problem I am having as I have a routine to parse a shader file I basically need a way to skip a line when needed using the gui_setwindowtext instead of all the stings being on one line if you know what I mean. If theres a way to do this let me know. Thanks!

edit: well I have figured out a way to do it with db commands if anyones intrested. It uses the chr$(13) + chr$(10) commands. Anyways Thanks again!

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 26th Jun 2007 02:01
Glad you fixed the problem. Yes, it's the carriage return and the newline character. <Not necessarelly in that order>

Cheers,

-naota

The ARRAYinator
18
Years of Service
User Offline
Joined: 13th Aug 2005
Location:
Posted: 27th Jun 2007 03:03
Sorry I keep asking questions but the gui_getwindowtext function doesent seem to work. Heres the demo program with the command edited so you can see what I mean:



Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 27th Jun 2007 03:15 Edited at: 27th Jun 2007 03:15
Try this:



Cheers,

-naota

The ARRAYinator
18
Years of Service
User Offline
Joined: 13th Aug 2005
Location:
Posted: 27th Jun 2007 03:37
Thanks so much dbuser! it works! i really appreciate all the help this is an awesome plugin!

Login to post a reply

Server time is: 2024-04-20 03:05:46
Your offset time is: 2024-04-20 03:05:46