How to create a hyperlink?

BlitzMax Forums/BlitzMax Programming/How to create a hyperlink?

Boiled Sweets(Posted 2006) [#1]
How would I go about creating a hyperlink type gadget in MaxGui?

Basically text that when clicked loads ie...


JoeRetro(Posted 2006) [#2]
I don't have MaxGui so I'm not sure how to create a gadget, but here's a little snippet of code that will launch the default browser on windows and load the URL you define.

?Win32
Import "-lshell32"
Extern "win32"
	Function ShellExecuteA (s1:Int, s2:Byte Ptr, s3:Byte Ptr, s4:Byte Ptr, s5:Byte Ptr, s6:Int)
End Extern
Const SW_SHOW = 5
?

ShellExecuteA (Null,Null, "www.webappstogo.com", Null, Null, SW_SHOW);



Yan(Posted 2006) [#3]
Bmax has OpenUrl() now days, Joe.

Have a look at CreateHTMLView:TGadget() with a HTMLVIEW_NONAVIGATE style and use OpenURL().


Boiled Sweets(Posted 2006) [#4]
The CreateHTMLView is not in the docs! Neither is OpenURL. This docs problem is soooo ridiculous!!!!!!


Yan(Posted 2006) [#5]
Yes it is!

It sounds like there's something wrong with your BMax install. :o/

Try running (make sure your IDE is not running)...
<BMax Installation Path>\bin\docmods
...from the command line and restarting your IDE.

If that doesn't help, try the following...

Un-install BMax.
Delete the BMax folder (this is important).
Install the latest BMax.
Synchronise the mods.
Restart the IDE.

If it's the docs are *still* buggered, make a bug report.


Boiled Sweets(Posted 2006) [#6]
Thanks Jeremy!

I'll give it a go.

Do you want a free copy of Crazy Chilli?


JoeRetro(Posted 2006) [#7]
Yep, that seemed to do the trick...Thanks!


Boiled Sweets(Posted 2006) [#8]
So Joe,

whens the MAX ss out?


Yan(Posted 2006) [#9]

Do you want a free copy of Crazy Chilli?
Thanks for the thought but I never use em. I just let me monitor go to standby.

I only wrote the cheesy saver cos my daughter asked me to. :o)

Did you get your docs sorted?


JoeRetro(Posted 2006) [#10]
@Boiled: I'd like to convert my OpenGL 3D Cube Gallery screensaver over to MAX. This will give me a good idea of how slow/fast MAX is compared to native C. It will also be a nice project to learn all about MAX :)