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: 27th Jun 2007 04:42
Thanks, and you're welcome.

Cheers,

-naota

Brendy boy
19
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 27th Jun 2007 14:12
Here is the changed code for button pressed command. It works corectly now.

//a=BUTTON PRESSED(button)
MYCOMMAND int gui_buttonPressed(HWND hWnd)
{
int result=0;
LRESULT lResult = SendMessage(hWnd, (UINT)BM_GETSTATE,0,0);
//if (lResult==BM_CLICK) //BST_FOCUS
if (lResult>10) //BST_FOCUS
{ result=1; }
return result;
}

God is real unless declared integer.
Brendy boy
19
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 27th Jun 2007 14:23
Here is the code for finding the asci code of the letter in the input box

//a=GET EDIT TEXT(hwnd, linenumber, letter_number)
MYCOMMAND DWORD gui_getEditText(HWND hWnd, int lineNum,int z)
{
char bbb[512];

SendMessage(hWnd,EM_GETLINE,lineNum,(WPARAM)&bbb);
char* result = (char*)&wndtext[z];
return *result;
}

Here is the dbpro code for finding the whole word in the input box

g$=""
rem number 10 is the estimated length of the word - you can change rem this to whatever you like
for t=0 to 10
g$=g$+chr$(get edit text(sn1,1,t))
next t
text 200,270,"text "+g$


"get edit text" is the name that i gave to gui_getedittext command

God is real unless declared integer.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 28th Jun 2007 01:59
@Brendy Boy
That is MOST helpfull, thank you indeed! You probably know more about the Windows API than me, lol. Thank you very much, it is most appreciated.

