15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


How to get pointer to COleControlSite from inside COleContro

Muthu Kumar -- muthu@mbtpost.agw.bt.co.uk
Thursday, March 07, 1996

==> VC++ 4.0/Win95/NT 3.51

	Is it possible to get the pointer to COleControlSite?

	It seems QueryInterface to IID_OLEControSite gives pointer to 
	IOleControlSite only.

	I need that pointer to position the control wihtin the form on demand.
	I mean to position at run time by setting the required properties.

	Am I correct? Is there any easy way?

	Any help would be highly appreciated.


=~=~=~=~=~=~=~=~=~=~==~=~=~=~=~=~=~=~=
K. Muthu Kumar
14 Shreeji Apartments,
Kondi Vitta Village,
Bombay - 59, INDIA.
Ph: (O) +91-22-836 78 42
    (R) +91-22-839 08 21
Internet: muthu@mbtpost.agw.bt.co.uk
=~=~=~=~=~=~=~=~=~=~==~=~=~=~=~=~=~=~=
If your reply to my message fails,
just resend... resend... and resend...
please.
=~=~=~=~=~=~=~=~=~=~==~=~=~=~=~=~=~=~=



Mike Blaszczak -- mikeblas@interserv.com
Friday, March 08, 1996

On Thu, 07 Mar 96, muthu@mbtpost.agw.bt.co.uk (Muthu Kumar) wrote:
>==> VC++ 4.0/Win95/NT 3.51

Thanks.

>	Is it possible to get the pointer to COleControlSite?

It's at CWnd::m_pCtrlSite.  It's not a thing that nice people play with, 
though.

>	It seems QueryInterface to IID_OLEControSite gives pointer to 
>	IOleControlSite only.

Right, and that's different than COleControlsite.

>I need that pointer to position the control wihtin the form
> on demand. I mean to position at run time by setting the
> required properties.

Why not just call MoveWindow() on the CWnd of your control? All of the CWnd 
functions you'd use against a regular window work against an OLE control that 
you're containing.

.B ekiM
TCHAR szDisc[] = _T("These words are my own; I do not speak for Microsoft.");





| Вернуться в корень Архива |