The MASM Forum
Microsoft 64 bit MASM => MASM64 SDK => Topic started by: hutch-- on October 31, 2016, 08:12:02 AM
-
I have done similar in the past with custom button controls but this is a standard Windows common control that you can get to work with a little massaging. It uses that awful WM_NOTIFY interface and NMHDR structure but it will end up where you can respond to it. ShellExecute() will open a browser window and its reasonably straight forward to make a link on a page or dialog that will open whatever URL you want.
-
Nice. :t
-
invoke ShellExecute,hWin,"open","www.masm32.com",0,0,SW_SHOW
There should be also an option to get the URL directly, but so far I've not been able to spot it in the debugger :(
LITEM structure (https://msdn.microsoft.com/en-us/library/windows/desktop/bb760710(v=vs.85).aspx)
szUrl
Type: WCHAR[L_MAX_URL_LENGTH]
WCHAR string that contains the URL represented by the link. The maximum number of characters in the array is L_MAX_URL_LENGTH.
-
if SysLink control is defined with HREF like this "<a href=\"http://www.masm32.com\">www.masm32.com</a>"
that link url is filled in message.
EDIT:
https://msdn.microsoft.com/en-us/library/windows/desktop/hh298379(v=vs.85).aspx (https://msdn.microsoft.com/en-us/library/windows/desktop/hh298379(v=vs.85).aspx)
https://msdn.microsoft.com/en-us/library/windows/desktop/hh270406(v=vs.85).aspx (https://msdn.microsoft.com/en-us/library/windows/desktop/hh270406(v=vs.85).aspx)
-
I just used a Microsoft example. Seems to work OK, any text you like in the control, a valid URL in the ShellExecute() function. Control dumps the mouse click in the NMHDR structure into the WM_NOTIFY message and the ShellExecute() function succeeds with a valid URL.