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.

Code Snippets / [DBP] Vista Basic Window Rendering

Author
Message
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 15th Nov 2007 07:50 Edited at: 17th Nov 2007 22:10
Well, I went on a break after doing 10 hours of homework today <And still having more to go>, so I decided to build something pretty cool with my time. I could have done it sooner.... But I had to get DBP installed.

Here's the functions.


And here's an entire example that can run out of the box with or without additional media.


The media is attached in the post <It's a file called "icon.bmp", and should be put in the same folder as the code example but it's not required by the core functions nor the example>.





I suppose I could expand on this if I wanted to make it a full-blown GUI, but that wouldn't be really fun... All it'd be is me writing some simple maths doing some simple functions, I mean, a GUI isn't really hard to make, so there'd be no challenge in it. :/ So if I did work on this further it'd be out of an event like currently where I don't want to do any more challenges for the day.


Cheers,

-naota

"I'd newbie slap here, but I've no idea how far I'd need slap before they'd come back with a clue." - VanB
Aex.Uni forums

Attachments

Login to view attachments
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 15th Nov 2007 07:51
Here's a screenshot.

"I'd newbie slap here, but I've no idea how far I'd need slap before they'd come back with a clue." - VanB
Aex.Uni forums

Attachments

Login to view attachments
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 15th Nov 2007 11:45
Hey this looks like my Blue Screens ,Inc thingy

Im doing "fake os" with window kind of shape.. And it crashses randomily



(It was in 20 liner.. Because mod never moved it to code snippets :/)

[center]

Click for details!
HeavyAmp
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 15th Nov 2007 15:54 Edited at: 16th Nov 2007 02:02
Nice work Aaron and Roxas. While were all putting our windows GUI up I may as well show the one i'm working on.



Better to be dead, than to live your life afraid.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 15th Nov 2007 21:33
Nice. Though I'd recommend a linked-list approach to both of your methods... Just makes everything easier and more efficient.


Cheers,

-naota

"I'd newbie slap here, but I've no idea how far I'd need slap before they'd come back with a clue." - VanB
Aex.Uni forums
HeavyAmp
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 16th Nov 2007 00:11 Edited at: 16th Nov 2007 02:01
Yeah a linked list array would be a lot of faster since I'm changing array Positions all the time although I'm not exactly sure how I go about using linked lists in DBP. Could you give me a quick example?

Edit: My above code is now fixed so all windows work.

Better to be dead, than to live your life afraid.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 16th Nov 2007 01:48
I assume this code will work:


That code probably won't work. This is the C++ version:


Cheers,

-naota

"I'd newbie slap here, but I've no idea how far I'd need slap before they'd come back with a clue." - VanB
Aex.Uni forums
HeavyAmp
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 16th Nov 2007 02:17
I'm a bit confused, This is what I have so far. In the windows Type/Struct You have pointer Variables which point to the the Previous Windows position and You have another which points to the Next windows position. In DBP this would be the array number and in c++ this would be the Memory address. I'm not really sure of things up to there. I don't really know what the parent does or what the Valid does in the DBP version. Sorry I always find it difficult understanding other people's code. Could you explain it a little more

Better to be dead, than to live your life afraid.
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 16th Nov 2007 03:45
and i suppose nobody remembers mine (which cant yet support multiple windows)

alus.portbb.com go there.
[quote]A book. I hate books. book is stupid. I know that I need codes but I dont know the codes.[/quote} -zenicanin14 the stupidest user in the world.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 16th Nov 2007 04:02
Sure.

In DBP the prev/next members point to the previous and next item in the list. The valid thing simply explains if the current item is able to be used. For example, the list alone can't be used as it isn't actually a window.

The parent is a GUI thing.


Cheers,

-naota

"I'd newbie slap here, but I've no idea how far I'd need slap before they'd come back with a clue." - VanB
Aex.Uni forums
HeavyAmp
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 16th Nov 2007 05:06 Edited at: 16th Nov 2007 05:09
@aluseus GOD
I saw your windows example a while ago, I went back and had another look at it. I like your window resizing function it works really well. I think I might have a closer look at it when I come to that part of my windows project . I hope you don't mind?

