Question about edit-control

Started by sp00n, April 25, 2007, 06:49:26 PM

Previous topic - Next topic

sp00n

How can I cut the number of chars in edit-control?
Please tell me:)

Stefan Pendl

From the Windows platform SDK:
lResult = SendMessage(      // returns LRESULT in lResult
     (HWND) hWndControl,      // handle to destination control
     (UINT) EM_SETLIMITTEXT,      // message ID
     (WPARAM) wParam,      // = (WPARAM) () wParam;
    (LPARAM) lParam      // = 0; not used, must be zero
); 
---
Stefan

Proud member of the UltraDefrag Development Team

sp00n

hmmmm
can you type a working code? 'cause when i try to use it in the way:
SendMessage(  GetDlgItem(0,4003),  EM_SETLIMITTEXT,  4, 0); 

it doesn't work:(
I'm in the bloom:)

TimoVJL

Have you auto scroll on in resource file?
ES_AUTOHSCROLL
If so, take that off.

May the source be with you

sp00n

Quote from: timovjl on April 26, 2007, 11:07:52 AM
Have you auto scroll on in resource file?
ES_AUTOHSCROLL
If so, take that off.
What do you talk about???o_O
Which autoscroll in edit control?:)

P.S.No, in resource file I haven't that ID:)))

sp00n

Quote from: sp00n on April 26, 2007, 08:15:31 AM
hmmmm
can you type a working code? 'cause when i try to use it in the way:
SendMessage(  GetDlgItem(0,4003),  EM_SETLIMITTEXT,  4, 0); 

it doesn't work:(
I'm in the bloom:)
very strange, but now it's working:))
don't understand anything
Topic closed ;)