© 2011 Thorlabs
129Computer Interface
In the message loop the PaintEvent is used to trigger the measurement cycle. To
keep it running, the PaintEvent is continously recalled:
InvalidateRect(msg.hwnd, &clientRect, false);
In PaintEvent a new result is requested:
CALCULATION_CLUSTER calcCluster;
unsigned char* imageData = NULL;
int width;
int height;
int lStride;
if(0 == GetMeasurement(&calcCluster, &imageData, &width, &height,
&lStride))
{
[…]
}
When terminate the program, devices and their drivers are being released:
ReleaseThorlabsBeamInstance();