c脚本调用计算器

我在画面按钮中输入如下#include "apdefap.h"
void OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName)
{
#pragma option(mbcs)
ProgramExecute("CALC.exe");
}

但编译不通过,说没有包含解释代码
还有两行错误undefined identifier ‘programexecute’

programexecute is not a function
请高手指点下

最佳答案

#include "apdefap.h"
void OnLButtonDown(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName, UINT nFlags, int x, int y)
{
 HWND Hwnd;
 BOOL bRet;
 ProgramExecute("CALC.exe"); 
 Hwnd=FindWindow(NULL,"Calculator");//中文操作系统为"计算器"
 if (Hwnd)
 {
 //printf("\r\n%d",Hwnd);
 bRet=SetWindowPos(Hwnd,HWND_TOPMOST,300,300,200,200,SWP_NOSIZE);
 if (!bRet) printf("\r\nSetWindowPos Error!");
}
}

提问者对于答案的评价:
谢谢

原创文章,作者:more0621,如若转载,请注明出处:https://www.zhaoplc.com/plc268091.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2019年6月11日
下一篇 2019年6月11日

相关推荐