Accelerators translated from C 2 Eu / "HELP"

new topic     » topic index » view thread      » older message » newer message

Hello,

I am trying very hard to translate some C to Eu and
heres a question I have.

How can I setup the Accelerator Keys so they can be 
checked via TranslateAccelerator?

I have the code setup to handle the keys at present in WinFunc
but would like to know this tid bit as it seems to show up alot
in the material I have to convert over...

// Define menu accelerators
" "ACCELERATORS
{
  VK_F2, IDM_, VIRTKEY
  "^X",  IDM_EXIT
}


Now In WinMain

> snip

-- Coded for Eu

-- CreateWindow etc

    mnuName = allocate_string("Menu")    
    hAccel = c_func(xLoadAccelerator, {hInstance, mnuName})    
    hinst = peek4s(wndclass + hInstance)
    
    c_proc(ShowWindow, {hwnd, SW_SHOWNORMAL})
    c_proc(UpdateWindow, {hwnd})

    while c_func(GetMessage, {msg, NULL, 0, 0}) do
     
          if c_func(xTranslateAccelerator, {hwnd, hAccel, msg}) then
             c_proc(TranslateMessage, {msg})
             c_proc(DispatchMessage, {msg})
             return msg = wParam
          else
            c_proc(TranslateMessage, {msg})
            c_proc(DispatchMessage, {msg})
          end if

>snip

Thanks in Advance.
Euman

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu