说明
如果画面窗口中的图像比画面窗口大,那么您可以通过按键或热键在画面窗口中前后滚动图像。为此您可以在按钮的鼠标点击事件中编写以下 C 程序。
图像的水平滚动:
long OffsetLeft;
OffsetLeft=GetOffsetLeft(lpscPictureName,"Screen_window_1")+50; //to right (-50 to left)
SetOffsetLeft(lpszPictureName," Screen_window_1",OffsetLeft);
:图像的垂直滚动:
long OffsetTop;
OffsetTop=GetOffsetTop(lpszPictureName," Screen_window_1")+50; //down (-50 down)
SetOffsetTop(lpszPictureName," Screen_window_1",OffsetTop);
原创文章,作者:ximenziask,如若转载,请注明出处:https://www.zhaoplc.com/plc332082.html