刚刚接触python,总找不到合适做界面的工具。今天发现pywin is very cool and suitable, so blog it here to help a programer who is confuse with it.
Python运行后目标界面如下( WindowsXp系统):
一 准备工作:
1) 安装了python3.2 or python2.7,
2) pywin 程序:pywin32-216.1.win32-py3.2.exe
3) 用vs2008 新建一个MFC dialog程序 ,在vs2008 Resource View 中画出目标MFC界面。产生如下代码:
IDD_MFCDIALOG_DIALOG DIALOGEX 0, 0, 467, 334
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Picture Demos"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,327,300,50,14
PUSHBUTTON "Cancel",IDCANCEL,391,299,50,14<