wxColour vColour;
- vColour.Set(wxString("BLACK"));
+ vColour.Set(wxString(wxT("BLACK")));
LONG lColor = (LONG)vColour.GetPixel();
int nHeightLineDefault = 0;
int nHeightLine = 0;
wxString sCurLine;
+ bool bLastWasAmpersand = FALSE;
for (const wxChar *pc = sText; ; pc++)
{
}
else
{
+ //
+ // We shouldn't take into account the '&' which just introduces the
+ // mnemonic characters and so are not shown on the screen -- except
+ // when it is preceded by another '&' in which case it stands for a
+ // literal ampersand
+ //
+ if (*pc == _T('&'))
+ {
+ if (!bLastWasAmpersand)
+ {
+ bLastWasAmpersand = TRUE;
+
+ //
+ // Skip the statement adding pc to curLine below
+ //
+ continue;
+ }
+
+ //
+ // It is a literal ampersand
+ //
+ bLastWasAmpersand = FALSE;
+ }
sCurLine += *pc;
}
}
const wxString& rsLabel
)
{
- ::WinSetWindowText(GetHwnd(), rsLabel.c_str());
+ ::WinSetWindowText(GetHwnd(), (PSZ)rsLabel.c_str());
//
// Adjust the size of the window to fit to the label unless autoresizing is