edit输入字符串长度限制?该怎么处理
edit输入字符串长度限制?
hEdit = CreateWindow( TEXT( "edit " ), "1111111111 ",
WS_CHILD | WS_VISIBLE | WS_BORDER ,
110,10,130, 20,
hwnd, ( HMENU ) 1, ( ( LPCREATESTRUCT ) lParam )-> hInstance, NULL ) ;
这样建立一个edit, 然后往里打字,到框末端之后继续打字就没反应了,怎么能让他最长可输入100字节,下面2个方法我都试过了,没有效果
SendMessage(hTB_ServerName, EM_SETLIMITTEXT, 100, 0);
SendMessage(hTB_ServerName, EM_SETLIMITTEXT, (WPARAM)100, 0);
------解决方案--------------------
ES_AUTOHSCROLL
Automatically scrolls text to the right by 10 characters when the user types a character at the end of the line. When the user presses the ENTER key, the control scrolls all text back to position zero.
hEdit = CreateWindow( TEXT( "edit " ), "1111111111 ",
WS_CHILD | WS_VISIBLE | WS_BORDER ,
110,10,130, 20,
hwnd, ( HMENU ) 1, ( ( LPCREATESTRUCT ) lParam )-> hInstance, NULL ) ;
这样建立一个edit, 然后往里打字,到框末端之后继续打字就没反应了,怎么能让他最长可输入100字节,下面2个方法我都试过了,没有效果
SendMessage(hTB_ServerName, EM_SETLIMITTEXT, 100, 0);
SendMessage(hTB_ServerName, EM_SETLIMITTEXT, (WPARAM)100, 0);
------解决方案--------------------
ES_AUTOHSCROLL
Automatically scrolls text to the right by 10 characters when the user types a character at the end of the line. When the user presses the ENTER key, the control scrolls all text back to position zero.