> I have successfully embedded InternetExplorer canvas (from 
> mshtml.dll) as a subwindow of fltk window - under MingW.
> I had one problem thought, acceleration keys  - such as 
> PgDown, PgUp, Copy/Paste/Cut (CTRL+C, CTRL+V, Ctrl+X), even 
> Delete key -
> did not work without modification of fltk library. The reason 
> for that is that fltk gives no chance to call calls 
> TranslateAccelerator functions - which have to
> be processed before messages are translated and dispatched to 
> WinProc(s).
> 
> The modification adds possibility to call these accelerators 
> before TranslateMessage() and DispatchMessage() within
> fl_wait() (approx. line 338 in Fl_win32.cxx) and if 
> successful, such message is not furthet processed:
> 
> 
> static int (*translate_accelerator_)(MSG * msg)  = 0;
> 
> // this platform-specific  declaration  would be  in Fl_win32.H
> void fl_translate_accelerator(int (*accelerator)(MSG * msg)){
>   translate_accelerator_ = accelerator;
> }
> 
> 
> fl_wait(...){
>   ...
>   if(!translate_accelerator_ || !(*translate_accelerator_)(&fl_msg)){
>         TranslateMessage(&fl_msg);
>         DispatchMessage(&fl_msg);
>   }
> }
> 
> Implementation of the translator is completely up to the 
> user, normally this pointer is NULL.
> The function could be even declared without argument as user 
> can always dig it out from fl_msg which is set at that moment.
> 
> Maybe some users are interested to embed stock "windows 
> controls" - so maybe something similar can be added to next 
> fltk version (1.3)?


This is an interesting idea - though I don't think I'd use it right now - but 
it triggered a bit of a déjà vu for me... Did we not have a discussion a while 
back about extending the shortcut / accelerator mechanism to allow the user to 
add their own handlers?

This would be in the same ballpark - though I think the proposed scheme was 
substantially different.

And this is all from memory so I'm probably just making it up!

-- 
Ian


SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to