H
Haris
I have went through the following article by
Peter Foot
Microsoft Embedded MVP
In The Hand Ltd
Title : Hosting a Native Windows Control within a Microsoft® .NET
Compact Framework Forms Control
URL :
http://msdn.microsoft.com/library/d...netcomp/html/HostingANativeWindowsControl.asp
Great article since I have been scouring the Internet on how to port
Windows COM / ActiveX control to be used in CF .Net platform and this
is the only usefull article I have found. The article also show how to
do this using OpenNetCF which save time since I don't have to implement
a lot of thing myself.
However there is one critical part that I cannot understand. Regarding
how window message passing is used to implement/wrap property, method
and event.
For instance, let say I have a native window ATL control with the
following interface source code:
__interface IAtlTest : public IDispatch
{
[id(1), helpstring("method GetVersion")] HRESULT
GetVersion([out,retval] BSTR* version);
[propget, id(2), helpstring("property Author")] HRESULT Author([out,
retval] BSTR* pVal);
[propput, id(2), helpstring("property Author")] HRESULT Author([in]
BSTR newVal);
};
In order to access this method and property I need to create 3 method
that send message using Win32Window.SendMessage(handle, message_id,
wParam, lParam)
My question is
1. What should mesage_id parameter be? Can I find it somewhere in my
atl control source code?
2. If I have an ATL control dll file without source code. Is there a
way to know this message_id without any documentation from the dll
developer?
Your feedback are appreciated.
Best regards,
Haris
Peter Foot
Microsoft Embedded MVP
In The Hand Ltd
Title : Hosting a Native Windows Control within a Microsoft® .NET
Compact Framework Forms Control
URL :
http://msdn.microsoft.com/library/d...netcomp/html/HostingANativeWindowsControl.asp
Great article since I have been scouring the Internet on how to port
Windows COM / ActiveX control to be used in CF .Net platform and this
is the only usefull article I have found. The article also show how to
do this using OpenNetCF which save time since I don't have to implement
a lot of thing myself.
However there is one critical part that I cannot understand. Regarding
how window message passing is used to implement/wrap property, method
and event.
For instance, let say I have a native window ATL control with the
following interface source code:
__interface IAtlTest : public IDispatch
{
[id(1), helpstring("method GetVersion")] HRESULT
GetVersion([out,retval] BSTR* version);
[propget, id(2), helpstring("property Author")] HRESULT Author([out,
retval] BSTR* pVal);
[propput, id(2), helpstring("property Author")] HRESULT Author([in]
BSTR newVal);
};
In order to access this method and property I need to create 3 method
that send message using Win32Window.SendMessage(handle, message_id,
wParam, lParam)
My question is
1. What should mesage_id parameter be? Can I find it somewhere in my
atl control source code?
2. If I have an ATL control dll file without source code. Is there a
way to know this message_id without any documentation from the dll
developer?
Your feedback are appreciated.
Best regards,
Haris