摘要:
转载文章,尊重原著 阅读全文
摘要:
――JavaScript调用ActiveX控件中的函数
这个交互的关键是在接口类中添加对外的方法。大概步骤如下:
1. 在.NET在新建一个MFC ActiveX工程
2. 在类视图中,可以看到最下面有一个“工程名+Lib”项,图标与上面的类图标不同,展开它,可以看到三项,下面要做的就是在第二项(名为“_D+工程名”)下添加对外函数
3. 展开第二项后可以看到下面已经有了一个AboutBox(void)函数,这就是说些ActiveX控件已经有了一个对外交互的接口。对着接口(名为“_D+工程名”)点右键选“添加->添加方法”,写入函数名和参数,返回类型(内部名称可以和外面名称不一样)。
4. 添加完成后,可以在类视图中的“C+工程名+Ctrl”类下面看到刚刚添加的函数(这里显示的是上面提到的内部名称),双击该函数就可以写自己的代码了。 阅读全文
摘要:
Another Solution to the same problem:
from distutils.core import setup
import py2exe
setup(windows=[{"script":"main.py"}], options={"py2exe":{"includes":["sip"]}})
I found that on the web, unfortunately don't know anymore where, but it also works for me!
Obviously is the second part only a way to get the " --includes sip" parameter directly into the script, but the use of "windows" instead of "console" doesn't open a console window, but immediately a Qt window in my case. 阅读全文
摘要:
遇到这个问题,很没头没脑的,解决办法如下
varName = varName.encode('latin1') 阅读全文