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 / BBB Gui Plugin

Author
Message
Andrew_Neale
14
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: The Normandy SR-2
Posted: 2nd May 2012 18:50
Any idea when you might be able to resolve the editbox line count issue? Cheers.


Previously TEH_CODERER.
Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 2nd May 2012 20:48
Quote: "Would you be willing to knock up an example of how you use Events?"

Every example uses events. Check the bottom where is the check for user clicking the close button on main window.

Quote: "I assumed that BBB App_GetEventHandle() would return the handle of the last gui object that had any event act on it"

that is true

Quote: "I created a STATIC and wanted it to behave like a button. So:"
Quote: "I thought that would cause the program to end if the static was clicked on but it doesn't. "

That's because "static" is static control and static controls don't generate events. That's why i created a few commands for checking if user clicked a static -> check the static example

Quote: "Any idea when you might be able to resolve the editbox line count issue? Cheers"

I thought that was resolved. Can you create a simple example that demonstrates the problem you're having?

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 2nd May 2012 23:34
@Brendy boy

I was wondering why there are two dll ?

if they are both put in
I get duplicate words error

but if I take one out every thing is fine

to move side ways - is to move forward
Since a Strait line gets thin fast
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 2nd May 2012 23:59
umm one more and I am shire that it has been talked about before

in the Listview example loading up "Ruby.msstyles" in windows 7

attached is the screen grab of how it looks
if I am not mistaken it should be like darkish red in color
from what i remember in windows xp

from what i can tell the "Ruby.msstyles" is a self running file
when I look at the contents of the file

to move side ways - is to move forward
Since a Strait line gets thin fast

Attachments

Login to view attachments
Andrew_Neale
14
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: The Normandy SR-2
Posted: 3rd May 2012 01:10
I've tried with the two more recent releases as well as the one in the first post and the following code (a stripped down version of the included editbox example) still causes the error for me. I'm just trying to render all lines of text from the editbox to the screen in this example. It still needs your include file btw.



Thanks for taking a look.


Previously TEH_CODERER.
Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 3rd May 2012 01:13 Edited at: 3rd May 2012 01:21
Quote: "I was wondering why there are two dll ?"

one dll requires that you have uskin.dll in your app's folder and the other doesn't. If you don't intend to use styles you can use bbb gui no_uskin.dll

Quote: "umm one more and I am shire that it has been talked about before

in the Listview example loading up "Ruby.msstyles" in windows 7

attached is the screen grab of how it looks
if I am not mistaken it should be like darkish red in color
from what i remember in windows xp "

Non of the examples load the Ruby.msstyles file
The screenshot shows the windows without the styles.


EDIT
Quote: "
Thanks for taking a look.
"

Fixed

Attachments

Login to view attachments
Andrew_Neale
14
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: The Normandy SR-2
Posted: 3rd May 2012 01:37
Awesome, thanks very much, works a treat.


Previously TEH_CODERER.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 3rd May 2012 01:38
@Brendy boy

thanks I understand now

I also found out now ....
that the "Media\Ruby.msstyles"
was rem'ed out .. it shows up up in the the redish color


I will remember to include the dll's when I build my projects

to move side ways - is to move forward
Since a Strait line gets thin fast
Admiral MH
13
Years of Service
User Offline
Joined: 10th Feb 2011
Location: TX, USA
Posted: 3rd May 2012 04:35
@Brendy boy

BBB Cursor_Load string table is not correct. "Could not find function '?BBB_Cursor_Load3@@YAPAUHICON_@@PAD@Z' in 168:BBB GUI.dll"

By the way, why don't you use 'extern "C" __declspec(dllexport)' to export your non overloaded functions? as that would make you string table less bug prone as you don't have to write the function decorated name.

Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 3rd May 2012 12:32
I'm having a problem with COLORPICKER.
It seems that cancelling the colorpicker returns 0 which is of course the same as selecting black.
Your example code stops that happening but at the expense of not being able to select black. I can change it so that you can select black but then cancelling also returns black.

