www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - TKd handling of custom events

reply "univacc" <univacc mail.de> writes:
Hello,

I am using TKd to dray my linux/windows app which works very good!

I would like to add a global Hotkey to my program via the Win32 
API function RegisterGlobalHotkey.
Is there a possibility to access Tk's event loop so that you can 
Handle the WM_HOTKEY message, the WinAPI sends you?

Regards,
univacc
Nov 19 2014
next sibling parent "univacc" <univacc mail.de> writes:
On Wednesday, 19 November 2014 at 23:44:00 UTC, univacc wrote:
 Hello,

 I am using TKd to dray my linux/windows app which works very 
 good!

 I would like to add a global Hotkey to my program via the Win32 
 API function RegisterGlobalHotkey.
 Is there a possibility to access Tk's event loop so that you 
 can Handle the WM_HOTKEY message, the WinAPI sends you?

 Regards,
 univacc
Nevermind. If someone has the same issue: Just create another Win32 API Window, that is hidden and let that one receive your hotkey message! Regards
Nov 20 2014
prev sibling parent "Gary Willoughby" <dev nomad.so> writes:
On Wednesday, 19 November 2014 at 23:44:00 UTC, univacc wrote:
 Hello,

 I am using TKd to dray my linux/windows app which works very 
 good!

 I would like to add a global Hotkey to my program via the Win32 
 API function RegisterGlobalHotkey.
 Is there a possibility to access Tk's event loop so that you 
 can Handle the WM_HOTKEY message, the WinAPI sends you?

 Regards,
 univacc
I don't think this is possible in Tcl/Tk without installing an extension as discussed here: http://computer-programming-forum.com/57-tcl/c9af2b9def3914c2.htm Tkd doesn't rely on any extensions and is just using vanilla Tcl/Tk.
Nov 20 2014