#if wxUSE_OWNER_DRAWN
+#ifndef SPI_GETKEYBOARDCUES
+#define SPI_GETKEYBOARDCUES 0x100A
+#endif
+
class wxMSWSystemMenuFontModule : public wxModule
{
public:
DECLARE_DYNAMIC_CLASS(wxMSWSystemMenuFontModule)
};
-// these static variables are by the wxMSWSystemMenuFontModule object
+// these static variables are from the wxMSWSystemMenuFontModule object
// and reflect the system settings returned by the Win32 API's
// SystemParametersInfo() call.
wxString str = wxStripMenuCodes(m_strName);
// if we have a valid accel string, then pad out
- // the menu string so the menu and accel string are not
- // placed ontop of eachother.
+ // the menu string so that the menu and accel string are not
+ // placed on top of each other.
if ( !m_strAccel.empty() )
{
str.Pad(str.Length()%8);
int xText = rc.x + margin + 1;
- // using native API because it reckognizes '&'
+ // using native API because it recognizes '&'
int nPrevMode = SetBkMode(hdc, TRANSPARENT);
HBRUSH hbr = CreateSolidBrush(colBack),
hPrevBrush = (HBRUSH)SelectObject(hdc, hbr);
xText += 3; // separate text from the highlight rectangle
SIZE sizeRect;
- GetTextExtentPoint32(hdc,strMenuText.c_str(), strMenuText.Length(),&sizeRect);
+ ::GetTextExtentPoint32(hdc, strMenuText.c_str(), strMenuText.Length(), &sizeRect);
::DrawState(hdc, NULL, NULL,
(LPARAM)strMenuText.c_str(), strMenuText.length(),
xText, rc.y + (int) ((rc.GetHeight()-sizeRect.cy)/2.0), // centre text vertically
(((st & wxODHidePrefix) && !wxMSWSystemMenuFontModule::ms_showCues) ? 512 : 0)); // 512 == DSS_HIDEPREFIX
// ::SetTextAlign(hdc, TA_RIGHT) doesn't work with DSS_DISABLED or DSS_MONO
- // as last parameter in DrawState() (at least with Windows98). So we have
+ // as the last parameter in DrawState() (at least with Windows98). So we have
// to take care of right alignment ourselves.
if ( !m_strAccel.empty() )
{
int nBmpWidth = bmp.GetWidth(),
nBmpHeight = bmp.GetHeight();
- // there should be enough place!
+ // there should be enough space!
wxASSERT((nBmpWidth <= rc.GetWidth()) && (nBmpHeight <= rc.GetHeight()));
int heightDiff = m_nHeight - nBmpHeight;