@Everyone
Ok, I have some file requester code (The openfilebox/savefilebox like in goga's free plugin, but in this it will be gui_openfile and gui_savefile). As I already mentioned, I'm rewritting the WinGUI. I'm gonna do that now actually.


Cheers,

-naota

Powermattt Wrong Way
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location:
Posted: 28th Jun 2007 03:04
Awesome !

I try to be patient
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 28th Jun 2007 06:47
@Powermattt Wrong Way
lol.

@Everyone
NEW WINGUI IS OUT!
Changes?
* I removed gui_paintwindow
* I broke gui_colorwindow
* Buttons now work
* Functions have been optimized
* Removed RPDan's Messagebox code (But kept the helper functions)
* Implemented new messagebox code
* Added a list of the "wm_" based commands, to help you decipher messages
* Open File Requester and Save File Requester now added
* DLL is now only 56.0KB instead of 140+KB.
* DLL has been rewritten in MSVC++ 6.0 with the DBPPlugin SDK. If you are contributing to this, you are licensed to use the DBPPlugin SDK under MSVC++ 6.0.
* Window backgrounds are now white by default

Enjoy.


Cheers,

-naota

Attachments

Login to view attachments
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 29th Jun 2007 04:28
Added a keywords file this time, and made a few small changes which corrected a few bugs.

Cheers,

-naota

Attachments

Login to view attachments
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 29th Jun 2007 04:37
Downloading the latest version now

This sounds like a really cool plugin, DB. Nice work

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 29th Jun 2007 04:47
@Sixty Squares
Thanks. I added many commands, I will add a document when this is 100 percent complete, for now, the INI file and examples show what to do, and if anyone has any questions, I'm always happy to answer them. (But people, PLEASE, do not add me to your MSN or Yahoo just to ask me a question)


Cheers,

-naota

Xsnip3rX
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 29th Jun 2007 05:01
lol @ everyone who Added him.
Look, im KeithC (no offense Keith lol)

Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 3rd Jul 2007 00:36
Great DLL I'm loving it , Is there anyway to make Vertical track bars (slider bars) instead of horizontal ones?
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 3rd Jul 2007 02:17
@Xlaydos
Thanks. Unfortunately not. I will look into that a bit later.


Cheers,

-naota

Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 3rd Jul 2007 18:47 Edited at: 3rd Jul 2007 19:10
Okay no problem

Is it possible to send an image to the windows to be displayed?

Edit: And is it possible to change the color of the area around checkbox text from that nasty gray?

Sorry for all the questions It's too good
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 4th Jul 2007 00:02
@Xlaydos
Heh, I'm working on images. They will be under the "static" section of WinGUI.

I'll be doing someting to change the color scheme of the data.


Cheers,

-naota

Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 4th Jul 2007 00:36 Edited at: 4th Jul 2007 00:51
Okay thanks good luck with the images , sorry i'm about to ask another question

I think i have found a bug with the GUI_GETITEMTEX (handle,position)command, it seems to return a parameter mismatch

Here is example code which gives the following error:

code:


Error:


Thanks again for the great dll

Edit: while i'm here ill ask another question (sorry! )

How would i go about creating a browser in a combobox, i have most of the code done...



The problem is that while you hold the mouse button it goes through loads of folders really quick. Is there a way to disable just the combobox until mouseclick = 0?

Thanks again
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 4th Jul 2007 00:39
@xlaydos
I think I changed the parameters, or mistyped the stringtable entry, sorry. I will look at it in a little while.


Cheers,

-naota

Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 4th Jul 2007 00:51 Edited at: 4th Jul 2007 01:13
Okay no problem

Edit: Is there more detail anywhere on sending events to windows?

This is all i could find


P.S Could i use disable window for the browser code?

Thanks and sorry for all the questions
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 4th Jul 2007 04:53
@Xlaydos
If you look through the windows API, you might find some codes for the messages. If that's not what you want, then please specify more information.

Also, I don't know what you mean by that "P.S" statement, please give more information.


Cheers,

-naota

Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 4th Jul 2007 14:51
Whats the windows API?

Don't worry about the ps i was just wondering if there is a disable checkbox command or something similar?

I think there is also a bug with

It gives a parameter mismatch (like the other command)

Thanks again
Code Dragon
18
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 4th Jul 2007 18:57 Edited at: 4th Jul 2007 21:55
I've just begun working on a level editor and I'm going to use this DLL for the GUI. It looks great but whenever I use gui_createmenu() (I'm trying to make a menu in the main DBP window) I get this error:



Do I have to initalize anything other than using startwin32?

EDIT: I downloaded from the second page and now it says 'variable gui_createmenu() does not exist in program'

EDIT2: Oops! I really should have read the whole post before downloading this. Sorry, I didn't know the dropdown menu wasn't finished. Please add support for dropdown menus they are critical for my app!

You never really know a person until you look at their google autocomplete entries.

Attachments

Login to view attachments
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 5th Jul 2007 00:54
@Xlaydos
The Windows API is the Windows Application Programming Interface. It is in the Dev-C++ include folder, search for windows.h and similiar files.

Also, get edit text doesn't quite work yet... Unless this works:


@Code Dragon
There is a new DLL. Grab it from the very first post, the most recent package available.


Cheers,

-naota

Xsnip3rX
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 5th Jul 2007 11:38 Edited at: 5th Jul 2007 11:39
Aaron, im thinking about converting my Editor from Blue to your DLL, is all of This below possible in yours yet?


Code Dragon
18
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 5th Jul 2007 15:18
Quote: "There is a new DLL. Grab it from the very first post, the most recent package available."


Ok thanks. Does this DLL support the standard open and save dialog boxes, and if so what are the commands called?

You never really know a person until you look at their google autocomplete entries.
Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 5th Jul 2007 17:16
That returns cannot understand command :S, i'll have a look at the windows API thing thanks
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 5th Jul 2007 23:05
@Xsnip3rX
Most of it. Tabs aren't supported yet.

@Code Dragon
The standard open and save dialogs are assumed to be available. I believe the commands are: gui_openbox/gui_savebox or gui_opendialog/gui_savedialog.

@Xlaydos
There is example code on the first post, or at least, near there.


Cheers,

-naota

Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 5th Jul 2007 23:29
I couldn't find it but this command works in its place
Carl CLD
17
Years of Service
User Offline
Joined: 13th May 2007
Location: Watch your back!
Posted: 7th Jul 2007 22:04
Thank you for your dll !
I think it's very cool to let some things free !

Just to say I downloaded it !

Thank you
ProgZ

Ne pas mélanger périphérique et féerique, car l'informatique n'est pas du tout un conte de fées...
Brendy boy
19
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 9th Jul 2007 12:08
I have managed to make a button with a icon or bitmap shown on it. I'll upload the code in a few days when i cleanup the code.

God is real unless declared integer.
da power pwnerer
18
Years of Service
User Offline
Joined: 28th Jul 2006
Location: Pittsburgh, PA
Posted: 9th Jul 2007 14:35
is is possible to use darkbasic commands in the new windows, and if so,how?

da power pwnerer
18
Years of Service
User Offline
Joined: 28th Jul 2006
Location: Pittsburgh, PA
Posted: 9th Jul 2007 21:43
anyone?help?please

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 9th Jul 2007 23:02
@Carl CLD
Thanks. Have fun with it. ^^

@Brendy Boy
Cool, thank you.

@da power pwnerer
You could use GlobStruct to change the dbp window, but that could cause stability problems...


Cheers,

-naota

da power pwnerer
18
Years of Service
User Offline
Joined: 28th Jul 2006
Location: Pittsburgh, PA
Posted: 9th Jul 2007 23:08
awesome thnx

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 10th Jul 2007 06:53
No problem mate.


Cheers,

-naota

Xsnip3rX
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 10th Jul 2007 06:58
...tabs...

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 10th Jul 2007 07:01
<Takes tabs off list>

Xsnip3rX
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 10th Jul 2007 07:02
ohhh u better not! i'll make ninja and penguin kill you... , oh yea, they're ready for a fight, are you?

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 10th Jul 2007 07:05
Xsnip3rX, not only am I ready to fight, I have Chuck Norris on my side.... Besides, I need a little practice, the ninja will make good practice, and the penguin good food. Thanks. ^_^ As you know, I eat rocks in my little programming cave, the penguin will be a nice change.


Cheers,

-naota

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 10th Jul 2007 09:15
Ok, VERY IMPORTANT MESSAGE.

READ THIS MESSAGE BEFORE CONTINUING YOUR USE OF THE WINGUI PLUGIN!
WinGUI is now under the GPL (GNU General Public License). The main reason for this is because I am starting to see people making additions to WinGUI's source, without distributing the source (Not Brendy boy, he is doing what I intended. ). Anyways, this is where you can read up on the license: GNU General Public License

If you do not agree to this, you MUST stop the use of WinGUI, or any future WinGUI packages until you do agree to the license.

What this means for developers?
You MUST distribute the modified source of the plugin if you have made changes.


Cheers,

-naota

For reference, here is the GNU General Public License


da power pwnerer
18
Years of Service
User Offline
Joined: 28th Jul 2006
Location: Pittsburgh, PA
Posted: 11th Jul 2007 03:43
so... are you allowed to use it for commercial purposes im not
very good at understanding licenses (im dumb lol (j/k))

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 11th Jul 2007 09:26
You can use whatever you make with this for commercial purpose, however, you can not sell WinGUI alone.

Cheers,

-naota

Brendy boy
19
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 11th Jul 2007 12:04
Here is the code for button with image:


//b=MAKE BUTTON(ime$, posx, posy, sizex, sizey, hwnd, image_name)
MYCOMMAND HWND gui_makeButton(LPSTR text, int x, int y, int width, int height, HWND parent, LPSTR image)
{
HWND hWnd = CreateWindow("BUTTON", 0, WS_CHILD | WS_VISIBLE| BS_TEXT | BS_PUSHBUTTON | BS_BITMAP , x, y, width, height, parent, NULL, dbpHInstance(), NULL);
SendMessage(hWnd,BM_SETIMAGE,IMAGE_BITMAP,(LPARAM)(HBITMAP)LoadImage(dbpHInstance(),image,IMAGE_BITMAP,50,50,LR_LOADFROMFILE));
return hWnd;

}

Here is the resource for the command:

MAKE IMAGE BUTTON[%LSLLLLLS%?gui_makeButton@@YAPAUHWND__@@PADHHHHPAU1@0@Z%text, xpos, ypos, width, height, hwnd_parent, image_name

God is real unless declared integer.
Brendy boy
19
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 11th Jul 2007 12:07
Here is the command for static image:

//b=MAKE STATIC IMAGE(ime$, posx, posy, sizex, sizey, hwnd, image_name)
MYCOMMAND HWND gui_makeStaticImage(LPSTR text, int x, int y, int width, int height, HWND parent, LPSTR image)
{
HWND hWnd = CreateWindow("Static",NULL,WS_CHILD | WS_VISIBLE | SS_BITMAP | SS_NOTIFY,x,y,width,height,parent,NULL,dbpHInstance(),0);
SendMessage(hWnd,STM_SETIMAGE,IMAGE_BITMAP,(LPARAM)(HBITMAP)LoadImage(dbpHInstance(),image,IMAGE_BITMAP,width,height,LR_LOADFROMFILE));

return hWnd;
}

Here is the resource for the command:

MAKE STATIC IMAGE[%LSLLLLLS%?gui_makeStaticImage@@YAPAUHWND__@@PADHHHHPAU1@0@Z%text, xpos, ypos, width, height, hwnd_parent, image_name

God is real unless declared integer.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 12th Jul 2007 03:50
Cool Brendy boy. Unfortunately I am having trouble with my computer, and I cannot launch any of my developing software.... It was even rather hard to get up my web browser! I thank you for your contributions.


Cheers,

-naota

Brendy boy
19
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 12th Jul 2007 20:04
I forgot to upload piece of code. Before those image button codes you need to put this code:

static HBITMAP hBmp;
static HICON hIcon;
static HWND hIconBtn;
static HWND hBmpBtn;
static HWND static_image;

God is real unless declared integer.
Brendy boy
19
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 12th Jul 2007 20:06
Here are the codes for making listbox and adding string to listbox:

//a=MAKE LISTBOX(parent, posx, posy, width, height)
MYCOMMAND HWND make_list_box(HWND parent, int posx, int posy, int width, int height)
{
DWORD parameters=WS_CHILD|WS_VISIBLE|WS_BORDER;
HWND hWnd=CreateWindowEx(WS_EX_CLIENTEDGE, TEXT("LISTBOX"), NULL, parameters, posx, posy, width, height, parent, NULL, dbpHInstance(), NULL);

return hWnd;
}

//ADD STRING TO LISTBOX(hwnd, string)
MYCOMMAND add_string_to_listBox(HWND hWnd,LPSTR text)
{
SendMessage(hWnd,LB_ADDSTRING,0,(LPARAM)text);
//TEXT("LISTBOX")
}

God is real unless declared integer.
Brendy boy
19
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 12th Jul 2007 20:07
Here is the command for making a calendar (date picker):

//a=MAKE DATE PICKER(parent, xpos, ypos)
MYCOMMAND HWND make_date(HWND parent, int xpos, int ypos)
{
//create a date and time picker control
HWND hWnd=CreateWindowEx(0, //more or 'extended' styles
DATETIMEPICK_CLASS, //the 'class' of window to create
NULL, //the window title
WS_CHILD|WS_VISIBLE, //window style: how it looks
xpos, //window position: left
ypos, //window position: top
300, //window width
24, //window height
parent, //parent window handle
NULL, //handle to this windows's menu
dbpHInstance(), //application instance
NULL);
return hWnd;
}

God is real unless declared integer.
Brendy boy
19
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 12th Jul 2007 20:09
DB user 2006+
-Have you any idea how to make tabs?

God is real unless declared integer.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 12th Jul 2007 22:45
@Brendy Boy
Wow! Awsome! A listbox has already been added however, do you mean combobox? (The thing that is at the top of these here forums, says "My Threads", "DarkBasic Professional Discussion", etc)

I've an idea how, unfortunately I can't develop anything atm because my computer is all messed up.


Cheers,

-naota

Brendy boy
19
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 13th Jul 2007 18:55
No, i didn't think combobox. I thought that dll already had a combobox but i didn't see that it has a listbox function so i added it.

I managed to make a header function and function for adding items to it.

God is real unless declared integer.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 14th Jul 2007 12:24
@Brendy boy
Well, it is combobox, but there is a "list" option. (If I am thinking of what you are thinking)... I suppose, I have confused myself as I haven't worked on the combobox/listbox/whatever function in a while... Merely ported it.


Vote
I want to make a completely custom GUI plugin for DBP. (Ex, you could do it in DBP (But 10 times slower), but this DLL would simplify everything for you (As well as speed it up)

Should I include that DLL with WinGUI? Should I release source? What are your oppinions? (Don't worry, that doesn't mean WinGUI will get deprived)

I *kindof* want to sell the completely custom GUI (For income), but I would like to know your thoughts as well, as I believe in free software for all. (And the great GPL... No source stealing. )

Cheers,

-naota

Login to post a reply

Server time is: 2024-11-23 12:49:00
Your offset time is: 2024-11-23 12:49:00