• Welcome to PlanetSquires Forums.
 

CMaskedEdit

Started by Paul Squires, November 01, 2018, 02:05:08 PM

Previous topic - Next topic

Paul Squires

I have the new MaskedEdit control integrated into WinFBE but I am/was a little confused about the SetText documentation.

bSetMaskedCharsOnly Set the masked characters only, without the input mask.

Unless I am interpreting the documentation incorrectly, setting bSetMaskedCharsOnly to TRUE means that you would pass a string using only the mask characters without the input mask (eg. "5551119999"). If set to FALSE then you would also pass the Input Mask (eg. "(555) 111-9999").

However, in operation the logic appears to work the exact opposite. In order to work, SetText("5551119999", FALSE) or SetText("(555) 111-9999", TRUE).

Am I right? Wrong? Documentation error?

Paul Squires
PlanetSquires Software
WinFBE Editor and Visual Designer

José Roca

#1
Well, my poor attempt was to mean that in

pMskEd.EnableMask(" ddd  ddd dddd", "(___) ___-____", "_")
pMskEd.SetText("(123) 123-1212"), TRUE

where " ddd  ddd dddd" are the masked characters and "(___) ___-____" the input mask, passing true to that parameter will cause to set only the numbers (the masked characters) without the () and -, that correspond to the input mask.

But because there is a "mask" and "masked characters", I don't know how to explain it better.

With the EnableMask method, both the masked characters and the input mask are mandatory, and must be the same length.