Discussion:
bug in CStatic text box ?
(too old to reply)
Z.K.
2006-12-27 22:25:24 UTC
Permalink
I have a string of converted hex values to ascii as in é"r% & *![^!'P. It
displays okay in a MessageBox and an Edit control, but in a CStatic text
box, some of the characters are incorrect as in é"r% _*![^!'P. Is this
normal or a bug in VC++. Is there a way to fix this so it displays
correctly?

Why would I want to display such a string? Because it is a special code for
a barcode that enables a bluetooth radio. It does have a purpose and I can
get around this problem by using an Edit control, but I was wondering if
there is a fix for this problem that I am having.

Z.K.
David Lowndes
2006-12-27 22:47:20 UTC
Permalink
Post by Z.K.
I have a string of converted hex values to ascii as in é"r% & *![^!'P. It
displays okay in a MessageBox and an Edit control, but in a CStatic text
box, some of the characters are incorrect as in é"r% _*![^!'P. Is this
normal or a bug in VC++. Is there a way to fix this so it displays
correctly?
SS_NOPREFIX

"Unless this style is specified, Windows will interpret any ampersand
(&) characters in the control's text to be accelerator prefix
characters. In this case, the ampersand is removed and the next
character in the string is underlined. If a static control is to
contain text where this feature is not wanted, SS_NOPREFIX may be
added."

Dave
Z.K.
2006-12-30 09:28:57 UTC
Permalink
Ok, thanks; that is good to know.

Z.K.
Post by David Lowndes
Post by Z.K.
I have a string of converted hex values to ascii as in é"r% & *![^!'P. It
displays okay in a MessageBox and an Edit control, but in a CStatic text
box, some of the characters are incorrect as in é"r% _*![^!'P. Is this
normal or a bug in VC++. Is there a way to fix this so it displays
correctly?
SS_NOPREFIX
"Unless this style is specified, Windows will interpret any ampersand
(&) characters in the control's text to be accelerator prefix
characters. In this case, the ampersand is removed and the next
character in the string is underlined. If a static control is to
contain text where this feature is not wanted, SS_NOPREFIX may be
added."
Dave
Loading...