keyCode = wxToupper(current[0U]);
}
else {
- // it should be a function key
+ // is it a function key?
if ( current[0U] == 'f' && isdigit(current[1U]) &&
(current.Len() == 2 ||
(current.Len() == 3 && isdigit(current[2U]))) ) {
keyCode = VK_F1 + n - 1;
}
else {
- wxLogDebug(wxT("Unrecognized accel key '%s', accel "
- "string ignored."), current.c_str());
+ // several special cases
+ current.MakeUpper();
+ if ( current == wxT("DEL") ) {
+ keyCode = VK_DELETE;
+ }
+ else if ( current == wxT("PGUP") ) {
+ keyCode = VK_PRIOR;
+ }
+ else if ( current == wxT("PGDN") ) {
+ keyCode = VK_NEXT;
+ }
+ else {
+ wxLogDebug(wxT("Unrecognized accel key '%s', accel "
+ "string ignored."), current.c_str());
+ }
}
}
}
else
{
#ifdef __WIN32__
- if ( id == idMenuTitle )
+ if ( (int)id == idMenuTitle )
{
// visually select the menu title
MENUITEMINFO mii;
}
if ( ::ModifyMenu(GetHmenu(), pos, MF_BYPOSITION | MF_STRING | flagsOld,
- id, label) == 0xFFFFFFFF )
+ id, label) == (int)0xFFFFFFFF )
{
wxLogLastError("ModifyMenu");
}
void wxMenuBar::Detach()
{
// ::DestroyMenu((HMENU)m_hMenu);
- m_hMenu = NULL;
+ m_hMenu = (WXHMENU)NULL;
m_menuBarFrame = NULL;
}