• halconset_window_extents修改窗口的位置和大小


    在HDevelop中

    read_image (Image, 'D:/bb/tu/ma.jpg')
    dev_open_window(0,0,500,400,'black',WindowHandle)
    
    set_window_extents(WindowHandle,100,0,300,200)
    *修改窗口的位置和大小
    *参数1:要修改的窗口的句柄
    *参数2:窗口新坐标的Row-y坐标
    *参数3:窗口新坐标的col-x坐标
    *参数4:窗口新宽度
    *参数5:窗口新高度
    
    
    
    dev_display(Image)

    在QtCreator中

      HObject  ho_Image;
      HTuple  hv_WindowHandle;
    
      ReadImage(&ho_Image, "D:/bb/tu/ma.jpg");
      SetWindowAttr("background_color","black");
      OpenWindow(0,0,500,400,0,"visible","",&hv_WindowHandle);
      HDevWindowStack::Push(hv_WindowHandle);
    
      SetWindowExtents(hv_WindowHandle, 100, 0, 300, 200);
      //修改窗口的位置和大小
      //参数1:要修改的窗口的句柄
      //参数2:窗口新坐标的Row-y坐标
      //参数3:窗口新坐标的col-x坐标
      //参数4:窗口新宽度
      //参数5:窗口新高度
    
      DispObj(ho_Image, hv_WindowHandle);

  • 相关阅读:
    Power of Cryptography
    Radar Installation
    Emag eht htiw Em Pleh
    Help Me with the Game
    89. Gray Code
    87. Scramble String
    86. Partition List
    85. Maximal Rectangle
    84. Largest Rectangle in Histogram
    82. Remove Duplicates from Sorted List II
  • 原文地址:https://www.cnblogs.com/liming19680104/p/15888117.html
Copyright © 2020-2023  润新知