Pelles C forum

C language => Beginner questions => Topic started by: sp00n on April 25, 2007, 06:49:26 PM

Title: Question about edit-control
Post by: sp00n on April 25, 2007, 06:49:26 PM
How can I cut the number of chars in edit-control?
Please tell me:)
Title: Re: Question about edit-control
Post by: Stefan Pendl on April 26, 2007, 12:40:18 AM
From the Windows platform SDK:
Code: [Select]
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
 ); 
Title: Re: Question about edit-control
Post by: 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:
Code: [Select]
SendMessage(  GetDlgItem(0,4003),  EM_SETLIMITTEXT,  4, 0); 
it doesn't work:(
I'm in the bloom:)
Title: Re: Question about edit-control
Post by: TimoVJL on April 26, 2007, 11:07:52 AM
Have you auto scroll on in resource file?
ES_AUTOHSCROLL
If so, take that off.

Title: Re: Question about edit-control
Post by: sp00n on April 26, 2007, 03:58:31 PM
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:)))
Title: Re: Question about edit-control
Post by: sp00n on April 26, 2007, 06:00:17 PM
hmmmm
can you type a working code? 'cause when i try to use it in the way:
Code: [Select]
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 ;)