Sure it can be done. Just do a keyword search in her for one of the solutions that allow you to intercept the creation of the Input box (two types; Hypetia's favoured timer technique, and my favoured CBT Hook technique). Either way you get the handle of the window being created, and can send it a message. In this case you want to send the EM_LIMITTEXT message, e.g.
SendMessage hwndEditControl, EM_LIMITTEXT, 5, 0
would limit input to a maximum of 5 characters.
Voila!