回复:做wincc项目热线帮助的几个层次

whxzx

  • 帖子

    124
  • 精华

    6
  • 被关注

    5

论坛等级:游侠

注册时间:2003-08-02

普通 普通 如何晋级?

发布于 2005-03-02 17:08:38

0楼

是很麻烦。
在项目中去花太大的精力去做Help文件,有一点舍本逐末;但是从技术提高的角度来说,还是有意义的。
我的做法是单击鼠标右键时,触发相应的主题;
响应F1是有点难度,按键捕捉并不难:
#include "apdefap.h"
void OnKeyDown(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName, UINT nChar,
UINT nRepCnt, UINT nFlags)
{
#pragma code("user32.dll");
int GetAsyncKeyState(int vKey);
#pragma code();
int nRet;
printf("Tastaturcode=%d\r\n",nChar);
// Request on F1
if (nChar==112) {
// If F1 operates then check whether Shift - key
nRet = GetAsyncKeyState(VK_SHIFT);
// Bites staid for key pressed
if (nRet & 0x8000) {
printf("SHIFT-F1\r\n");
////////////////////////////////////
// Here further instructions can be edited,
// which are triggered at the corresponding
// keys combination.
}
// If F1 operates then check whether Ctrl - key
nRet = GetAsyncKeyState(VK_CONTROL);
// Bites staid for key pressed
if (nRet & 0x8000) {
printf("CONTROL-F1\r\n");
////////////////////////////////////
// Here further instructions can be edited,
// which are triggered at the corresponding
// keys combination.
}
//Wenn F1 dann Abfrage ob ALTGR-Taste betätigt
if (nFlags & KF_ALTDOWN) {
printf("ALT/CONTROL-F1\r\n");
////////////////////////////////////
// Here further instructions can be edited,
// which are triggered at the corresponding
// keys combination.
}
// Alt-key can not yet be requested, since this is a system - Key
// If F1 operates then check whether ALT - key
nRet = GetAsyncKeyState(VK_MENU);
// Bites staid for key pressed
if (nRet & 0x8000) {
printf("ALT-F1\r\n");
////////////////////////////////////
// Here further instructions can be edited,
// which are triggered at the corresponding
// keys combination.
}
}
}
评论
编辑推荐: 关闭

请填写推广理由:

本版热门话题

SIMATIC WinCC / Panel

共有32574条技术帖

相关推荐

热门标签

相关帖子推荐

guzhang

恭喜,你发布的帖子

评为精华帖!

快扫描右侧二维码晒一晒吧!

再发帖或跟帖交流2条,就能晋升VIP啦!开启更多专属权限!

  • 分享

  • 只看
    楼主

top
您收到0封站内信:
×
×
信息提示
很抱歉!您所访问的页面不存在,或网址发生了变化,请稍后再试。