?
Solved

Selectable text in a List Box control

Posted on 2005-04-02
2
Medium Priority
?
223 Views
Last Modified: 2013-12-03
I want to know how to make a regular list box control, except you can select text that is in the control.  I'm not using MFC, just regular win32.
0
Comment
Question by:lwinkenb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 8

Expert Comment

by:novitiate
ID: 13694681
// Create a list box
hWndList = CreateWindow("listbox",NULL, WS_CHILD|
WS_VISIBLE|LBS_STANDARD, 400,50,iWidth+10 ,iHeight+50, hWnd,
(HMENU)"", hInst, NULL);


with resource editor it would be straight forward, drag n drop. :)

_novi_
0
 
LVL 11

Accepted Solution

by:
KurtVon earned 2000 total points
ID: 13697528
If you mean the text in the list box needs to be selected character-wise like an edit box, that is very difficult to achive with a list box.  It would probably be easier to make a read-only multiline edit box and just respond to the sel change message to prevent the user from doing selections that you don't want.

Hope this helps.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question