I use MFC Doc/View arch.
i have control (MapX Mobile), this control use entire view part of window
i want do next things:
when i click on the control(view) i want create context menu but control have own function that is hiden inside. how i can process this event myself ?
thanks in advance
PS
i use Microsoft eMbedded Visual Studio 4 sp 30
Last edited by Mabbus; August 16th, 2005 at 12:50 PM.
I have done several different things to get around this depending on what the control allows and what functionality you need from the control. A lot of controls have a right click event you can handle, which is obviously the easiest solution. Otherwise, if the control can be disabled and still display properly, you can disable the control and handle the events in the parent window. Alternatively, if the control has a draw method that allows you to simply pass a DC to it and it renders itself, you can simply hide the control window and forward the events you don't care about to it. I have done this using OnWndMsg() and PostMessage().
I use MFC Doc/View arch.
i have control (MapX Mobile), this control use entire view part of window
I do not know MapX Mobile but are you sure it is an ActiveX contro?
Originally Posted by Mabbus
i want do next things:
when i click on the control(view) i want create context menu but control have own function that is hiden inside. how i can process this event myself ?
If active control has event that fires upon receiving mouse click just handle it. I think you are confusing event with windows message handling.
The whole idea is to find how this control is architectured. It can contain several nested windows. You would have to find window that is receiving mouse messages and subclass it.
There are only 10 types of people in the world: Those who understand binary and those who do not.
I do not know MapX Mobile but are you sure it is an ActiveX control?
I think so.
Originally Posted by JohnCz
I think you are confusing event with windows message handling.
that's true after i reed through this topic i review sample code and found in CMyView this DECLARE_EVENTSINK_MAP() after little more review of code i found in Control file CMapX.h defined number for some events and i am close now to what i am doing thanks.
(Control display map and and there is a lot of tool like pan and zoom which i need use too)
but if control not support some event that i need, is it posible to add them ? - as i read in both posts answer is yes, is it posible to point me on some example or guides on how to do this with full explanations
I add MapX mobile sample project for Microsoft eMbedded Visual Studio wich i use as backbone of my program .
if you not mind please look at it, becouse i am not good know ActivX Technology and can not answer or ask question with all need information .
Besides I think if map control does not handle zooming, panning e.t.c would make me think twice before I use it.
this stuff handle it (didnot write full idea last time )
if i handle Click event, control own function must not process this event right? if yes it' meens i misunderstood something, when i Click on the control two reaction arise one is my OnClick function and second standart control reaction onClick wich is not needed.
i write program for pocket PC.
and Click event is fo example, in the PocketPC when you tap and hold stylus rise some message i didnt found which yet . as result i want to add context menu wich is pup when i tap and hold stylus in the control area
Last edited by Mabbus; August 17th, 2005 at 09:12 AM.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.