Restored from previous forum. Originally posted by Justin.
The setcursor doc says something about setting the class to null if you change the cursor, i don't know..
http://msdn.microsoft.com/library/defau ... cursor.asp
also i think you can't load the hand cursor in W95.
I did this workaround that uses a listview, there is a style that does the job of changing the cursor and coloring the text.
The only problem is that the text is highlited for a short time, maybe it can be fixed?
I had to create the control because i could't make a borderless listicon gadget, it can be done?
;Hyperlink test2
#LVS_EX_ONECLICKACTIVATE=64
#LVM_SETEXTENDEDLISTVIEWSTYLE=#LVM_FIRST+54
#LVN_ITEMACTIVATE=#LVN_FIRST-14
Structure lvst
mask.l
iItem.l
iSubItem.l
state.l
stateMask.l
pszText.s
cchTextMax.l
iImage.l
lParam.l
iIndent.l
EndStructure
LVITEM.lvst
Procedure listproc(hwnd,msg,wparam,lparam)
ret=#PB_ProcessPureBasicEvents
Select msg
Case #WM_NOTIFY
*ptr.NMHDR=lparam
If *ptr\code=#LVN_ITEMACTIVATE ;click
Activategadget(1)
shellexecute_(hwnd,"open","http:\\
http://www.purebasic.com","","",#SW_SHOWNORMAL)
ret=0
EndIf
EndSelect
ProcedureReturn ret
EndProcedure
hwnd=OpenWindow(0,10,10,300,200,#PB_Window_SystemMenu,"Hyperlink Test")
CreateGadgetList(hwnd)
hl=CreateWindowEx_(0,"SysListView32","",#WS_CHILD|#WS_VISIBLE|#LVS_LIST,10,10,100,20,hwnd,0,GetModuleHandle_(0),0)
hf=createfont_(15,0,0,0,0,0,#true,0,0,0,0,0,0,"Verdana")
sendmessage_(hl,#WM_SETFONT,hf,#true)
sendmessage_(hl,#LVM_SETEXTENDEDLISTVIEWSTYLE,-1,#LVS_EX_ONECLICKACTIVATE)
sendmessage_(hl,#LVM_SETBKCOLOR,0,#CLR_NONE)
sendmessage_(hl,#LVM_SETTEXTBKCOLOR,0,#CLR_NONE)
LVITEM\mask=#LVIF_TEXT
LVITEM\iItem=0
LVITEM\pszText="VisitPureBasic"
sendmessage_(hl,#LVM_INSERTITEM,0,@LVITEM)
ButtonGadget(1,230,175,60,20,"Cancel")
SetWindowCallback(@listproc())
Repeat
eventid=WaitWindowEvent()
If eventid=#PB_EventGadget
If EventGadgetID()=1 : End : EndIf
EndIf
Until eventid=#PB_Event_CloseWindow