Your example (doesn't allow black)


Adjusted to allow black - but cancel also returns black (0)


Surely there must be a way to tell the difference between a cancelled colorpicker and black being intentionally chosen.

Any ideas?
Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 3rd May 2012 15:15
Quote: "
BBB Cursor_Load string table is not correct. "Could not find function '?BBB_Cursor_Load3@@YAPAUHICON_@@PAD@Z' in 168:BBB GUI.dll""

Fixed

Quote: "
By the way, why don't you use 'extern "C" __declspec(dllexport)' to export your non overloaded functions? as that would make you string table less bug prone as you don't have to write the function decorated name.
"

I don't write it, i copy it from the compiled dll which I open in notepad. The errors are caused by me, when I renamed some commands i renamed the plugin functions and then the same inside the stringtable but sometimes i put one name inside the plugin and then slightly different name inside stringtable. In this case the corect name was BBB_Load3_Cursor, but in stringtable i wrote BBB Load_Cursor3. Copying from notepad is sometimes to slow so to be faster i manualy change the names of functions in stringtable and obviously sometimes i type to fast and make errors. Changing to 'extern "C" __declspec(dllexport)' wouldn't make any difference and the command names won't change anymore so I won't be renaming lots of commands any time soon and such errors shouldn't happen anymore

Quote: "I'm having a problem with COLORPICKER.
It seems that cancelling the colorpicker returns 0 which is of course the same as selecting black.
Your example code stops that happening but at the expense of not being able to select black. I can change it so that you can select black but then cancelling also returns black."

Nice find, never thought about black color, LOL

Quote: "Surely there must be a way to tell the difference between a cancelled colorpicker and black being intentionally chosen."

yes, there is. I removed BBB COLORPICKER_GETR/G/B commands and added BBB APP_GETLASTPICKEDCOLOR and updated colorPicker example
Now BBB ColorPicker_Make() returns 1 if user selected a color, 0 otherwise

Attachments

Login to view attachments
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 4th May 2012 14:13 Edited at: 4th May 2012 14:17
Another rapid fix, thank you

In return, I have updated the help files to reflect the changes to the color picker (and written the description for them)

Attachments

Login to view attachments
Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 4th May 2012 17:14
Quote: "In return, I have updated the help files to reflect the changes to the color picker (and written the description for them) "

awesome

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 4th May 2012 18:38
umm I guessing with the latest updates and changes
the original listed install will need to be updated
to reflect recent changes ?

to move side ways - is to move forward
Since a Strait line gets thin fast
Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 4th May 2012 20:27
Quote: "to reflect recent changes ?"

just download the latest attachment from this page and you're up to date. Once all the bugs are removed i'll attach all the files to the first post

Andrew_Neale
14
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: The Normandy SR-2
Posted: 22nd May 2012 11:15
I'm not sure if I'm missing something, but shouldn't there be a command such as 'bbb listBox_delete'? Or is there another way you're supposed to delete list boxes?

Also, is there a concept of a panel? A container for other controls that isn't a separate window?

Thanks.


Previously TEH_CODERER.
Joker436
12
Years of Service
User Offline
Joined: 18th Mar 2012
Location:
Posted: 22nd May 2012 18:31
@Brendy boy

This plugin is exactly what I was looking for to handle my in-game gui elements - thank you for writing this!

I have 2 questions that I've run into... if you or anyone else could help, I'd really appreciate it! I'm pretty new to DBP, so please be nice!

1. Is it possible to remove the gui elements from the main DBPro window once added? Think an 'options' function with me.

I'm not adding a new window though, I'm adding the gui elements right to the main db window like this:



Can the 'on' radio box be some how removed once added, or should I really be using a window to accomplish that?

2. msstyles file - I did some reading on these... it seems that they can be created and edited, with some work. I apologize if this is a dumb question, but I want to verify before going to learn... can I create a custom msstyles file and use it for the gui?

That's all for now... thank you for any help provided!
Andrew_Neale
14
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: The Normandy SR-2
Posted: 22nd May 2012 19:36
Also, is there a way to set the value of a textbox / editbox? I can't see one in the command list. Or at least a way of emptying one. Thanks in advance.


Previously TEH_CODERER.
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 22nd May 2012 19:56
Use: BBB Window_SetText to set the text of an editbox. It's not very intuitive but it is functional.
Andrew_Neale
14
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: The Normandy SR-2
Posted: 22nd May 2012 20:22 Edited at: 22nd May 2012 20:24
Ah, indeed, not that intuitive, but I still should have spotted it. Thanks for pointing it out!

[Edit]
Only just realised it wasn't just not that intuitive, but perhaps more of a hack, so I won't beat myself up too much over not spotting it, haha. [/Edit]


Previously TEH_CODERER.
Scraggle
Moderator
20
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 22nd May 2012 21:12
Indeed. Having a second command called BBB EditBox_SetText would make more sense but we shouldn't complain too much when Brendy Boy is offering this free of charge.
Andrew_Neale
14
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: The Normandy SR-2
Posted: 22nd May 2012 23:24
If it came across as a complaint then I apologise as this is definitely an excellent addition to the DBPro line-up even before you consider the price tag, or lack thereof. It is saving me no end of time over my usual method of writing a custom UI for every application.


Previously TEH_CODERER.
Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 22nd May 2012 23:54
@Andrew_Neale
Quote: "I'm not sure if I'm missing something, but shouldn't there be a command such as 'bbb listBox_delete'? Or is there another way you're supposed to delete list boxes?"

All controls in the bb gui are a type of a window so every window command can be applied to every control. to set text of a control use BBB WINDOW_SETTEXT, to delete a control use BBB WINDOW_DELETE etc..

Quote: "
Also, is there a concept of a panel? A container for other controls that isn't a separate window?"

A panel is just a window with some styles applied to it so it looks like a panel. Somebody asked that already and i posted the code example for that. Don't remember where it is though, try searching through last 5 or 6 pages of this thread.

@Joker436
Quote: "1. Is it possible to remove the gui elements from the main DBPro window once added? Think an 'options' function with me. "

Yes, every control can be hidden with BBB WINDOW_SETVISIBLE/ BBB WINDOW_HIDE commands. Also every control can be deleted with BBB WINDOW_DELETE command

Quote: "2. msstyles file - I did some reading on these... it seems that they can be created and edited, with some work. I apologize if this is a dumb question, but I want to verify before going to learn... can I create a custom msstyles file and use it for the gui?"

Yes, of course but i don't know if they can be made manualy or you need some program to create it

Andrew_Neale
14
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: The Normandy SR-2
Posted: 23rd May 2012 00:35 Edited at: 23rd May 2012 00:47
Quote: "All controls in the bb gui are a type of a window so every window command can be applied to every control. to set text of a control use BBB WINDOW_SETTEXT, to delete a control use BBB WINDOW_DELETE etc.."


Ah, I see, thanks for clearing that up.

Quote: "A panel is just a window with some styles applied to it so it looks like a panel. Somebody asked that already and i posted the code example for that. Don't remember where it is though, try searching through last 5 or 6 pages of this thread."


I was thinking that may be the case but haven't stumbled across the right set of options yet. I'll take a look through this thread. Thanks again.

[Edit]By sheer luck I found it on the first page I tried (10). Cheers![/Edit]


Previously TEH_CODERER.
T4r4ntul4
14
Years of Service
User Offline
Joined: 1st Jan 2010
Location: close to my pc
Posted: 26th Jun 2012 13:28
hey guys,

is there a gui editor like bleugui had with rainbow?
if not, how do you all make your interfaces?
Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 26th Jun 2012 16:15
Quote: "is there a gui editor like bleugui had with rainbow?"

there is an unifinished editor, but it is for older version of bbb gui

Quote: "if not, how do you all make your interfaces? "

through countless numbers of lines of code

Admiral MH
13
Years of Service
User Offline
Joined: 10th Feb 2011
Location: TX, USA
Posted: 27th Jun 2012 07:58
Quote: "is there a gui editor like bleugui had with rainbow?"


There is a editor just for that I made awhile ago, you can download it here. Though, I should note that it is not up to date with the current syntax for BBB_GUI commands. (e.g. When you export your interface, the code for button controls will be "Make Button" instead of "BBB Button_Make")

I do have plans to update BBB GUI Designer in the future but as for right now I have been really busy at the moment.

A r e n a s
15
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 27th Jul 2012 16:28
Hi Brendy Boy,

I am currently writing an IDE for both FPSC and Dark Basic Professional. I plan on creating GUI functionality for Dark Basic. It would involve a designer for GUI screens which would be made for Dark Basic Professional projects. I was wondering if it would be possible to use your plugin so that this is possible. Your dll would be included with every download of my IDE and would be installed in the users Dark Basic Professional install. This means that I could create a GUI designer using the commands your dll provides and users would be able to compile this successfully. Below is the thread;

http://forum.thegamecreators.com/?m=forum_view&t=198389&b=21&p=0

A
Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 27th Jul 2012 20:01
Quote: "I was wondering if it would be possible to use your plugin so that this is possible."

yes, this is possible and Admiral MH already started working on a gui editor, it's source code (the older version) is available somewhere in this thread

Carl5163
12
Years of Service
User Offline
Joined: 21st Apr 2012
Location:
Posted: 4th Sep 2012 18:23
In all of your examples you have the controls on another window. Is it possible to make the controls on the dbpro window? Thanks, and love the plugin.
Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 5th Sep 2012 19:41
yes, use BBB APP_GETDBPROWINDOW command to get a handle to dbpro window and then set that handle as parent of the control you want to create on dbpro window

Carl5163
12
Years of Service
User Offline
Joined: 21st Apr 2012
Location:
Posted: 6th Sep 2012 05:18 Edited at: 6th Sep 2012 17:27
Thanks for the quick reply. When i run my program i only get a black screen but when i put my mouse over where (in this case) the button should be it flashes on the screen and disappears. Any help would be appreciated
Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 6th Sep 2012 19:08
you need to set this style to dbpro's window: BBB Window_GetStyle(dbpro_w)||WS_CLIPCHILDREN||WS_CLIPSIBLINGS

Check the toolbar example

Carl5163
12
Years of Service
User Offline
Joined: 21st Apr 2012
Location:
Posted: 11th Sep 2012 03:29
Hey thanks for your reply, so far everything is working great. Just wondering is there a way that I can make the main dbpro window stay the same but make it non resizeable? thanks.
Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 20th Sep 2012 03:01
Quote: "Just wondering is there a way that I can make the main dbpro window stay the same but make it non resizeable?"

try adding WS_EX_TOOLWINDOW as ex style and search this thread, I think somebody already asked similar question and I gave him an answer I dont remeber anymore

DarkDISCUSSION
12
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 20th Sep 2012 21:29
Is there going to be an update soon?



Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 20th Sep 2012 22:35
Quote: "Is there going to be an update soon?"

no, there's to much of other projects I'm working on so I don't have time to make an update

Is there something in particular that you would like to see in an update?

Admiral MH
13
Years of Service
User Offline
Joined: 10th Feb 2011
Location: TX, USA
Posted: 25th Sep 2012 04:34
Question, for some reason do you know why a listview with LVS_EDITLABELS style does not send LVN_BEGINLABELEDIT and LVN_ENDLABELEDIT notification codes upon editing a listview item? As I am able to receive other notifications like LVN_GETDISPINFO and LVN_ITEMACTIVATE.

Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 25th Sep 2012 16:54
what kind of listview are you talking about?
1. The standard listview where you can edit only the items int the first column
2. The listview which has editboxes and comboboxes
3. something else

Admiral MH
13
Years of Service
User Offline
Joined: 10th Feb 2011
Location: TX, USA
Posted: 26th Sep 2012 06:12 Edited at: 26th Sep 2012 06:13
The listview with editboxes and comboboxes. Here are the following styles used for the listview.



Additionally, the listview has items that use item types (0-2).

Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 26th Sep 2012 19:28
it's probably because LVN_BEGINLABELEDIT and LVN_ENDLABELEDIT are notifications for standard listview where you can edit only first column. The listview with comboboxes and editboxes is something i created so i should send those notifications manualy. I'll have a look at the ways of sending these notifications but currently i don't have time

A r e n a s
15
Years of Service
User Offline
Joined: 9th Jun 2008
Location:
Posted: 25th Oct 2012 15:39
Hey Brendy, I was wondering if you were planning on implementing the Panel Component? It would be very useful as a GUI component in my IDE. Below is a screen shot of it so far. Only a couple of the components are active currently, but they all follow the same blue print, so once the bugs are ironed out with what I have, its just a matter of minutes before all the other components are working fully.



Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 26th Oct 2012 00:14
Quote: "Hey Brendy, I was wondering if you were planning on implementing the Panel Component?"

Panel is just a type of a window. Somebody asked that before in this thread but i don't remember which styles need to be set. Experiment with window styles and ex styles

luskos
16
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 11th Nov 2012 18:00
Is anyone having problems with BBB plugin?
I get this error in CodeSurge:
"Duplicate BBB WINDOW_SETMAXIMIZED in BBB GUI.dll and BBB GUI no_uskin.dll
Command in BBB GUI.dll command-table unrecognised..."
Something like that.

Maybe this is what prevent compiling any code with DBPro except in Debug Mode, because it started to behave like that just when i downloaded the plugin.

Coding is My Kung Fu!
And My Kung Fu is better than Yours!
Andrew_Neale
14
Years of Service
User Offline
Joined: 3rd Nov 2009
Location: The Normandy SR-2
Posted: 11th Nov 2012 18:06
Quote: "Duplicate BBB WINDOW_SETMAXIMIZED in BBB GUI.dll and BBB GUI no_uskin.dll"


This error message pretty much covers it. Both DLLs have the same commands in them so DBPro doesn't know which one to use. They are supposed to be optional, either or, depending on whether you want to use USkin or not. Only include the relevant one in your plugins folder.


Previously TEH_CODERER.
Carl5163
12
Years of Service
User Offline
Joined: 21st Apr 2012
Location:
Posted: 10th Jan 2013 19:01
Hey I was wondering if there is a way to lock the dbpro window inside another window. I want to have the dbpro window display something with tools on the left side, but have it all act like one window, e.g., it all moves at the same time when you drag the window. Thanks!
Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 11th Jan 2013 02:35
currently no, it is one of the planned features for the next version but i currently don't have time to work on it

basjak
14
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 13th Jan 2013 14:08
@brendy boy. I cannot see buttons and labels when I change a window style.

first I changed window style straight after creation.
second I added labels and buttins.

Thanks

Brendy boy
18
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 13th Jan 2013 16:50
show me the part of the code where you change the style

basjak
14
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 13th Jan 2013 20:28 Edited at: 13th Jan 2013 20:30
thanks this is the code. of course all previous line are written in the program.



Login to post a reply

Server time is: 2024-04-27 02:44:10
Your offset time is: 2024-04-27 02:44:10