Sign in to follow this  
Followers 0
GaryFrost

SysLink (doing something wrong)

12 posts in this topic

#1 ·  Posted (edited)

Been working on this, but MSDN isn't always the easiest reading to figure out.

Any help on getting this to work correctly would be appreciated.

The control is being created but the return value on LM_SETITEM says successfull but when the item is clicked nothing is filled out from the struct except the hwndFrom and code fields.

More than likely I'm doing the struct's wrong or the calls to inits.

Gary

Edit: had wrong variable in getdat

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites



but MSDN isn't always the easiest reading to figure out.

Thats for Sure!

Sorry, i am no help... i took a long look at it

this does the trick

#include <GuiConstants.au3>

$GUI = GUICreate("Hyper Link Test",500,500)
$hl_hwnd = "http://www.Autoitscript.com/forum"
$Label = GUICtrlCreateLabel( 'Welcome to the AutoIt Script home page - the home of' & @LF & 'AutoIt scripting and related applications.', 10, 10, 480, 40)

GUISetState (@SW_SHOW)


While 1
    $msg = GUIGetMsg()
    
    Select
        
    Case $msg = $Label
        Run(@ComSpec & " /c Start " & $hl_hwnd, "", @SW_HIDE)
    Case $msg = $GUI_EVENT_CLOSE
        Exit
        
    EndSelect
Wend

i know its not what you want... but alot easier

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

I'm just curoius how to make it work, you know I know how take make one from a label

The link to HyperLinks Example is in my signature.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Gary? I may be missing something but the $tagNMLINK struct created in WM_Notify_HyperLink_Events() is init-ed with 3 members and you're querying like 9 later...


Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Gary? I may be missing something but the $tagNMLINK struct created in WM_Notify_HyperLink_Events() is init-ed with 3 members and you're querying like 9 later...

I did have a mistake in the $tagNMLINK, had 6 in the init instead of 9, but corrected that and still doesn't work.

the $tagNMHDR is init with 3

Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Gary? I may be missing something but the $tagNMLINK struct created in WM_Notify_HyperLink_Events() is init-ed with 3 members and you're querying like 9 later...

Thanks for pointing out my error in the getdat variable, partially works now

gets the hwndFrom, code and szID

Getting closer.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Just an example made this week to finalize my about box.

#include <GuiConstants.au3>

$GUI = GUICreate("Hyper Link Test",500,500)
GUISetFont(8.5, 400, 4, "Tahoma")
$lblSiteWeb = GUICtrlCreateLabel("http://www.Autoitscript.com/forum", 20, 20)
GUICtrlSetColor($lblSiteWeb, 0x0000FF)
GUICtrlSetCursor($lblSiteWeb, 0)
$lblCourriel = GUICtrlCreateLabel("Contact", 20, 60)
GUICtrlSetColor($lblCourriel, 0x0000FF)
GUICtrlSetCursor($lblCourriel, 0)

GUISetState (@SW_SHOW)

While 1
    Switch GUIGetMsg()
        Case $lblCourriel
            DllCall("shell32.dll", "long", "ShellExecute", "hwnd", 0, "string", "", "string", "mailto:support@autoitscript.com", "string", "", "string", "", "long", @SW_SHOWNORMAL)
        Case $lblSiteWeb
            DllCall("shell32.dll", "long", "ShellExecute", "hwnd", 0, "string", "", "string", "http://" & GUICtrlRead($lblSiteWeb), "string", "", "string", "", "long", @SW_SHOWNORMAL)
        Case $GUI_EVENT_CLOSE
            ExitLoop
    EndSwitch
Wend

Share this post


Link to post
Share on other sites

Just an example made this week to finalize my about box.

#include <GuiConstants.au3>

$GUI = GUICreate("Hyper Link Test",500,500)
GUISetFont(8.5, 400, 4, "Tahoma")
$lblSiteWeb = GUICtrlCreateLabel("http://www.Autoitscript.com/forum", 20, 20)
GUICtrlSetColor($lblSiteWeb, 0x0000FF)
GUICtrlSetCursor($lblSiteWeb, 0)
$lblCourriel = GUICtrlCreateLabel("Contact", 20, 60)
GUICtrlSetColor($lblCourriel, 0x0000FF)
GUICtrlSetCursor($lblCourriel, 0)

GUISetState (@SW_SHOW)

While 1
    Switch GUIGetMsg()
        Case $lblCourriel
            DllCall("shell32.dll", "long", "ShellExecute", "hwnd", 0, "string", "", "string", "mailto:support@autoitscript.com", "string", "", "string", "", "long", @SW_SHOWNORMAL)
        Case $lblSiteWeb
            DllCall("shell32.dll", "long", "ShellExecute", "hwnd", 0, "string", "", "string", "http://" & GUICtrlRead($lblSiteWeb), "string", "", "string", "", "long", @SW_SHOWNORMAL)
        Case $GUI_EVENT_CLOSE
            ExitLoop
    EndSwitch
Wend

Take a look at the Hyper Links example in my signature

What I'm looking for is to make this SysLink control get the data populated correctly and be able to retrieve that data.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0