zoukankan      html  css  js  c++  java
  • 用pb打开i图片

    用pb的setPicture居然报

    JPEG Processing Error
    ---------------------------
    Image too wide for this implementation

    的错误,于是想是否有其他的办法,百度了一下有如下两种容易的方法

    (1)用Windows 图片和传真查看器打开图片
    run("rundll32.exe shimgvw.dll,ImageView_Fullscreen " + "c:a.jpg")

    (2)用默认图片查看程序打开图片

      C/C++ code

      //声明API Function Long ShellExecute(Long hwindow, String lpOperation, String lpFile, String lpParameters, String lpDirectory, Long nShowCmd) Library 'shell32.dll' Alias for 'ShellExecuteA' //调用 ShellExecute(handle(this), '', "c:a.jpg", '','', 1) 

      C/C++ code

      string ls_path, ls_file int li_rc ls_path = '\192.168.1.200项目图片' li_rc = GetFileSaveName ( "Select File", & ls_path, ls_file, "jpg", & "All Files (*.*),*.*" , "", & 32770) IF li_rc = 1 Then ls_path //返回的文件完整路径名(含文件名) ls_file //返回的文件名(不含路径) End If

    /*PB中的声明与调用*/
    Function long ShellExecuteA (long hwnd, string lpOperation ,String lpFile, String lpParameters, String lpDirectory, Long nShowCmd)  Library "shell32.dll"
    
    /*也可以*/
    FUNCTION Long ShellExecute ( Long hwnd, String lpOperation, String lpFile, String lpParameters, String lpDirectory, Long nShowCmd ) LIBRARY "shell32.dll" ALIAS FOR "ShellExecuteA"
    
    /*调用*/
    
    shellexecutea(handle(this), "open", ls_picture_path, "","", 1)
  • 相关阅读:
    strcpy ,strncpy ,strlcpy(转载)
    窗口刷新时的问题(转)
    Linux下的实时流媒体编程(RTP,RTCP,RTSP)
    YUV色彩空间(转自百度百科)
    VC++2005快速构建安全的应用程序
    Linux多线程编程
    C++ PASCAL关键字(转)
    SkinMagic 进行皮肤设置
    .h和.cpp文件的区别
    strcpy_s与strcpy安全性的比较(转载)
  • 原文地址:https://www.cnblogs.com/szxiaofei14/p/5010367.html
Copyright © 2011-2022 走看看