I write Internet MFC ActiveX control to display image, and try to apply in
the web page:
----------------------------------------------------------------------------------------------
<html>
<head><title>Test page</title></head>
<body>
<SCRIPT>
var bTranState = 0;
function fnToggle() {
oDIV2.filters[0].Apply();
if (bTranState) {
bTranState = 0;
oDIV2.style.visibility="hidden"; }
else {
bTranState = 1;
oDIV2.style.visibility="visible"; }
oDIV2.filters[0].Play();
}
</SCRIPT>
<BUTTON onclick="fnToggle()" ID="Button1">Toggle Transition</BUTTON>
<DIV ID="oDIV1" STYLE="position:absolute; top:50px; left:10px; width:240px;
height:160px;
background:gold"> This is DIV #1 </DIV>
<DIV ID="oDIV2" STYLE="visibility:hidden; position:absolute; top:50px;
left:10px;
width:240px; height:160px; background: yellowgreen;
filter:progid:DXImageTransform.Microsoft.Wheel(spokes=4)">
<OBJECT ID="TestControl"
CLASSID="CLSID:5E72XB04-E373-4CD3-BD0E-A802BB5CCBB79" HEIGHT="80px"
WIDTH="100px">
<PARAM NAME="PhotoURL" VALUE="Test.jpg">
</OBJECT>
<!-- <img src="Test.jpg" width="100px" height="80px"> -->
</DIV>
</body>
</html>
------------------------------------------------------------------------
The transition effect seems not working for ActiveX control rectange, but
fine with area out of the control or with image directly displayed within
the DIV section. In the ActiveX control, I just test with following code to
display blue background:
void CFEUploaderCtrl::OnDraw(
CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
{
pdc->FillSolidRect(&rcInvalid, RGB(0,0,215));
if (!IsOptimizedDraw())
{
// The container does not support optimized drawing.
// TODO: if you selected any GDI objects into the device context *pdc,
// restore the previously-selected objects here.
// For more information, please see MFC technical note #nnn,
// "Optimizing an ActiveX Control".
}
}
************************************************************************************************************************
Could anyone tell me how to make the transition effect apply to the ActiveX
control object in the web page?
Thanks a lot.
Charlie