Is it possible to using accelerators within dialogs in addins? As i saw, RadAsm provides a lpModelessDialog function according to but where is the message loop for this modeless dialog? From where will i invoke TranslateAccelerator in addins?
Posted on 2005-09-17 13:03:51 by cakmak
I have not tried this but can't see any reason to why it should not work.

1. When the dialog is activated / gets focus set ADDINHANDLES.hGoTo and ADDINHANDLES.hAccel to your dialog window handle and accelerator table.
2. When dialog is deactivated restore ADDINHANDLES.hGoTo and ADDINHANDLES.hAccel

Posted on 2005-09-18 10:26:54 by KetilO
Mmm, i was guessed missing someting :) I don't meet everthing in includes. I will check these.

Thank you
Posted on 2005-09-18 12:50:25 by cakmak
Hi KetilO,

I couldn't implement that idea. But found another way. After calling my dialog, drpooing into a known message loop with translateMessage etc. I did not see any negativity. But only needs a trick to destroying dialog and get out from own loop.

Posted on 2005-09-21 12:03:11 by cakmak
Hi cakmak

RadASM will probably have problems with its modless dialogs (find and goto).

Here is what I meant. It seem to work OK.

Posted on 2005-09-21 13:25:41 by KetilO
Hi KetilO,

OK. Thank you. I will try this.

Posted on 2005-09-22 13:14:19 by cakmak

Thank you but what about accelerator usage? I did same things like hGoTo with hAccel. But how can i trap accel keys?

.if .....lpszAccelkeys == IDA_RETURN


.if eax == IDA_RETURN

in WM_COMMAND case but both cases couldn't trapped.

Posted on 2005-09-23 13:32:23 by cakmak

Maybe this will work. It is done in the asciiTab addin.

  invoke RegisterHotKey,hWnd,101h,NULL,1Bh
  invoke UnregisterHotKey,hWnd,101h

Posted on 2005-09-25 15:35:19 by KetilO