Click here to Skip to main content
Sign Up to vote bad
good
See more: C++
Hi,
I have dll that coded by win32 and using resource.
I am using Listbox control in this dll.
 
case IDC_LIST1:
int index = SendDlgItemMessage(hDlg, IDC_LIST1, LB_ADDSTRING, (LPARAM)"RR", (LPARAM)"www.rezafx.com");
break;
I add content to listbox with above lines.
I want show one string include hyperlink in my List box. How I must do that?
With above code it only show static text.
Regards,
Posted 19-Nov-12 20:39pm
Rezame744


3 solutions

If working with win32 (no MFC) take a look at this to change color of items in the list:
 
Using ListView control under Win32 API[^]
 
This part of the article says it all:
"You won't believe how much time I took to dig this up to actually work! I mean, 99.99% examples were MFC only!
So here we go, finally, pure WinAPI code for listview colors."
 
If you can use MFC, this this article shows an hyperlink:
 
CGridListCtrlEx - Grid Control Based on CListCtrl[^]
 
Hope it helps.
  Permalink  
Comments
Sergey Alexandrovich Kryukov - 28-Nov-12 19:51pm
Right, good points, a 5. --SA
The ListBox control does not understand hyperlinks, only strings. However, you can use the LBS_OWNERDRAWFIXED style, as described in this MSDN page[^], and provide your own message handling to add such functionality.
  Permalink  
Comments
Espen Harlinn - 20-Nov-12 10:10am
5'ed!
Sergey Alexandrovich Kryukov - 28-Nov-12 19:51pm
Agree, a 5. --SA
Have a look at Create your own controls - the art of subclassing[^]
 
You can subclass the listbox, and keep track of when your item should be visible. Create a SysLink[^] control and place it over your item.
 
Best regards
Espen Harlinn
  Permalink  
Comments
Richard MacCutchan - 20-Nov-12 10:16am
And a 5 for you; I forgot about this control.
Espen Harlinn - 20-Nov-12 10:17am
Thank you, Richard :-D
Sergey Alexandrovich Kryukov - 28-Nov-12 19:51pm
Good one, a 5. --SA
Espen Harlinn - 29-Nov-12 3:44am
Thank you, Sergey :-D
Mika Wendelius - 12-Dec-12 0:19am
Good control to remember :)
Espen Harlinn - 12-Dec-12 9:37am
Thank you, Mika :-D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 6,959
1 Prasad_Kulkarni 3,671
2 OriginalGriff 3,359
3 _Amy 3,332
4 CPallini 2,925


Advertise | Privacy | Mobile
Web01 | 2.6.130617.1 | Last Updated 20 Nov 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid