Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Limit string length / Input mask
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Limit string length / Input mask

 Post Reply Post Reply
Author
Message
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Topic: Limit string length / Input mask
    Posted: 05 May 2007 at 7:25pm
I need to limit the length of a string item but  pItem->GetInplaceEdit().SetLimitText(...) does not work, the CEdit is not yet created in OnInitDialog or OnShowWindow.

How can I limit the string length?

I also need to limit the maximum number of digits of an integer item.

I've also tried to set a mask for a double item but that doesn't work.
"A" and "0" does not allow the decimal separator ("," or ".") to be entered and if I set the mask to "&" and then enter "1,5" I get an (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.

Also I don't want the prompt character ("_") to be displayed and the mask to be drawn in a gray shade. I also would like the mask to be displayed always and not only when the item is selected.


Is:



Should be:


Codejock support
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 07 May 2007 at 8:14am
Hello,
 
To limit text call
 
pItem->GetValueMetrics()->m_nMaxLength = xxx;
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.