How to create a hyperlink?

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

How would I go about creating a hyperlink type gadget in MaxGui?

Basically text that when clicked loads ie...

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);


Bmax has OpenUrl() now days, Joe.

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

The CreateHTMLView is not in the docs! Neither is OpenURL. This docs problem is soooo ridiculous!!!!!!

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.

Thanks Jeremy!

I'll give it a go.

Do you want a free copy of Crazy Chilli?

Yep, that seemed to do the trick...Thanks!

So Joe,

whens the MAX ss out?


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?

@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 :)