请教问题
我自己用vc6.0做了个控件,一直在用,没有问题。最近想通过输入不同的初始化参数改变控件的显示界面。
我参照网上的一些做法:
1.控件里面增加一个属性guitype
代码中增加
[id(33), helpstring("property guitype")] SHORT guitype;
DISP_PROPERTY_NOTIFY_ID(ChcwocxCtrl, "guitype", dispidguitype, m_guitype, OnguitypeChanged, VT_I2)
void ChcwocxCtrl::OnguitypeChanged(void)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
SetModifiedFlag();
}
2.在web页面中把
<OBJECT id=videshow1 style="LEFT: 0px; WIDTH: 462px; TOP: 0px; HEIGHT: 378px" codeBase=/videoshow.cab#version=1,5,6,29
height=378 width=462 classid="clsid:65D0E482-0740-40ED-8EEC-20057650C918">
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="12224">
<PARAM NAME="_ExtentY" VALUE="10001">
<PARAM NAME="_StockProps" VALUE="0"></OBJECT>
增加一行初始参数,改成
<OBJECT id=videshow1 style="LEFT: 0px; WIDTH: 462px; TOP: 0px; HEIGHT: 378px" codeBase=/videoshow.cab#version=1,5,6,29
height=378 width=462 classid="clsid:65D0E482-0740-40ED-8EEC-20057650C918">
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="12224">
<PARAM NAME="_ExtentY" VALUE="10001">
<PARAM NAME="_StockProps" VALUE="0">
<PARAM NAME="guitype" VALUE="3"></OBJECT>
但是控件里面m_guitype仍然是一个未定义值,也就是说<PARAM NAME="guitype" VALUE="3">没有起作用。
不知道还要做哪些修改,查了大量资料都没有头绪。
非常感谢。
我参照网上的一些做法:
1.控件里面增加一个属性guitype
代码中增加
[id(33), helpstring("property guitype")] SHORT guitype;
DISP_PROPERTY_NOTIFY_ID(ChcwocxCtrl, "guitype", dispidguitype, m_guitype, OnguitypeChanged, VT_I2)
void ChcwocxCtrl::OnguitypeChanged(void)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
SetModifiedFlag();
}
2.在web页面中把
<OBJECT id=videshow1 style="LEFT: 0px; WIDTH: 462px; TOP: 0px; HEIGHT: 378px" codeBase=/videoshow.cab#version=1,5,6,29
height=378 width=462 classid="clsid:65D0E482-0740-40ED-8EEC-20057650C918">
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="12224">
<PARAM NAME="_ExtentY" VALUE="10001">
<PARAM NAME="_StockProps" VALUE="0"></OBJECT>
增加一行初始参数,改成
<OBJECT id=videshow1 style="LEFT: 0px; WIDTH: 462px; TOP: 0px; HEIGHT: 378px" codeBase=/videoshow.cab#version=1,5,6,29
height=378 width=462 classid="clsid:65D0E482-0740-40ED-8EEC-20057650C918">
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="12224">
<PARAM NAME="_ExtentY" VALUE="10001">
<PARAM NAME="_StockProps" VALUE="0">
<PARAM NAME="guitype" VALUE="3"></OBJECT>
但是控件里面m_guitype仍然是一个未定义值,也就是说<PARAM NAME="guitype" VALUE="3">没有起作用。
不知道还要做哪些修改,查了大量资料都没有头绪。
非常感谢。

浙公网安备 33010602011771号