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!!!!

Similar Messages

  • How to use Bind Variables in Essbase data control

    Hi,
    I am trying to use Bind Variables in MDX query while creating the Essbase Data Control. I have used the below query with the Bind Variable.. this query is working in Essbase admin console..but it is throwing error (*Invalid MDX Query)* while creating Essbase Datacontrol in JDeveloper.
    MDX Query : SELECT {[Measures].Msr_2} ON COLUMNS, [Time].Children ON ROWS FROM cube
    where ($name)
    Could any body suggest me on how to use bind variables with Essbase Data control.
    Thanks,
    Swathi

    Hello Swathi, can you please help me how you created Essbase DataControl? Also were you able to figure out this?
    Thanks, Praveen.

  • 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

  • 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

  • How to use a existing drawing?

    how to add in photos/ image that comes in other format such as pdf or jpeg? Can I start edit the image directly?

    Depends a lot on the process being used in the printing.
    If the design is to be printed digitally or with 4CP silk screen, Photoshop is the better tool. Just be aware of the limits of the color space (gamut) available for output.
    If the design is to be printed as a series of silk screen spot colors, then Illustrator is the better tool. Load (File->Place) your image. Then convert to vector (either use Live Trace or do it by hand...depends), then work from there.

  • How to use 2 date field as delta control in generic extractor.

    Hi colleagues:
    I have developed a generic extractor to extract logistic data: Purchase Orders and Invoice. In order to do that, I have defined a view joining EKBE, EKKO, EKPO, EKET tables on R/3. By this approach, the delta mechanism is supposed to be controlled by the EKBE-BUDAT field and also by the EKPO-AEDAT field. Both fields are available on the view used to create the Datasource. However, the Datasource creation allows us to define just one field as delta control.
    I have a few questions regarding to this scenario:
    <b>1 - Is it possible to define 2 fields as delta control field on Generic Datasource?</b>
    <b>2 - How about creating two similar Datasouces, one having AEDAT as delta control, the other having BUDAT as delta control, and then connect those Datasources to an unique Infosource on the bw side?</b>
    Best regards
    Waldemar

    hi,
    1 - as far as I know it is not possible to define 2 fields
    2 - this workaround is used often in cases like yours.
    Just remember about order of extracting: first you extract new documents then changed
    Regards,
    Andrzej

  • How to use Conditional statements in SQL Loader control file

    Hi,
    I am using sql loader to load a flat file to the table. I am using control file for this purpose as show below:
    LOAD
    INTO TABLE store_shrink
    TRUNCATE
    FIELDS TERMINATED BY "     "
    TRAILING NULLCOLS
    SITE_ID char,
    ST_SHRINK char,
    ST_REVENUE char,
    SHRINK_PR char ":ST_SHRINK/:ST_REVENUE"
    My question is this. If in the flat file the value of 'ST_REVENUE' is '0', then I want 'SHRINK_PR' to be '0' as well, and skip the calculation (:st_shrink/:st_revenue).
    How to achieve this with the conditional statement or using any Oracle function?
    Any help or suggestion is greatly appreciated.
    Thanks in advance.

    Hi there,
    I tried the following in my above query and it doesn't work somehow. Anyone has an idea? I have been on internet throughout but to no avail. Please help:
    LOAD
    INTO TABLE store_shrink
    TRUNCATE
    FIELDS TERMINATED BY "     "
    TRAILING NULLCOLS
    SITE_ID char,
    ST_SHRINK char,
    ST_REVENUE char,
    SHRINK_PR char "case (when :st_revenue<>'0.00' then :SHRINK_PR=:ST_SHRINK/:ST_REVENUE else :SHRINK_PR='0.00') end"
    )

  • How to use a radiobutton  group on table control ?

    In the selection screen ,i could define a variable as radiobutton group xxx .It's just so easy ,button when I want to use it in the table control through the the wizard ,but in the 4.6c version there is simply no such as radionbutton component in the panel .how could i do ?

    Hi Jack,
    It's a bit tricky to get the Radio Button in the Table Control. Only a few things needs to be done.
    1. Create a structure with an Checkbox field of TYPE CHAR 1.
    2. Create the Table Control with Wizard and mark the Checkbox field as CHECKBOX in one of the popup.
    3. In the Screen, right-click on the Checkbox field. You will get a list of options and there you should check the radio button option. You will get the selection as Radio button available across all the rows.
    You can check out the demo codes at SE38 by searching DYNPRO.
    Also have a look at this following link.
    http://www.esnips.com/doc/48bd95e8-facc-4932-b923-465ba59bad24/Table-Control
    Hope this will help.
    Thanks,
    Samantak.

  • How to use selection column in a table control

    I have given the name of the selection column to be 'DEF_SEL',now i want to select rows in the table control using the 'selection column attribute' and maniupulate it programmatically so that i would transport the rows selected using selection coulmn to a different table control.How would i do this?

    Hi raja,
      Once you have the table cobtrol built using the extra field in the internal table, all the selected rows will have DEF_SEL = 'X'.
    Now you can loop your internal table and filter the records which were selected.
    in pai modules:
    loop at itab where DEF_SEL = 'X'.
    Move itab information inrto another internal table.
    append itab_new.
    endloop.
    have another table control which shows the data in the itab_new.
    regards,
    Ravi

  • How to use Expression Edit in the LabVIEW control (teststand category)?

    Hi All,
    I am developing the teststand specify module using LabVIEW. I found that is Expression Edit control in the Labview Controls pallete. does anyone have any example?
    I have enabled the expression browser button but I dont know how to link it to the teststand. Pls advise.
    Thanks
    - toko -

    Hey Toko,
    You basically need to refer the button to the sequence context.  For a great description of this and an example, please refer to this previous discussion forum:
    http://forums.ni.com/ni/board/message?board.id=330&message.id=10609&requireLogin=False
    Thanks,
    Andy McRorie
    NI R&D

  • How to use JNI to access Active X control ?

    I need to access EFTPOS devices which provides Active X control inerface. Can I wrap Active X into dll so that I can use java native interface to access it ?
    Thanks.

    Hi Mahesh!
    If nobody has answered by now...maybe you managed alone. Anyway here are some notes that might be useful:
    The first thing to do is write your Java class with the native definitions. Now 'Build Project'.
    Of course you shouldn't forget to have a line with
    System.loadLibrary("your library name");Next you need to make the .h file. I think it's best to do this manually. In Netbeans you can add a line to the ant build script like:
    <target name="-post-jar">
           <javah destdir="c" class="--your class full name--" classpath="${dist.jar}" />
        </target>but I don't know how to do this in Eclipse. Instead you will have to run javah manually like:
    javah -classpath build -verbose  -d "c"   "--your class full name--"Do this from the main project directory.
    Now create a separate C/C++ project with the name you used in the loadLibrary above, and make C files to implement the functionality you need (copy the function headers from the .h file). You should include the .h file and tell Eclipse where to find it. In Eclipse 3.4 there are workspace relative paths - and you can use those to add the include file.
    The C project should be of type 'shared library'. On Windows it will produce a DLL.
    Once you have your C project compiling, go back to the Java project, and edit the project class path. Under the 'source' tab expand your project source, and you will see a line for 'Native library location'. Select that, click the 'edit' button and add the path of the DLL (just the directory).
    Now run or debug the Java program, and when you load the library, watch to make sure there is no exception.
    How to debug: There are ways of debugging both the Java and C at the same time, but it's probably easiest just to put logging statements in the C (printf's) to see what's going on there.

  • How to Use ADF Region With Data Bound Controls in JDeveloper 10g

    I want to use Data Bound ADF Components in Region. Is there any way to acheive this. I want to get Employee Information from a View Object and display it in a region and use this region on different pages.

    I could not understand the dynamic part.
    Actually the problem is that i use Data Controls in Region but when i use the region in other pages it does not display the Data Control.
    Let say i have a data bound outputtext field.
    <af:panelLabelAndMessage label="#{bindings.EmpmasterinfoViewEmployeeid.label}">
    <af:outputText value="#{bindings.EmpmasterinfoViewEmployeeid.inputValue}"/>
    </af:panelLabelAndMessage>
    But this field does not display any thing.
    How i will be able to diplay other data bound controls like table etc.
    Thanks for your reply

  • How to use the *new* "per-user remote control"?

    Per the ARD discription page at:  http://itunes.apple.com/us/app/apple-remote-desktop/id409907375?mt=12
    It says under "Whats New in 3.5.1":
    "Per-user remote control
    You can remotely log in to a Mac with any user account on that computer and control it, without interrupting someone else who might be using the computer under a different login.
    How can I do this?  I can't seem to find the ability.  If I use ARD in it's "normal" mode, I am on the user's console at the same time they are.... I want to be "underneath" the console without affecting them.

    That capability is only available if your client systems are running Mac OS X 10.7 Lion. See:
    http://support.apple.com/kb/HT4715
    Regards.

  • How to use a Time - Voltage Array to Control a Analog Voltage Output using DAQmx Write VI

    I have an array of Time values associate with Voltage values that I want to use to control a Anolog Votage Out Device (PXI-6251) using DAQmx.  The array contains 1,000 elements.  The time values are NOT evenly spaced, the rate changes through the array.  The array is output once, timed to other processes.
    My problem is I haven't been able to locate a reference on how to handle the timing variability in the array.  If time was equally spaced I could use a loop....
    The attached showes the array, first row is time (ms) and the second row is voltage (volts).
    Can someone point me in the right direction?
    David
    Attachments:
    TimeVoltage.png ‏11 KB

    David,
    if you have only Base version of LabVIEW, this will be a time consuming task.
    If you have either Full or Professional, you will find interpolation-functions in the mathematic palette.
    I am not sure which ones serves you best,  but i'd startexperimenting with Interpolate 2D.
    hope this helps,
    Norbert 
    [Edit]: You could also use a polynominal fit on your voltage values. You will get a function describing the voltage over time. But you will have to modify this function to take care of the variation of time spacing. If you have a function describing your voltage over your (nonconstant) timestamps, you can simply create values for constant timeslices for your voltage.
    Message Edited by Norbert B on 11-06-2008 10:21 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How to use REFNUM to communicate between Tab Control Indicator panel and subVI without explicit connections?

    Hi! One of my test programs needs to show many readings on the fron panel. I used a 4 page Tab Control to separate
    different catagory readings and put them in the clusters. If I connect these indicator clusters to the subVI by refnum explicitly, the program runs too slow. So I am trying to make the subVI communicate with the front panel without explicite refnum connection. So far, the subVI can communicate with the clusters on the front panel but not on the Tab Controls. Is anyone can give me some ideas how to communicate/pass the data to the clustes on the
    Tab Control? Thanks,

    Hi Qian,
    If I understand the question correctly; you want to know if there is some other way to access the controls on the tab control without actually using a refnum from the VI that has the controls.
    To answer this question I would say that LabVIEW is a very powerful programming language and one of the very cool features is that it gives you access to all the controls on a VI into another VI without actually passing any data between them.
    The best way to do this would be using VI Server. The functions that you need to call would be Open VI reference to open a reference to your VI having all the controls. Then use a combination of Invoke nodes and Property node get access to the controls on the front panel of your VI.
    Do let me know if you have further questions.
    Ankita A.

Maybe you are looking for

  • Value mapping with some return values

    Hi Experts,     I  am facing value mapping problem. My requirment was My source elemnet having 4 value mapping(Key and Values)  and also if not passing that 4 keys also it will  display same thing in my reciver.     Can Anybody please suggest me how

  • Podcast not updating on iTunes Music Store but it's ok on Feed

    Hi, we've been posting a podcast every two weeks on iTunes Music Store for more than a year, the podcast name is sushi pop. This is the feed that we're using http://feeds.feedburner.com/ColissioncomSushiPop but since almost a month it hasn't been pub

  • Synchronisation methods in same class

    I have three methods in same class A,B,C IN which A,B synchronised and c not. my question is if one thread is in A.another thread cann access B OR C?

  • What's the best way to implement LOVs in OBIEE?

    Hi All, Does anyone have any good ideas on how to go about implementing LOVs in OBIEE? At the moment we have created reports and dashboard prompts from the relevant SQL views which report off an Oracle EBS database. Our problem is that when we create

  • Hidden Track

    How do you seperate out a hidden track, or remove the annoying gap before the hidden track plays