Jump to content

SysLink (doing something wrong)


GaryFrost
 Share

Recommended Posts

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.

 

Link to comment
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

Link to comment
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.

Link to comment
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...

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.

 

Link to comment
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.

 

Link to comment
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
Link to comment
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.

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...