@Aaron Miller
I think I understand how to implement a linked list into my project now. Thanks for your help Aaron.

Better to be dead, than to live your life afraid.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 16th Nov 2007 05:07
No problem HeavyAmp.

At others: I think I may as well implement a working GUI control context as well.


Cheers,

-naota

"I'd newbie slap here, but I've no idea how far I'd need slap before they'd come back with a clue." - VanB
Aex.Uni forums
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 16th Nov 2007 05:19
hey its ok heavy amp, you can learn from it.

alus.portbb.com go there.
[quote]A book. I hate books. book is stupid. I know that I need codes but I dont know the codes.[/quote} -zenicanin14 the stupidest user in the world.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 16th Nov 2007 06:54
Well, it's not complete but check this out:



The program and all the files are attached in a .ZIP archive.


Cheers,

-naota

"I'd newbie slap here, but I've no idea how far I'd need slap before they'd come back with a clue." - VanB
Aex.Uni forums

Attachments

Login to view attachments
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 16th Nov 2007 06:55 Edited at: 16th Nov 2007 06:56
And here's the screenshot of the VistaBasicMessageBox function in action.



Cheers,

-naota

"I'd newbie slap here, but I've no idea how far I'd need slap before they'd come back with a clue." - VanB
Aex.Uni forums

Attachments

Login to view attachments
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 16th Nov 2007 16:12
Very nice!
Keep it up!


Click For Details!

HeavyAmp
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 16th Nov 2007 16:14
Hey thats really cool progress. I like the way the background windows are faded out.

Better to be dead, than to live your life afraid.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 16th Nov 2007 23:24 Edited at: 17th Nov 2007 10:11
Thanks. I hate building GUIs in DBP though... Such bad support for linked lists, I may have to make a DLL for dealing with linked lists. :/

Edit
Anyone can use this for any purpose btw.

Cheers,

-naota

"I'd newbie slap here, but I've no idea how far I'd need slap before they'd come back with a clue." - VanB
Aex.Uni forums
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 17th Nov 2007 22:09 Edited at: 17th Nov 2007 22:09
Sorry to bump but here's an update:


Here's a screenshot showing the update... This should be self-explanatory.




Cheers,

-naota

"I'd newbie slap here, but I've no idea how far I'd need slap before they'd come back with a clue." - VanB
Aex.Uni forums

Attachments

Login to view attachments
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 17th Nov 2007 22:11
do you know what an r-lol is? well this is it.

alus.portbb.com go there.
[quote]A book. I hate books. book is stupid. I know that I need codes but I dont know the codes.[/quote} -zenicanin14 the stupidest user in the world.
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 17th Nov 2007 22:12
What do you mean by that aluseus?

Cheers,

-naota

"I'd newbie slap here, but I've no idea how far I'd need slap before they'd come back with a clue." - VanB
Aex.Uni forums
aluseus GOD
17
Years of Service
User Offline
Joined: 19th Mar 2007
Location: I\'m here. Now I\'m there. I keep moving
Posted: 17th Nov 2007 22:43
basically means pretty cool.

alus.portbb.com go there.
[quote]A book. I hate books. book is stupid. I know that I need codes but I dont know the codes.[/quote} -zenicanin14 the stupidest user in the world.
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 18th Nov 2007 00:15
RLOL - Really Laughing Out Loud
That makes no sense at all in this context! So I'll use the term r0XX0r instead!

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 18th Nov 2007 02:59
Thanks.

Cheers,

-naota

"I'd newbie slap here, but I've no idea how far I'd need slap before they'd come back with a clue." - VanB
Aex.Uni forums
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 20th Nov 2007 07:31
Just wanted to say that the next time I work on this is gonna be in my Vista Programming Language (VPL)


Cheers,

-naota

"I choose to believe, what I was programmed to believe!"
Aex.Uni forums

Login to post a reply

Server time is: 2024-11-22 13:43:34
Your offset time is: 2024-11-22 13:43:34