Yeah I see your point but unfortunatly there seems little alternative.  Kind of a stupid design on MS's part.  To me it seems like it would just be more intelligent to allow every key to go to the control and let the control descide what to do with it.  Then whatever it doesn't handle let the host of the control descide what to do with it.

Matt Salmon <[EMAIL PROTECTED]> wrote:
Hi Stewart

If it works anything like the C# or VB implementations, you may also
want to cater for the Shift modifier too. I'm really surprised there
isn't a key preview or key event where you can't catch this - it must
be being caught by the ATL container and not raised again or
something!

One other word of warning too - that implementation also takes away
the ability to assign command keys for the arrow keys, al! though I
doubt that is much of a loss as I can't see why you wouldn't want to
use those keys to navigate anyway. Just thought it might be something
worth considering.

Cheers
Matt


On 16/03/06, Stewart Obert wrote:
> Just for future refrence, don't know if anyone will find this useful but I
> found this on MSDN and modified it slightly to send the message to the
> Scintilla window.
>
> BOOL PreTranslateAccelerator(LPMSG pMsg, HRESULT& hRet)
> {
> if(pMsg->message == WM_KEYDOWN &&
> (pMsg->wParam == VK_LEFT ||
> pMsg->wParam == VK_RIGHT ||
> pMsg->wParam == VK_UP ||
> pMsg->wParam == VK_DOWN))
> {
> hRet = S_OK;
> SendMessage(SCI,pMsg->message, pMsg->wParam, pMsg->lParam);
> return TRUE;
> }
> ! //TODO: Add your additional accelerator handling code here
> return FALSE;
> }
>
> SCI is the hWnd of the scintilla window.
>
> Stewart Obert wrote:
> Oddly enough though I subclassed the form, scintilla and the container
> control holding scintilla and none of them were registering the keystrokes.
> The container holding scintilla registered them until focus was handed to
> scintilla but once scintilla had focus none of them recieved it.
>
> I suppose I could go the route I did with the VB version and just make the
> control invisible at run time and actually place scintilla on the parent
> hwnd of the control. I'm trying to not have to do that though.
>
> Thanks for ! any further idea's.
>
> Stewart
>
> Matt Salmon wrote:
> Hi Stewart
>
> This has come up a few times lat! ely - search through the archives for
> the problems faced and how they were solved. Basically the container
> or one of the containers in the tree (up to the form lev! el) are
> swallowing those keystrokes. You need to get your container to
> forward key events onto Scintilla.
>
> Cheers
> Matt
>
>
> On 15/03/06, Stewart Obert wrote:
> > I've kind of begun working on an ActiveX wrapper for scintilla using ATL.
> > Now I was able to create the window, that was no real problem, and size it
> > to fill the control. However I noticed that like the VB control where the
> > Scintilla control was embeded in the control and not directly on the form
> > keys! such as left, right up, down, don't work.
> >
> > Any idea what would be a good workaround for this? Thanks
> >
> > Stewart
> >
> >
> > ________________________________
> > Yahoo! Travel
> > Find great deals to the top 10 hottest destinations!
> >
> >
> > _______________________________________________
> > Scintilla-interest mailing list
> > [email protected]
> >
> http://mailman.lyra.org/mailman/listinfo/scintilla-interest
> >
> >
> >
>
> _______________________________________________
> Scintilla-interest mailing list
> [email protected]
> http://mailman.lyra.org/mailman/listinfo/scintilla-interest
>
> ________________________________
> Yahoo! Mail
> Bring photos to life! New PhotoMail makes sharing a breeze.
> _______________________________________________
> Scintilla-interest mailing list
> [email protected]
> http://mailman.lyra.org/mailman/listinfo/scintilla-interest
>
>
>! ;
> ________________________________
> Yahoo! Mail
> Use Photomail to share photos without annoying attachments.
>
>
> _______________________________________________
> Scintilla-interest mailing list
> [email protected]
> http://mailman.lyra.org/mailman/listinfo/scintilla-interest
>
>
>

_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest


Yahoo! Mail
Use Photomail to share photos without annoying attachments.
_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to