NO

Author Topic: Question about edit-control  (Read 4683 times)

sp00n

  • Guest
Question about edit-control
« on: April 25, 2007, 06:49:26 pm »
How can I cut the number of chars in edit-control?
Please tell me:)

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 566
    • Homepage
Re: Question about edit-control
« Reply #1 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
 ); 
---
Stefan

Proud member of the UltraDefrag Development Team

sp00n

  • Guest
Re: Question about edit-control
« Reply #2 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:)

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1893
Re: Question about edit-control
« Reply #3 on: April 26, 2007, 11:07:52 am »
Have you auto scroll on in resource file?
ES_AUTOHSCROLL
If so, take that off.

May the source be with you

sp00n

  • Guest
Re: Question about edit-control
« Reply #4 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:)))

sp00n

  • Guest
Re: Question about edit-control
« Reply #5 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 ;)