Hi Anssi, Do you want my code !! Only Joking !! xxx classing lets your app get the address of the MapInfo Window Handler. You can have your own routine do something before redirecting to the original(MapInfo) routine, or/and after redirection. With a case statement (switch) you can look at mouse messages, keyboard messages etc and then ignore them, stop them being passed to MapInfo ( Escape for you!) or change them. For example I have set up so that control S becomes S. A user needs to press Control S to Snap with mp app as the S on its own is needed for a command like "SNAP". I pick up the function keys so that F8 (Function key 8) turns on Ortho mode. The SetWindowLong Function is what yuo need to use. With good ol' 16 bit code one process could sub class another process. However in 32 bit code a process can only sub class window procedures that it owns. Therefore as mentioned before your calls need to be in a DLL rather than an EXE then MapBasic ( which is "owned" by a running MapInfo ) can call and own your DLL and everything is in process so the sub classing works. I spent a lot of time on this when developing Sympla and understandably could get no support from MI as they couldn't understand why I wanted it this. I think Tim Heck was really curious how I did it but understandably could not get into support on the problems I experienced. I had asked at "Wish list" sessions with Steve Heller for a tool that would allow you to have a DRAWMODE on a tool button that would allow the programmer to specify a start point and let the user choose an end point. They never did this so I wrote my own! These days MapX is easier for this as there is an event on each mouse press but the old code comes in useful for other things sometimes. For example I know where the mouse is at all times. I also can "draw" into the mapper window and have a routine that allows a user to move a layout window frame over a map window and rotate it and scale it to visually see what they want to plot. I have info about Sympla on Website at bydesignwales.demon.co.uk. Regards Bob PS xxx means sub !!! In message <001101bed9c2$396a8e80$[EMAIL PROTECTED]>, Anssi Joutsiniemi <[EMAIL PROTECTED]> writes >Well Bob, > >Tell us a little bit more... > >Anssi >-----Original Message----- >From: Bob Young <[EMAIL PROTECTED]> >To: Sean Richards <[EMAIL PROTECTED]> >Cc: 'MapInfo List' <[EMAIL PROTECTED]> >Date: 29. heinäkuuta 1999 12:38 >Subject: Re: MI Selection control query > > >>Dear Sean >> >>You could sub-class the windows handler for MapInfo in a C DLL. Your >>program would need to look at all keyboard messages and let through D >>for digitiser S for snap ( and probably everthing else) but dont let >>through escape. >> >>I've used this technique so that I can let user type in commands like >>LINE,TRIM,EXTEND etc. and to know where the mouse is at any time to get >>intersection snap. >> >>I think its better to taking away the escape keys!! >> >>Good Luck, >> >>Regards >> >> >>Bob > > >---------------------------------------------------------------------- >To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put >"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED] -- Bob Young -- Bob Young ---------------------------------------------------------------------- To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]