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

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


ActiveX control based on a dialog template ?

Noel DANJOU -- NoelD@msn.com
Thursday, February 20, 1997

Environment : VC++ 4.2b, Windows 95

Hello,

I am trying to convert a standalone application which main window is a dialog 
box to an ActiveX control. But I am wondering if ActiveX or OLE controls can 
be based on a dialog template too. If the answer is yes could you give me some 
ideas or sample codes on how to do that...

Thanks.

Noel
=====================================================
Noel DANJOU 						12/21/1968
Village Paillette						Software Engineer @ PalmCom
50320 Saint Jean des Champs		Email: noeld@msn.com
France								UIN : 187712

NetMeeting 2.0 B2:   callto:uls.microsoft.com/noeld@msn.com

Home Pages:
http://ourworld.compuserve.com/homepages/noeld/       (personal)
http://ourworld.compuserve.com/homepages/gil_mic/    (company)
=====================================================





GD-IT347 -- Graham.Cunningham@SWISSTELECOM.com
Thursday, February 20, 1997

Hi I have just done this, All that i did was override the controls
OnCreate and create a modeless dialog there (not forgetting to remove
the generated OnDraw code)
eg
int CMyCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
    if (COleControl::OnCreate(lpCreateStruct) =3D=3D -1)
	return -1;

    m_pDlgHdr =3D new CDlgHdr();
    m_pDlg->Create(IDD_AGRE_HEADER,this);
    m_pDlg->MoveWindow(0,0,cx,100);
}

I then overrode OnSize() and did a movewindow to the size of the control
as well. There are quite a few other things that are required, mainly
producing a metafile so that the control can be see when its inactive,
but this should get you going


>----------
>Von: 	Cunningham Graham, IK 23[SMTP:Cunningham@tgd.swissptt.ch]
>Gesendet: 	Donnerstag, 20. Februar 1997 14:38
>An: 	Cunningham Graham, GD-IT347
>Betreff: 	FW: ActiveX control based on a dialog template ?
>
>
>>
>>----------
>>From: 	No=EBl DANJOU
>>Sent: 	Thursday, February 20, 1997 11:50:32 AM
>>To: 	mfc-l
>>Subject: 	ActiveX control based on a dialog template ?
>>Auto forwarded by a Rule
>>
>Environment : VC++ 4.2b, Windows 95
>
>Hello,
>
>I am trying to convert a standalone application which main window is a
>dialog=20
>box to an ActiveX control. But I am wondering if ActiveX or OLE =
controls
>can=20
>be based on a dialog template too. If the answer is yes could you give
>me some=20
>ideas or sample codes on how to do that...
>
>Thanks.
>
>Noel
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
>Noel DANJOU 						12/21/1968
>Village Paillette						Software Engineer @ PalmCom
>50320 Saint Jean des Champs		Email: noeld@msn.com
>France								UIN : 187712
>
>NetMeeting 2.0 B2:   callto:uls.microsoft.com/noeld@msn.com
>
>Home Pages:
>http://ourworld.compuserve.com/homepages/noeld/       (personal)
>http://ourworld.compuserve.com/homepages/gil_mic/    (company)
>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
>
>



Mike Blaszczak -- mikeblas@nwlink.com
Thursday, February 20, 1997

[Mini-digest: 2 responses]

At 10:50 2/20/97 UT, No=EBl DANJOU wrote:
>Environment : VC++ 4.2b, Windows 95

>I am trying to convert a standalone application which main window is a
dialog=20
>box to an ActiveX control. But I am wondering if ActiveX or OLE controls=
 can=20
>be based on a dialog template too. If the answer is yes could you give me
some=20
>ideas or sample codes on how to do that...

Did you see the sample at=
 http://www.microsoft.com/kb/articles/q155/9/73.htm?
Does it not answer some of your questions?


.B ekiM
http://www.nwlink.com/~mikeblas/
These words are my own. I do not speak on behalf of Microsoft.
           This performance was not lip-synched.

-----From: "Claus Michelsen" 

No=EBl,

Microsofts knowledge base has an excellent article and sample (Q155973)
which also handles things such as keyboard handling so that you tabs an=
d
access keys will work.


Best regards,
Claus Michelsen



----------
> From: No=EBl DANJOU 
> To: mfc-l 
> Subject: ActiveX control based on a dialog template ?
> Date: Thursday, 20 February, 1997 11:50
>=20
> Environment : VC++ 4.2b, Windows 95
>=20
> Hello,
>=20
> I am trying to convert a standalone application which main window is =
a
dialog=20
> box to an ActiveX control. But I am wondering if ActiveX or OLE contr=
ols
can=20
> be based on a dialog template too. If the answer is yes could you giv=
e me
some=20
> ideas or sample codes on how to do that...
>=20
> Thanks.
>=20
> Noel
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
> Noel DANJOU 						12/21/1968
> Village Paillette						Software Engineer @ PalmCom
> 50320 Saint Jean des Champs		Email: noeld@msn.com
> France								UIN : 187712
>=20
> NetMeeting 2.0 B2:   callto:uls.microsoft.com/noeld@msn.com
>=20
> Home Pages:
> http://ourworld.compuserve.com/homepages/noeld/       (personal)
> http://ourworld.compuserve.com/homepages/gil_mic/    (company)
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
>=20
>=20




Become an MFC-L member | Вернуться в корень Архива |