Solved

List-View control label editing problem

Posted on 1998-05-26
3
202 Views
Last Modified: 2013-12-03
I have a list-view control, its labels can be edited by the user. However, after typing just one character, Windows thinks I'm done, for some reason, sends a WM_NOTIFY with LVN_ENDLABELEDIT or whatever it's called, and, oddly enough, sends a WM_COMMAND with command identifier 1 (IDOK).
I think it thinks I canceled the editing, but I did not.

Using Windows NT and MSVC.
0
Comment
Question by:_Zaphod
[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
3 Comments
 
LVL 11

Expert Comment

by:alexo
ID: 1404202
Check your "break" statements.
0
 
LVL 1

Author Comment

by:_Zaphod
ID: 1404203
That indeed was the obvious thing to do. It's not the problem though, because I placed a breakpoint there, and the values really were WM_COMMAND and 1.
0
 
LVL 7

Accepted Solution

by:
BlackMan earned 100 total points
ID: 1404204
It is possible to limit the amount of text the user may enter. If this in some way has been set to 1 (default is 30000), you'll get the result you describe.
Try setting the limit using the EM_LIMITTEXT message and see if that will do the trick.

EM_LIMITTEXT
wParam = (WPARAM) cchMax;   // text length, in characters
lParam = 0;                 // not used; must be zero
 
Parameters
cchMax
Value of wParam. Specifies the maximum number of characters the user can enter. If this parameter is zero, the text length is set to 0x7FFFFFFE characters for single-line edit controls or 0xFFFFFFFF for multiline edit controls.

0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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 brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

615 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