How to use "imgplot" to display image on a Control in VC++?

I want to show a image on a static picture control on dialog by vc++, the function I used was a NI-IMAQ "imgPlot" to draw image on the control, beacuse it is easier and faster with capture card.
imgPlot ((GUIHNDL)hFrameWnd, pImg, 0, 0, src->width, src->height,0, 0, IMGPLOT_MONO_8);
I get the control's HWND by GetSafeHWnd() to set the first paprameter and set the second parameter with a buffer pointer, since I just want to test, so buffer data is not obtained by capture card, but from a file. No image display on the control, no errors display either, why

I want to show a image on a static picture control on dialog by vc++, the function I used was a NI-IMAQ "imgPlot" to draw image on the control, beacuse it is easier and faster with capture card.
imgPlot ((GUIHNDL)hFrameWnd, pImg, 0, 0, src->width, src->height,0, 0, IMGPLOT_MONO_8);
I get the control's HWND by GetSafeHWnd() to set the first paprameter and set the second parameter with a buffer pointer, since I just want to test, so buffer data is not obtained by capture card, but from a file. No image display on the control, no errors display either, why

Similar Messages

  • How can I use IMGPLOT to display a 12-bit image in false color?

    I want to use IMGPLOT to display a 12-bit image in false color employing VC++ 7.0 . Actually it is stilla grey level. The only difference is to customize a new palette. I guess Ni should have a API for me change the palette. I donot want to convert my image into color image since its processing speed is slow.
    Any people has the silimar experience to do this?
    Thanks a lot in advance!
    zmt

    Hi Bruce Ammons,
    Thank you very much for your answer. I still need your clear instruction.
    I can directly display 12 bit image in 256 grey level just using IMGPLOT function without any mapping operation. That is because IMGPLOT directly supports to draw a 12 bit image through IMGPLOT_MONO_12 flag.
    IMGPLOT prototype is imgPlot(GUIHNDL window, void* buffer, uInt32 leftBufOffset, uInt32 topBufOffset, uInt32 xsize, uInt32 ysize, uInt32 xpos, uInt32 ypos, uInt32 flags=IMGPLOT_MONO_12 ).
    Hence I just need a C++ function to change the palette. I believe that IMGPLOT automatically does the 12bit to 8 bit mapping for me. What I need to do is just to change the palette. The question is which NI'S API can change the palette and work well with IMGPLOT. Or I have
    to use IMGPLOTDC and change the palette in the selected DC by myself.
    Your great help is much appreicated!
    zmt

  • How to use "imgPlot" to draw on a control of VC++??

    Detail of yesterday question----
    I want to show a image on a static picture control on dialog by vc++, the function I used was a NI-IMAQ "imgPlot" to draw image on the control, beacuse it is easier and faster with capture card.
    imgPlot ((GUIHNDL)hFrameWnd, pImg, 0, 0, src->width, src->height,0, 0, IMGPLOT_MONO_8);
    I get the control's HWND by GetSafeHWnd() to set the first paprameter and set the second parameter with a buffer pointer, since I just want to test, so buffer data is not obtained by capture card, but from a file. No image display on the control, no errors display either, why?

    src= iplCreateImageHeader( 1, 0, IPL_DEPTH_8U, "GRAY",
    "GRAY", IPL_DATA_ORDER_PIXEL, IPL_ORIGIN_TL,
    IPL_ALIGN_DWORD, width, height, NULL, NULL, NULL,
    NULL);
    iplAllocateImage( src, 0, 0 );
    static HWND hImgWnd;
    CWnd* pImgWnd = NULL;
    pImgWnd = GetDlgItem(IDC_STATIC_IMG);
    hImgWnd = pImgWnd->GetSafeHwnd();
    char *pImg = src->imageData;
    imgPlot ((GUIHNDL)hImgWnd, pImg, 0, 0, src->width, src->height,0, 0, IMGPLOT_MONO_8);
    That sample program works well, but it is a windows program, not a MFC VC++ program. In my program I use MFC as above, but it can not work. I debug my program, I think datas are in the buffer. I think even there are no datas in buffer, there should be some displays on the static control, but nothing displayed, just every contro
    l on the dialog including button,etc, is lost for a while then re-appear again.
    Looking forward to your reply!!!!

  • How to use the second display for installation OS in my vertical lines iMac

    My 17" iMac display is full of vertical lines, it is unuseable. Does anyone know how to use the second display for Mac OS X or disable the first display for installation Mac OS x ?

    Go to: *System Preferences > Displays* and select the Arrangement tab, then relocate your Menu bar by dragging it to the other display.
    Unfortunately there is no Hardware or Software switch to turn off the iMac's Internal Display.

  • How to use radioButton(s) and image controls on windows phone 8.1

    how to use radioButton(s) and image controls on windows phone 8.1

    Hi aspirantme,
    >>how to use radioButton(s) and image controls on windows phone 8.1
    Which version of your app is? Runtime or Silverlight?
    For Runtime version, please see the following articles:
    #RadioButton class
    https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.radiobutton(v=win.10).aspx
    #How to add radio buttons (XAML)
    https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868200.aspx
    #Image class
    https://msdn.microsoft.com/library/windows/apps/br242752.aspx
    For Silverlight version, please refer to the following documents and guidelines:
    #RadioButton Class
    https://msdn.microsoft.com/en-us/library/windows/apps/system.windows.controls.radiobutton(v=vs.105).aspx
    #RadioButton control design guidelines for Windows Phone
    https://msdn.microsoft.com/en-us/library/windows/apps/hh202881(v=vs.105).aspx
    #Image Class
    https://msdn.microsoft.com/en-us/library/windows/apps/system.windows.controls.image(v=vs.105).aspx
    #Quickstart: Images for Windows Phone
    https://msdn.microsoft.com/en-us/library/windows/apps/jj206957(v=vs.105).aspx
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to use dual monitor display in windows 7 using MSTSC command.......??????

    how to use dual monitor display in windows 7 using MSTSC command ....?????

    Hi Anurag,
    The main issue is how to use the dual monitor in the Remote Desktop Session in Windows 7 ,right ?
    please refer to the following links:
    Using Multiple Monitors in Remote Desktop Session
    http://blogs.msdn.com/b/rds/archive/2009/07/01/using-multiple-monitors-in-remote-desktop-session.aspx
    Best regards

  • How to use Buffering to make image better

    Rigth now I have a DFS maze program, that basically is like a grid maze with three buttons. Randomize (which, duh, randomizes the maze), Solve, and Statistics. When I click on the statistics button, another "wing" opens up on the left showing a text area. But when the text area is being built, what is actually going on in the background processing, is that thousands of maze iterations are running, and then the statistics is printing out. Of course when these iterations are running the maze screen goes blank, and there is one long blink. I would like to make it so that the last maze image stays, until all the statistics in the background is done, and then just the statistics is shown, and not the final maze iteration. So basically the maze image on the right will just be the maze image right before the statistics started running.

    Hi aspirantme,
    >>how to use radioButton(s) and image controls on windows phone 8.1
    Which version of your app is? Runtime or Silverlight?
    For Runtime version, please see the following articles:
    #RadioButton class
    https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.radiobutton(v=win.10).aspx
    #How to add radio buttons (XAML)
    https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868200.aspx
    #Image class
    https://msdn.microsoft.com/library/windows/apps/br242752.aspx
    For Silverlight version, please refer to the following documents and guidelines:
    #RadioButton Class
    https://msdn.microsoft.com/en-us/library/windows/apps/system.windows.controls.radiobutton(v=vs.105).aspx
    #RadioButton control design guidelines for Windows Phone
    https://msdn.microsoft.com/en-us/library/windows/apps/hh202881(v=vs.105).aspx
    #Image Class
    https://msdn.microsoft.com/en-us/library/windows/apps/system.windows.controls.image(v=vs.105).aspx
    #Quickstart: Images for Windows Phone
    https://msdn.microsoft.com/en-us/library/windows/apps/jj206957(v=vs.105).aspx
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to use imgPlot in a MFC SDI program to show image in main window

    I am trying to display acquired images in the main window of my Single Document MFC application as opposed to individual display windows. I use imgPlot to achieve this. The problem seems to be the HWND that I pass to the call. I am not sure of the proper place or technique to capture this handle.

    Hello,
    Have you tried looking in the IMAQ Function Reference Help? You can locate this document by navigating to Start >> Programs >> National Instruments >> Vision >> Documentation >> NI-IMAQ Function Reference. This help file contains descriptive information for each parameter of the function.
    I would also suggest taking a look at the IMAQ examples that shipped with NI-IMAQ. You can find the C examples in the following directory:
    C:\Program Files\National Instruments\NI-IMAQ\Sample\MSVC
    I would suggest starting with the HL Snap example. That is a very simple example that snaps a single image and displays it.
    Take a look at that documentation and at those examples and let me know if you have any additional questions.
    Regards,
    Scott R.
    Applications Engineer
    National Instruments

  • Using flash to display images from sql server or file system

    hello,
    what methods and parameters of the urlloader class we have to use to display images in a flash player if possible..
    also movie should update everytime a new image is added to a database or file
    the images can either be in a file system or in a sql database (if possible)
    does flash comes with an object of this type or we have to create it.
    regards,

    i responded to your duplicate message 4 days ago:
    is it possible to insert and retrieve images from sql server using actionscript.
    you'll need server-side script to query your database and you can use the flash urlloader class to call your script.
    also  is it possible to create a flash scrolling gallery based on images  stored in a database and everytime an image is added it is displayed in  the gallery.
    load the data using the urlloader class and  then load the images.  periodically query the database for new images if  there's no direct way for flash to know a new image was added.

  • JDeveloper 11g Using jsp to display images

    I am converting a 10.1.3.3 application to 11.1.1.3
    It has 2 web modules. One is an ADF administrator module and the other is a public web that displays information including images stored as blobs.
    This public module has a simple technology scope, only html, java, jsp and servlets. It is a hand me down from a few technologies ago and ran well on 10.1.3.3
    To display images it uses a jsp acting as a servlet which is referenced inside other jsps. Since moving to 11g the images no longer display. If I use a java class servlet it works
    however I have to use the full url, e.g. http://mydomain:myport/web/Sevlet?.... which means I have to update the details for each deployment.
    I can use <h:graphicImage but this means I have to include JSF and use expression language to fill in the servlet parameters.
    I don't know what has changed to cause it to fail. Weblogic?
    The Libraries and Classpath include
    JSP Runtime
    Servlet Runtime
    JSTL 1.2
    The servlet jsp is as follows remembering it works in 10.1.3.3
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="javax.naming.Context" %>
    <%@ page import="java.io.*" %>
    <%@ page import="userinterface.util.ByteArray" %>
    <%@ page import="userinterface.online.ImageUIHelper" %>
    <%@ page import="userinterface.online.ImageUIHelperValue" %>
    <%
         String dataObjectId = "";
         String regionId = "";
         boolean getObjectImage=false;
         boolean getRegionImage=false;
         // determine which type of image to retrieve
         if (request.getParameter("dataObjectId") != null)
              dataObjectId = request.getParameter("dataObjectId").toString();
              getObjectImage=true;
         } else if (request.getParameter("regionId") != null)
              regionId = request.getParameter("regionId").toString();
              getRegionImage=true;
         if (getObjectImage==true || getRegionImage == true)
              try
                   ImageUIHelper imageHelper = new ImageUIHelper();
                   ImageUIHelperValue vo = null;
                   if (getObjectImage)
                        vo = imageHelper.doReadObjectImage(new Integer(dataObjectId));
                   } else if (getRegionImage)
                        vo = imageHelper.doReadRegionImage(new Integer(regionId));
                   if (vo != null && vo.getImage() != null)
                        // determine the mimetype
                        String mimeType="image/png";
                        if (vo.getFilename().toLowerCase().endsWith(".gif"))
                             mimeType = "image/gif";
                        else if (vo.getFilename().toLowerCase().endsWith(".jpg"))
                             mimeType = "image/jpg; charset=windows-1252";
                        else if (vo.getFilename().toLowerCase().endsWith(".png"))
                             mimeType = "image/png";
                        else if (vo.getFilename().toLowerCase().endsWith(".bmp"))
                             mimeType = "image/bmp";
                        response.setContentType(mimeType);
                        response.setHeader("pragma", "no-cache");
                        ServletOutputStream os = response.getOutputStream();
    os.write(vo.getImage().getBytes());
                        os.flush();
                        os.close();
              } catch (Exception ex)
    A simple test harness follows. The actual pages substitute the java values using <%= uri %> as below
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%
    String uri = "http://localhost:7101/publicweb/img/ImageServlet?imageType=dataObject&dataObjectId=822";
    String uri2 = "ImageServlet.jsp?dataObjectId=822";
    String uri3 = "ImageServlet.jsp?dataObjectId=694";
    %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
    <title>testServlet</title>
    </head>
    <body>
    <table cellspacing="2" cellpadding="3" border="1" width="100%">
    <tr>
    <td width="20%">Checking Servlet</td>
    <td width="80%"><img src=<%= uri %>
    id="imge"
    width="400px" alt="Image" />
    </td>
    </tr>
    </table>
    </body>
    </html>

    i responded to your duplicate message 4 days ago:
    is it possible to insert and retrieve images from sql server using actionscript.
    you'll need server-side script to query your database and you can use the flash urlloader class to call your script.
    also  is it possible to create a flash scrolling gallery based on images  stored in a database and everytime an image is added it is displayed in  the gallery.
    load the data using the urlloader class and  then load the images.  periodically query the database for new images if  there's no direct way for flash to know a new image was added.

  • How to use the cinema display while your Macbook is closed

    How do I use the cinema display while my Macbook is closed? Whenever I close the laptop the display shuts off as well. I really don't need them both to be on. That defeats the purpose of the external display. when I am home I want to use the laptop like it is the desktop computer.

    I am using a MB Pro and a 23" cinema display. Have a wired USB keyboard and a USB wireless mouse connected through the keyboard. When the MBP is closed and when I restart it, the wireless mouse is frozen and the keyboard does not respond. I have to reopen the MBP, use the trackpad mouse, restart again and hope it will work closed. There doesn't seem to be a consistent way to make it work.
    Suggestions?
    Thanks.

  • How to use GUI to display AVL tree.-Urgent

    Hi,
    I implemented the insertion of the AVL Tree, it worked fine. but i do not know how to use the GUI to display the tree befor and after the insertion.
    Could you please help me,
    thanks,

    Have you considered using JTree?

  • How to use old archieve logs with a new control file

    Environment:
    ORACLE_BASE="/export/home/oracle"
    ORACLE_HOME="/export/home/oracle/product/8.1.6"
    NLS_LANG=".UTF8"
    2 partitions:
    i) /data1 -- contains important datafiles (OS striping on 3 hard
    disks)
    ii) /export/home -- contains the oracle program, and SYS/SYSTEM
    datafiles
    Problem:
    -/data1 cannot be read/mount (damaged)
    -oracle failed
    Action Performed:
    -reinstalled OS
    -mount /export/home successfully (all oracle system files,
    instance init files exist)
    -/data1 is an empty partition
    -created the oracle user, and its groups
    -chown recusively for the $ORACLE_BASE directory
    -set all the oracle environment variables
    -attempted to start the instance, but failed due to a control
    file was
    missing
    -since control files were set to be mirrored, i copied a control
    file somewhere
    from /export/home/oracle/oradata/<SID>/control1.ctl to
    /data1/oracle/oradata/<SID>/control2.ctl (i.e. have them back to
    their original locations)
    -the instance failed to start as well, since the datafile set in
    the control files couldn't be found
    -this forced me to re-create the control file... b4 i re-create
    a new control file, i backed up the old one
    -once the control file was created, the database can be started,
    but, to oracle, all achieve log information are lost (although
    the achieve log's physical files r still there)
    -i imported the important data from a dump file that was
    exported a week ago b4 the system failure
    -since we r using the new control file, the redo logs switch
    contains no achieve log information that the old control file
    has, so running "recover database" doesn't do anything
    Purpose:
    since the dump file is a week old, i'd like to get the data
    after my last export and b4 the system failure. the database was
    run in arhieve log mode, how can i recover those data with the
    new control file
    Question:
    -how can we create a new control file that can drive the old
    achieve logs?
    -can we convert the achieve log data (.dbf format) into text
    format?
    -can we still use the old control files to start the database?
    -what's a suggested solution if we'd like to re-construct the
    database up to the moment b4 the system failure in another
    server?
    thx

    user3930585 wrote:
    I am in an unenviable position, with an unsupported database.
    We are running Oracle 9i on Windows XP. We are upgrading soon to Oracle 11g on a newer platform, but need to get our development environment working first.
    We lost a system that was running our development database without having a database export. The C drive was placed into a new system as the D drive.
    I have loaded Oracle 9i on the C drive, but I have been unable to determine how to point it to the existing data files on the D drive. My search skills may be the limiting factor here...
    We cannot simply load the drive as C, since the hardware is different.
    What are the steps to point the new database software at the data files on the D drive? Or, how do I copy the old data files into the new Oracle Home and have them recognized properly?
    Are you stating that you don't know how to use COPY command?
    Can you recreate same directory structure on new C drive as exist on old C drive?
    Can you then drag & drop copies of the files?

  • How to use Synchronized method when creating our own controls

    I don't know how to use the synchronized method when creating our own activex like controls to speed up the application.

    [url http://java.sun.com/docs/books/tutorial/essential/threads/multithreaded.html] here you go 

  • Qosmio G35-av600: How to use the internal display as a monitor using composite-in?

    I want to hook up my video game system and use my laptop monitor, but I can not figure out how to change the settings so that my monitor displays the video game? Composite in settings?
    I have a G35-av600 purchased last june. If anyone has any suggestions, let me know

    Hi
    Im not sure if I can help you because I know only something about the Qosmio G10 and G20 and your Qosmio seems to be a US notebook but I will try my best ;)
    On the Qosmio G10 for example you have to change the input settings in the Toshiba picture enhancement utility but I assume you dont have this tool preinstalled.
    But I think the composite in is a right jack to built the connection with the game station.
    I think in the Advanced graphic card settings you should be able to find the right options.
    Play a little bit with this settings.

Maybe you are looking for

  • Converting int to string, adding to string then pointing to an url

    So I'm getting a null pointer exception here's a snippet of my code (theres plus signs on both sides of the a in my code): private Image[] tiles; public Map() { for(int a=0; a<9; a++){ ImageIcon aa = new ImageIcon(this.getClass().getResource("mapsqua

  • Why EPUB to Word instead of ADR?

    I have loaded and reloaded ADR for InDesign. When I go to File/Export/EPUB and save to desktop, then click save, I do not go to ADR but back to the INDD document. When I go to desktop, the icon is of a word document, which will not permit me to open

  • Is 16 gb ipad 3 enough?

    Hi there,i am getting ipad 3 on christmas and i am little bit short on money,so i thing i will be able to only get 16 gb.. But,wil it be enough?i dont take pictures every minute and when i have alot of pictures i put them a computer,i will have aroun

  • How to design application to decouble business logic from GUIs on SAP N7.0

    Hi guys, How should I go about designing a program, so that I can decouple the business logic from GUI in ABAP in such a way that I can change the GUI easily or use different GUIs eg. on a scanner etc..

  • Contact phone number tags

    In my contact i have a buisness and in that corporation i have 7 phone numbers but i don't want to have 7 names with only one phone number that will make my contact extremely large. I want to name each phone number and not chose between home work cel