Hi,
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)?
R.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev