Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

imgPlotDC

hello,
i try to use imgPlotDC instead of imgPlot in the llring-example (../NationalInstruments/NI-IMAQ/Samples/MSVC/RING/).
but with the code below no camera image is shown in the main window...does anybody have an idea what's wrong?

thank you very much and best regards,
malte



//**************** [...] **************************

// Get the device context associated with this window handle                                     
hDC = GetDC((HWND)ImaqSmplHwnd);

// Create a compatible device context for the drawing off-screen
hMemDC = CreateCompatibleDC(hDC);

// Create and select a bitmap in our device context to receive the image
hBitmap = CreateCompatibleBitmap(hDC, AcqWinWidth, AcqWinHeight);

hOldGdiObj = SelectObject(hMemDC, hBitmap);
  
// Display the acquired image in the bitmap
imgPlotDC ((GUIHNDL)hMemDC, (void *)CopyBuffer, 0, 0, AcqWinWidth, AcqWinHeight,
0, 0, plotFlag);

//**************** [...] **************************
0 Kudos
Message 1 of 4
(3,624 Views)

Have you tried to use the BitBlt() function after the imgplotdc?

Have a look on the attached code...

If this doesn't work with the BitBlt() function, let me know which version of IMAQ you are using...

 

regards

Thomas Sandrisser

Message 2 of 4
(3,610 Views)
that was the problem...thank you Thomas!

best regards,
malte
0 Kudos
Message 3 of 4
(3,598 Views)
Hi Thomas,
 
Thanks for sharing your c-File !
 
It saved me a lot of time (5)!
 
Greetings from the
Lake of Constance,Germany
 
Juergen
--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 4 of 4
(3,290 Views)