NO

Author Topic: Question about edit-control  (Read 6071 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: 582
    • 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: 2091
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 ;)