Solved

List-View control label editing problem

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How Does Quick Books store date / time? 3 104
Mixed results 10 90
Problem to adjust sheet 1 92
Access 2013: API code to put hidden database icon in taskbar? 8 87
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.…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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 a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

829 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