Solved

List-View control label editing problem

Posted on 1998-05-26
3
191 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
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

This article describes a technique for converting RTF (Rich Text Format) data to HTML and provides C++ source that does it all in just a few lines of code. Although RTF is coming to be considered a "legacy" format, it is still in common use... po…
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now