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

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


ActiveMovie OCX window styles (WS_BORDER) in an MFC OCX

Talin Bingham -- tbingham@wasatchnet.com
Monday, February 24, 1997

Environment: VC++ 4.2b, Win 95, NT 4.0

I have created an MFC based ActiveX control that contains the
Microsoft ActiveX ActiveMovie 1.0 OCX.  I inserted the ActiveMovie
OCX into my form and then assigned a member variable to the 
ActiveMovie control.  I have generated the wrapper 
class for the ActiveMovie control using classwizard.  Then I added 

	//{{AFX_MSG(CActiveMovie)
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	//{{AFX_VIRTUAL(CActiveMovie)
	//}}AFX_VIRTUAL

to the header file and:

BEGIN_MESSAGE_MAP(CActiveMovie, CWnd)
	//{{AFX_MSG_MAP(CActiveMovie)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

to the cpp file.

Everything in my OCX is working fine:  I can specify my video 
file and it plays nicely.  I can control all of the properties that 
I am interested in except the border.

All I want to do now is remove the border from the ActiveMovie 
OCX control.  Everything I have read says that this is possible in 
Visual Basic, but only in edit mode.  I can't seem to modify the border
property in edit or run-time mode under VC++.   I've even tried using
ClassWizard to add the PreCreateWindow function to my wrapper class
for the ActiveMovie control.  It never gets invoked...

How can I get rid of the ActiveMovie border???

Any help would be greatly appreciated.

Best regards,

Talin Bingham
Wasatch Interactive Learning
tbingham@wasatchnet.com or






Kevin Johnson -- kevinj@microcrafts.com
Tuesday, February 25, 1997

[Mini-digest: 2 responses]

I haven't used the ActiveMovie OCX, but I have removed the border from
the WebBrowser control. I first ran the application and used Spy to
determine which window was showing the border I didn't like. Then I
determined how to get hold of that window and finally removed the
WS_EX_CLIENTEDGE from that windows extended styles.

Perhaps you can use a similar method for the ActiveMovie OCX?

--Kevin

>----------
>From: 	Talin Bingham[SMTP:tbingham@wasatchnet.com]
>Sent: 	Monday, February 24, 1997 15:27
>To: 	mfc-l@netcom.com
>Subject: 	ActiveMovie OCX window styles (WS_BORDER)  in an MFC OCX
>
>Environment: VC++ 4.2b, Win 95, NT 4.0
>
>I have created an MFC based ActiveX control that contains the
>Microsoft ActiveX ActiveMovie 1.0 OCX.  I inserted the ActiveMovie
>OCX into my form and then assigned a member variable to the 
>ActiveMovie control.  I have generated the wrapper 
>class for the ActiveMovie control using classwizard.  Then I added 
>
>	//{{AFX_MSG(CActiveMovie)
>	//}}AFX_MSG
>	DECLARE_MESSAGE_MAP()
>
>	//{{AFX_VIRTUAL(CActiveMovie)
>	//}}AFX_VIRTUAL
>
>to the header file and:
>
>BEGIN_MESSAGE_MAP(CActiveMovie, CWnd)
>	//{{AFX_MSG_MAP(CActiveMovie)
>	//}}AFX_MSG_MAP
>END_MESSAGE_MAP()
>
>to the cpp file.
>
>Everything in my OCX is working fine:  I can specify my video 
>file and it plays nicely.  I can control all of the properties that 
>I am interested in except the border.
>
>All I want to do now is remove the border from the ActiveMovie 
>OCX control.  Everything I have read says that this is possible in 
>Visual Basic, but only in edit mode.  I can't seem to modify the border
>property in edit or run-time mode under VC++.   I've even tried using
>ClassWizard to add the PreCreateWindow function to my wrapper class
>for the ActiveMovie control.  It never gets invoked...
>
>How can I get rid of the ActiveMovie border???
>
>Any help would be greatly appreciated.
>
>Best regards,
>
>Talin Bingham
>Wasatch Interactive Learning
>tbingham@wasatchnet.com or
>
>
>
>
-----From: splinta@cix.compulink.co.uk (Philip Beck)

In-Reply-To: <199702242331.QAA13164@mailhub.aros.net>
In PreCreateWindow() try removing the border style after you call the 
base class...

Phil.




Talin Bingham -- tbingham@wasatchnet.com
Thursday, March 06, 1997

I've finally got the answer to my question.  After trying everything I
could think of and a couple of suggestions from the readers here, I called
Microsoft support to find out how to remove the border style from 
the ActiveMovie control embedded in my VC++ 4.2b MFC app.

And the answer is...

You can't!!!  Microsoft has verified that this is a bug in the ActiveMovie
1.0
control.  Microsoft support has no estimated fix date.  Like it or not, you
get
a border when embedding (or dynamically creating) the ActievMovie 1.0 
control in your VC++ app.

Best regards,

Talin Bingham
Wasatch Interactive Learning
tbingham@wasatchnet.com 


----------
> From: Talin Bingham 
> To: mfc-l@netcom.com
> Subject: ActiveMovie OCX window styles (WS_BORDER)  in an MFC OCX
> Date: Monday, February 24, 1997 4:27 PM
> 
> Environment: VC++ 4.2b, Win 95, NT 4.0
> 
> I have created an MFC based ActiveX control that contains the
> Microsoft ActiveX ActiveMovie 1.0 OCX.  I inserted the ActiveMovie
> OCX into my form and then assigned a member variable to the 
> ActiveMovie control.  I have generated the wrapper 
> class for the ActiveMovie control using classwizard.  Then I added 
> 
> 	//{{AFX_MSG(CActiveMovie)
> 	//}}AFX_MSG
> 	DECLARE_MESSAGE_MAP()
> 
> 	//{{AFX_VIRTUAL(CActiveMovie)
> 	//}}AFX_VIRTUAL
> 
> to the header file and:
> 
> BEGIN_MESSAGE_MAP(CActiveMovie, CWnd)
> 	//{{AFX_MSG_MAP(CActiveMovie)
> 	//}}AFX_MSG_MAP
> END_MESSAGE_MAP()
> 
> to the cpp file.
> 
> Everything in my OCX is working fine:  I can specify my video 
> file and it plays nicely.  I can control all of the properties that 
> I am interested in except the border.
> 
> All I want to do now is remove the border from the ActiveMovie 
> OCX control.  Everything I have read says that this is possible in 
> Visual Basic, but only in edit mode.  I can't seem to modify the border
> property in edit or run-time mode under VC++.   I've even tried using
> ClassWizard to add the PreCreateWindow function to my wrapper class
> for the ActiveMovie control.  It never gets invoked...
> 
> How can I get rid of the ActiveMovie border???
> 
> Any help would be greatly appreciated.
> 
> Best regards,
> 
> Talin Bingham
> Wasatch Interactive Learning
> tbingham@wasatchnet.com or
> 
> 




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