From: Jack on 18 Feb 2010 04:22 Hello, I recall that once I wrote a little program that could limit the number of characters the field could contain. I vaguely recall something that looks like "getnline();" But I couldn't find it from google and MSDN. Any reminder? Thanks Jack
From: Ulrich Eckhardt on 18 Feb 2010 06:32 Jack wrote: > I recall that once I wrote a little program that > could limit the number of characters the field could contain. I have no idea what you're talking about here and what DOS has to do with that, but I'll try guessing from the part below: > I vaguely recall something that looks like "getnline();" But I couldn't > find it from google and MSDN. There is fgets() in C. Further, there is gets(), but that should never be used anyway. In C++, you could also use the std::getline() function and then truncate the result or use std::istream's readsome() member. Cheers! Uli -- C++ FAQ: http://parashift.com/c++-faq-lite Sator Laser GmbH Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
From: Jack on 18 Feb 2010 08:25 Say I had a textbox Name:_______ The user can type into box, after he has typed up to 6 characters, he would not be allowed to continue and the PC starts beeping... etc Thanks Jack
From: Ulrich Eckhardt on 18 Feb 2010 09:08 Jack wrote: > Say I had a textbox Name:_______ > The user can type into box, after he has typed up to 6 characters, he > would not be allowed to continue and > the PC starts beeping... etc The probably widest-spread library to create graphical UIs in a text screen is called "curses". There are various flavours and variants of that library, but you should be able to find one that suits you with that name. Uli -- C++ FAQ: http://parashift.com/c++-faq-lite Sator Laser GmbH Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
|
Pages: 1 Prev: HWND to LPVOID Next: fclose and CreateFile are very slow on some machines |