wxFrame* pFrame = (wxFrame*)wxTheApp->GetTopWindow();
::WinSetAccelTable( vHabmain
- ,(HWND)pFrame->GetFrame()
,hAccel
+ ,(HWND)pFrame->GetFrame()
);
}
M_ACCELDATA->m_hAccel = hAccel;
// Create from an array
wxAcceleratorTable::wxAcceleratorTable(
int n
-, wxAcceleratorEntry vaEntries[]
+, const wxAcceleratorEntry vaEntries[]
)
{
int nAccelLength = ((sizeof(ACCEL) * n) + sizeof(ACCELTABLE));
USHORT uVirt = AF_CHAR;
if (vaEntries[i].GetFlags() & wxACCEL_ALT)
+ {
uVirt |= AF_ALT;
+ uVirt |= AF_VIRTUALKEY;
+ }
if (vaEntries[i].GetFlags() & wxACCEL_SHIFT)
+ {
uVirt |= AF_SHIFT;
+ uVirt |= AF_VIRTUALKEY;
+ }
if (vaEntries[i].GetFlags() & wxACCEL_CTRL)
+ {
uVirt |= AF_CONTROL;
+ uVirt |= AF_VIRTUALKEY;
+ }
bool bIsVirtual;
USHORT uKey = wxCharCodeWXToOS2( vaEntries[i].GetKeyCode()
pArr->aaccel[i].key = uKey;
pArr->aaccel[i].cmd = uCmd;
}
- pArr->codepage = 437; // default to english Fix???
+ pArr->codepage = ::WinQueryCp(wxTheApp->m_hMq);
pArr->cAccel = (USHORT)n;
M_ACCELDATA->m_hAccel = ::WinCreateAccelTable( vHabmain
,pArr
wxFrame* pFrame = (wxFrame*)wxTheApp->GetTopWindow();
::WinSetAccelTable( vHabmain
- ,(HWND)pFrame->GetFrame()
,M_ACCELDATA->m_hAccel
+ ,(HWND)pFrame->GetFrame()
);
}
) const
{
PQMSG pMsg = (PQMSG)pWxmsg;
-
- return Ok() && ::WinTranslateAccel( vHabmain
- ,(HWND)hWnd
- ,GetHaccel()
- ,pMsg
- );
+ BOOL rc = FALSE;
+
+ rc = ::WinTranslateAccel( vHabmain
+ ,(HWND)hWnd
+ ,GetHaccel()
+ ,pMsg
+ );
+ if (rc)
+ {
+ int x = 1;
+ }
+ return (Ok() && rc);
} // end of wxAcceleratorTable::Translate