Image Manager (CVCUtilities.dll) 14.1
General Functions

Enumerations

enum  CVB_OS_INFO {
  OSI_NONE = -1 , OSI_WIN32 = 0 , OSI_WOW64 = 1 , OSI_X64 = 2 ,
  OSI_LIN_i686 = 3 , OSI_LIN_x86_64 = 4 , OSI_LIN_ARMv7 = 5 , OSI_LIN_ARMv8 = 6
}
 Possible return values of GetCVBVersion and GetCVBVersionEx describing the operating system and processor architecture. More...
 
enum  DIRECTDRAW_STATUS {
  DDP_NOPROBLEM = 0 , DDP_UNKNOWN = 1 , DDP_NOTINSTALLED = 2 , DDP_WRONGVERSION = 3 ,
  DDP_INVALIDRES = 4 , DDP_NOOFFSCREENMEM = 5 , DDP_INIT = 6
}
 Possible return and status values concerning the DirectDraw/Direct3D subsystem on the host machine as returned by the function CanCVBDirectDraw. More...
 
enum  VPAT_X_ANALYSIS {
  XVPAT_NO_IMAGE = -1 , XVPAT_INVALID_PLANE = -2 , XVPAT_CONFUSE = 0 , XVPAT_LINEAR_WITH_DATATYPE = 1 ,
  XVPAT_FIX_INCREMENT = 2
}
 Possible result values for x-VPAT analysis (see AnalyseXVPAT). More...
 
enum  VPAT_Y_ANALYSIS {
  YVPAT_NO_IMAGE = -1 , YVPAT_INVALID_PLANE = -2 , YVPAT_CONFUSE = 0 , YVPAT_LINEAR_WITH_DATATYPE_AND_WIDTH = 1 ,
  YVPAT_FIX_INCREMENT = 2 , YVPAT_REVERSE = 3
}
 Possible result values for y-VPAT analysis (see AnalyseYVPAT). More...
 

Functions

VPAT_X_ANALYSIS AnalyseXVPAT (IMG Img, cvbdim_t Plane, intptr_t *pIncrement)
 Analyzes the X-offset table (X-VPAT) of an image. More...
 
VPAT_Y_ANALYSIS AnalyseYVPAT (IMG Img, cvbdim_t Plane, intptr_t *pIncrement)
 Analyzes the Y-offset table (Y-VPAT) of an image. More...
 
cvbres_t AnalyzeVPATRotation (IMG Img, cvbdim_t Plane, TVPATRotation &Rotation)
 Analyzes the VPAT to guess the VPAT rotation on the given Img. More...
 
DIRECTDRAW_STATUS CanCVBDirectDraw (HWND hWnd)
 Checks whether DirectDraw is usable for the Common Vision Blox Display on this machine. More...
 
cvbbool_t GetApplicationDirectory (char *Directory, size_t MaxLen)
 Returns the directory from which the calling application's executable was loaded. More...
 
cvbbool_t GetApplicationDirectoryW (wchar_t *Directory, size_t MaxLen)
 Returns the directory from which the calling application's executable was loaded. More...
 
cvbbool_t GetLinearAccess (IMG Img, cvbdim_t Plane, void **ppBaseAddress, intptr_t *pXInc, intptr_t *pYInc)
 Checks whether the image data can be accessed linearly and returns the necessary parameters to do so. More...
 
HRESULT OpenCommonVisionBloxKey (const char *SubKey, REGSAM samDesired, PHKEY phKeyResult)
 Opens the Common Vision Blox root key in the Windows registry or one of its sub keys. (Windows only) More...
 
HRESULT OpenCommonVisionBloxKeyW (const wchar_t *SubKey, REGSAM samDesired, PHKEY phKeyResult)
 Opens the Common Vision Blox root key in the Windows registry or one of its sub keys. (Windows only) More...
 
void ProcessQueue (HWND hWnd)
 Processes pending Window messages. More...
 
cvbbool_t ShowPropertyFrame (HWND hWndParent, IUnknown *pUnknown, const char *Title)
 Opens and displays the property page(s) of an ActiveX Control. More...
 
cvbbool_t ShowPropertyFrameW (HWND hWndParent, IUnknown *pUnknown, const wchar_t *Title)
 Opens and displays the property page(s) of an ActiveX Control. More...
 

Detailed Description

Enumeration Type Documentation

◆ CVB_OS_INFO

Possible return values of GetCVBVersion and GetCVBVersionEx describing the operating system and processor architecture.

Enumerator
OSI_NONE 

Information about the operating system and processor architecture is not available.

OSI_WIN32 

32 Bit Windows on a x86 CPU / 32 bit process running on a 32 bit Windows operating system.

OSI_WOW64 

32 Bit process running on a 64 bit Windows operating system.

OSI_X64 

64 bit Windows on an AMD64 CPU / 64 bit process running on a 64 bit Windows operating system.

OSI_LIN_i686 

32 bit Linux on a x86 CPU.

OSI_LIN_x86_64 

64 bit Linux on an AMD64 CPU.

OSI_LIN_ARMv7 

32 bit Linux on an ARMv7 CPU.

OSI_LIN_ARMv8 

64 bit Linux on an ARMV8 CPU.

◆ DIRECTDRAW_STATUS

Possible return and status values concerning the DirectDraw/Direct3D subsystem on the host machine as returned by the function CanCVBDirectDraw.

Enumerator
DDP_NOPROBLEM 

DirectDraw/Direct3D may be used.

DDP_UNKNOWN 

DirectDraw/Direct3D can is not usable for unknown reasons.

DDP_NOTINSTALLED 

DirectDraw/Direct3D drivers have not been installed on the host (this value is only included for backward compatibility).

DDP_WRONGVERSION 

DirectDraw/Direct3D cannot be used because it has not been installed in a version usable by CVB (currently versions 4, 7, 8 and 9 are supported).

DDP_INVALIDRES 

DirectDraw/Direct3D cannot be used because it is not supported for the currently selected screen resolution and/or color depth.

DDP_NOOFFSCREENMEM 

DirectDraw/Direct3D cannot be used because the amount of available off screen buffer memory is insufficient.

DDP_INIT 

DirectDraw/Direct3D cannot be used because the initialization of the driver subsystem failed.

◆ VPAT_X_ANALYSIS

Possible result values for x-VPAT analysis (see AnalyseXVPAT).

Enumerator
XVPAT_NO_IMAGE 

The input was not a valid CVB image.

XVPAT_INVALID_PLANE 

The index of the plane to be analyzed does not exist in the input image.

XVPAT_CONFUSE 

The x-VPAT has a confuse arrangement, i.e. no linear access can be performed on the image data.

XVPAT_LINEAR_WITH_DATATYPE 

The x-VPAT is linear with an increment that matches the plane's pixel data type.

XVPAT_FIX_INCREMENT 

The x-VPAT is linear with a fixed increment that does not match the plane's pixel data type (i.e. there are padding bytes in between the pixels; this is usually the case with multi-planar images that have an interleaved memory layout).

◆ VPAT_Y_ANALYSIS

Possible result values for y-VPAT analysis (see AnalyseYVPAT).

Enumerator
YVPAT_NO_IMAGE 

The input was not a valid CVB image.

YVPAT_INVALID_PLANE 

The index of the plane to be analyzed does not exist in the input image.

YVPAT_CONFUSE 

The y-VPAT has a confuse arrangement, i.e. no linear access can be performed on the image's lines.

YVPAT_LINEAR_WITH_DATATYPE_AND_WIDTH 

The y-VPAT is linear with an increment that matches the plane's pixel data type and width.

YVPAT_FIX_INCREMENT 

The y-VPAT is linear with a fixed increment that does not match the plane's pixel data type and width (i.e. there are padding bytes at the end of each line).

YVPAT_REVERSE 

Like YVPAT_FIX_INCREMENT, but with a negative increment.

Function Documentation

◆ AnalyseXVPAT()

VPAT_X_ANALYSIS AnalyseXVPAT ( IMG  Img,
cvbdim_t  Plane,
intptr_t *  pIncrement 
)

Analyzes the X-offset table (X-VPAT) of an image.

If the function returns a value greater or equal to zero, then linear pixel access in x direction is possible and pIncrement contains the increment (in bytes) necessary to walk from pixel (x, y) to pixel (x+1, y).

Parameters
[in]ImgHandle to the image object to be analyzed.
[in]PlaneIndex of the image plane to be analyzed. Must be in the range [0...ImageDimension(Img)-1].
[out]pIncrementIf linear access is possible (check return value!) then the x increment will be written to the address pointed to by this parameter. Pass NULL here if you are not interested in the increment.
Returns
The returned enum gives the result of the X-VPAT analysis (see VPAT_X_ANALYSIS for more information).
Related Topics
AnalyseYVPAT, GetLinearAccess, GetImageVPA, Proposal for a common image model.
Examples
VC Linear Image Access Example
Sample Code in C++:
#include <iCVCUtilities.h>
void XIncrement(IMG hImg)
{
intptr_t increment = 0;
// Analyze plane 0 (mono or red plane for an RGB image)
switch(AnalyseXVPAT(hImg, 0, &increment))
{
// error cases
break;
default:
// the image is linear in some way
break;
}
}
VPAT_X_ANALYSIS AnalyseXVPAT(IMG Img, cvbdim_t Plane, intptr_t *pIncrement)
Analyzes the X-offset table (X-VPAT) of an image.
Definition: VpatFunctions.cpp:144
@ XVPAT_INVALID_PLANE
The index of the plane to be analyzed does not exist in the input image.
Definition: iCVCUtilities.h:64
@ XVPAT_NO_IMAGE
The input was not a valid CVB image.
Definition: iCVCUtilities.h:62

◆ AnalyseYVPAT()

VPAT_Y_ANALYSIS AnalyseYVPAT ( IMG  Img,
cvbdim_t  Plane,
intptr_t *  pIncrement 
)

Analyzes the Y-offset table (Y-VPAT) of an image.

If the function returns a value greater or equal to zero, then linear pixel access in y direction is possible and pIncrement contains the increment (in bytes) necessary to walk from pixel (x, y) to pixel (x, y+1).

Parameters
[in]ImgHandle to the image object to be analyzed.
[in]PlaneIndex of the image plane to be analyzed. Must be in the range [0...ImageDimension(Img)-1].
[out]pIncrementIf linear access is possible (check return value!) then the y increment will be written to the address pointed to by this parameter. Pass NULL here if you are not interested in the increment.
Returns
The returned enum gives the result of the X-VPAT analysis (see VPAT_Y_ANALYSIS for more information).
Related Topics
AnalyseXVPAT, GetLinearAccess, GetImageVPA, Proposal for a common image model.
Examples
VC Linear Image Access Example
Sample Code in C++:
See AnalyseXVPAT for general usage.

◆ AnalyzeVPATRotation()

cvbres_t AnalyzeVPATRotation ( IMG  Img,
cvbdim_t  Plane,
TVPATRotation &  Rotation 
)

Analyzes the VPAT to guess the VPAT rotation on the given Img.

The assumption about the basic buffer format is that the image is linear with fixed positive x- and y-increments. If this assumption is not valid (e.g. on non-rotated images with default negative y-increment as with windows bitmaps) the returned Rotation is plain wrong! So make sure to check with AnalyseXVPAT and AnalyseYVPAT before using AnalyzeVPATRotation.

The rotation returned is according to the Vin-driver rotation (counter clockwise).

Attention
As described in the assumptions this function only works on linear images (image on which both, AnalyseXVPAT and AnalyseYVPAT return ..._FIX_INCREMENT or ..._LINEAR_WITH_DATATYPE; a simple check with GetLinearAccess won't do because GetLinearAccess returns also for images with a negative x or y increment).
Parameters
[in]ImgHandle to the image Image to be analyzed.
[in]PlaneImage plane to be analyzed.
[out]RotationRotation of the Img.
Returns
cvbres_t: Less than zero on error.

◆ CanCVBDirectDraw()

DIRECTDRAW_STATUS CanCVBDirectDraw ( HWND  hWnd)

Checks whether DirectDraw is usable for the Common Vision Blox Display on this machine.

This function is only available on the Windows platform.

Parameters
[in]hWndWindow handle of the display window.
Returns
DIRECTDRAW_STATUS value (see enum for possible values),
Examples
VC Sizeable Display

◆ GetApplicationDirectory()

cvbbool_t GetApplicationDirectory ( char *  Directory,
size_t  MaxLen 
)

Returns the directory from which the calling application's executable was loaded.

Only available on the Windows platform.

Parameters
[in]DirectoryPointer to the buffer to be filled with the start directory path.
[in]MaxLenThe maximum number of characters to be copied to the buffer pointed to by Directory. Remember to reserve enough space for the trailing zero. If the MaxLen is too small to accommodate the entire path to be copied then the string will be truncated.
Returns
TRUE if successful, FALSE otherwise.
Sample Code in Delphi:
procedure TMainForm.LoadImage;
var AppPath: PAnsiChar;
Directory : AnsiString
begin
GetMem(AppPath, 260);
if GetApplicationDirectory(AppPath, 260) then
begin
Directory := AppPath;
CVImage.LoadImage(Directory + 'test.bmp');
end;
FreeMem(AppPath);
end;
cvbbool_t GetApplicationDirectory(char *Directory, size_t MaxLen)
Returns the directory from which the calling application's executable was loaded.
Definition: CVCUtilities.cpp:722

◆ GetApplicationDirectoryW()

cvbbool_t GetApplicationDirectoryW ( wchar_t *  Directory,
size_t  MaxLen 
)

Returns the directory from which the calling application's executable was loaded.

Only available on the Windows platform.

Since
Common Vision Blox 13.00.000
Parameters
[in]DirectoryPointer to the buffer to be filled with the start directory path.
[in]MaxLenThe maximum number of characters to be copied to the buffer pointed to by Directory. Remember to reserve enough space for the trailing zero. If the MaxLen is too small to accommodate the entire path to be copied then the string will be truncated.
Returns
TRUE if successful, FALSE otherwise.
Sample Code in Delphi:
procedure TMainForm.LoadImage;
var AppPath: PAnsiChar;
Directory : AnsiString
begin
GetMem(AppPath, 260);
if GetApplicationDirectory(AppPath, 260) then
begin
Directory := AppPath;
CVImage.LoadImage(Directory + 'test.bmp');
end;
FreeMem(AppPath);
end;

◆ GetLinearAccess()

cvbbool_t GetLinearAccess ( IMG  Img,
cvbdim_t  Plane,
void **  ppBaseAddress,
intptr_t *  pXInc,
intptr_t *  pYInc 
)

Checks whether the image data can be accessed linearly and returns the necessary parameters to do so.

This function considers an image plane linearly accessible if it is possible to navigate (in memory) from any pixel (x, y) to its vertical or horizontal neighbor using a fixed byte increment which is independent of the coordinate (x, y).

If linear access is not possible, the image data will need to be accessed through the VPAT (see the description of the GetImageVPA function for details).

Attention
  • The increments may be positive or negative.
  • The increments can only be used in programming languages that provide the notion of pointers and pointer arithmetic; for example in Visual Basic .Net the linear access increments are only usable when working with the helper functions provided in the System.Runtime.InteropServices.Marshal class.
Parameters
[in]ImgHandle of the image object to be analyzed.
[in]PlaneIndex of the plane to be analyzed. Must be in the range [0...ImageDimension(Img)-1].
[out]ppBaseAddressWill receive the pointer to the first pixel of the first line if linear access is possible. Pass NULL here if you're not interested in retrieving this pointer.
[out]pXIncWill receive the increment in X direction in bytes. Pass NULL here if this increment is not needed.
[out]pYIncWill receive the increment in Y direction in bytes. Pass NULL here if this increment is not needed.
Returns
TRUE if linear access to the image data is possible, FALSE otherwise.
Related Topics
GetImageVPA, AnalyseXVPAT, AnalyseYVPAT
Examples
VC Linear Image Access Example
VC Bitmap Overlay Example
Sample Code in C++

Create an 8 bit per pixel monochrome ramp image:

#include <iCVCUtilities.h>
// Create a monochrome ramp image; returns nullptr on error.
// Do not forget to release the returned image when not needed anymore.
IMG CreateMono8RampImage(cvbdim_t width, cvbdim_t height)
{
IMG hImg = nullptr;
if (!CreateGenericImage(1, width, height, false, hImg))
return nullptr;
cvbuint8_t *pBase = nullptr;
intptr_t xInc = 0;
intptr_t yInc = 0;
if (!GetLinearAccess(hImg, 0, reinterpret_cast<void**>(&pBase), &xInc, &yInc))
{
// clean-up and leave
ReleaseObject(hImg);
return nullptr;
}
for(cvbdim_t y = 0; y < height; ++y)
{
cvbuint8_t *pLine = pBase + y * yInc;
cvbuint8_t rampValue = 0; // overflows to 0 on 255 + 1
for(cvbdim_t x = 0; x < width; ++x)
{
cvbuint8_t *pPixel = pLine + x * xInc;
*pPixel = rampValue++;
}
}
return hImg;
}
cvbbool_t GetLinearAccess(IMG Img, cvbdim_t Plane, void **ppBaseAddress, intptr_t *pXInc, intptr_t *pYInc)
Checks whether the image data can be accessed linearly and returns the necessary parameters to do so.
Definition: VpatFunctions.cpp:405

For higher bit data (e.g. 16 bit per pixel image) the for-loops looks similar - the differences lie in the way the pointers are interpreted:

for(cvbdim_t y = 0; y < height; ++y)
{
cvbuint8_t *pLine = pBase + y * iInc;
cvbuint16_t rampValue = 0; // overflows to 0 on 65535 + 1
// when using less than 16 bits make sure
// that overflow works accordingly!
for(cvbdim_t x = 0; x < width; ++x)
{
cvbuint16_t *pPixel = reinterpret_cast<cvbuint16_t *>(pLine + x * xInc);
*pPixel = rampValue++;
}
}
Sample Code in C#

Inversion of a rectangular region of an image with 8 bits per pixel. Remember to activate unsafe code in the project settings.

static void InvertImageData(ref SharedImg camera)
{
int nHeight = Cvb.Image.ImageHeight(camera);
int nWidth = Cvb.Image.ImageWidth(camera);
// Define Area to process
int nXStart = 0;
int nXStop = nWidth - 1;
int nYStart = 0;
int nYStop = nHeight - 1;
for (int i = 0; i < Cvb.Image.ImageDimension(camera); i++)
{
IntPtr pBasePtr;
int nXInc, nYInc;
if (Cvb.Utilities.GetLinearAccess(camera, i, out pBasePtr, out nXInc, out nYInc))
{
unsafe
{
int datatype = Cvb.Image.ImageDatatype(camera, i);
if (datatype == 8)
{
byte* pBase = (byte*)pBasePtr;
for (int y = nYStart; y <= nYStop; y++)
for (int x = nXStart; x <= nXStop; x++)
{
byte* pPixel = pBase + x * nXInc + y * nYInc;
*pPixel = (byte)(255 - *pPixel);
}
}
else if (datatype <= 16)
{
int max = (1 >> datatype) - 1;
byte* pBase = (byte*)pBasePtr;
for (int y = nYStart; y <= nYStop; y++)
for (int x = nXStart; x <= nXStop; x++)
{
ushort* pPixel = (ushort*)(pBase + x * nXInc + y * nYInc);
*pPixel = (ushort)(2^datatype - *pPixel);
}
}
}
}
}
}

◆ OpenCommonVisionBloxKey()

HRESULT OpenCommonVisionBloxKey ( const char *  SubKey,
REGSAM  samDesired,
PHKEY  phKeyResult 
)

Opens the Common Vision Blox root key in the Windows registry or one of its sub keys. (Windows only)

This function does almost the same thing as the Windows SDK function RegOpenKeyEx, the only difference being that OpenCommonVisionBloxKey is restricted to the Common Vision Blox root key ("HKEY_LOCAL_MACHINE\Software\Common Vision Blox\Image Manager" when running the 32 bit version of Common Vision Blox on a 32 bit Windows system or when running the 64 bit version of Common Vision Blox on a 64 bit Windows system or "HKEY_LOCAL_MACHINE\Software\Wow6432Node\Common Vision Blox\Image Manager" when running the 32 bit version of Common Vision Blox on a 64 bit Windows system).

Remember to close any key opened by this function with the Windows SDK function RegCloseKey.

Only available on the Windows platform.

Parameters
[in]SubKeyPath to the sub key to be opened (relative to the Common Vision Blox root key) or NULL for the Common Vision Blox root key.
[in]samDesiredAccess rights with which to open the key (see the documentation of the Windows SDK function RegOpenKeyEx for a list of possible values.
[out]phKeyResultPointer to the variable that will receive the handle to the newly opened key. Release this handle with RegCloseKey when it is no longer needed.
Returns
Same as RegOpenKeyEx (see WINERROR.H).
Related Topics
Windows SDK documentation on RegOpenKeyEx and RegCloseKey
Sample Code in C++:
#include <Windows.h>
#include <iCVCUtilities.h>
void main()
{
HKEY hKey = NULL;
if (OpenCommonVisionBloxKey(NULL, KEY_READ, &hKey) == ERROR_SUCCESS)
{
// hKey now points to HKLM\Software\CommonVisionBlox\Image Manager.
...
RegCloseKey(hKey);
}
if(OpenCommonVisionBloxKey("STEMMER IMAGING", KEY_READ, &hKey) == ERROR_SUCCESS)
{
// hKey now points to HKLM\Software\CommonVisionBlox\Image Manager\STEMMER IMAGING.
...
RegCloseKey(hKey);
}
}
HRESULT OpenCommonVisionBloxKey(const char *SubKey, REGSAM samDesired, PHKEY phKeyResult)
Opens the Common Vision Blox root key in the Windows registry or one of its sub keys....
Definition: CVCUtilities.cpp:591

◆ OpenCommonVisionBloxKeyW()

HRESULT OpenCommonVisionBloxKeyW ( const wchar_t *  SubKey,
REGSAM  samDesired,
PHKEY  phKeyResult 
)

Opens the Common Vision Blox root key in the Windows registry or one of its sub keys. (Windows only)

This function does almost the same thing as the Windows SDK function RegOpenKeyEx, the only difference being that OpenCommonVisionBloxKeyW is restricted to the Common Vision Blox root key ("HKEY_LOCAL_MACHINE\Software\Common Vision Blox\Image Manager" when running the 32 bit version of Common Vision Blox on a 32 bit Windows system or when running the 64 bit version of Common Vision Blox on a 64 bit Windows system or "HKEY_LOCAL_MACHINE\Software\Wow6432Node\Common Vision Blox\Image Manager" when running the 32 bit verison of Common Vision Blox on a 64 bit Windows system).

Remember to close any key opened by this function with the Windows SDK function RegCloseKey.

Only available on the Windows platform.

Since
Common Vision Blox 13.00.000
Parameters
[in]SubKeyPath to the sub key to be opened (relative to the Common Vision Blox root key) or NULL for the Common Vision Blox root key.
[in]samDesiredAccess rights with which to open the key (see the documentation of the Windows SDK function RegOpenKeyEx for a list of possible values.
[out]phKeyResultPointer to the variable that will receive the handle to the newly opened key. Release this handle with RegCloseKey when it is no longer needed.
Returns
Same as RegOpenKeyEx (see WINERROR.H).
Related Topics
Windows SDK documentation on RegOpenKeyEx and RegCloseKey
Sample Code in C++:
#include <Windows.h>
#include <iCVCUtilities.h>
void main()
{
HKEY hKey = NULL;
if (OpenCommonVisionBloxKeyW(NULL, KEY_READ, &hKey) == ERROR_SUCCESS)
{
// hKey now points to HKLM\Software\CommonVisionBlox\Image Manager.
...
RegCloseKey(hKey);
}
if(OpenCommonVisionBloxKeyW(L"STEMMER IMAGING", KEY_READ, &hKey) == ERROR_SUCCESS)
{
// hKey now points to HKLM\Software\CommonVisionBlox\Image Manager\STEMMER IMAGING.
...
RegCloseKey(hKey);
}
}
HRESULT OpenCommonVisionBloxKeyW(const wchar_t *SubKey, REGSAM samDesired, PHKEY phKeyResult)
Opens the Common Vision Blox root key in the Windows registry or one of its sub keys....
Definition: CVCUtilities.cpp:663

◆ ProcessQueue()

void ProcessQueue ( HWND  hWnd)

Processes pending Window messages.

This method may be used in computationally intensive processing that happens in the UI thread (e.g. because processing happens in an event handler) to keep the application reactive.

An application that calls ProcessQueue needs to thorougly disable all UI elements that might interfere with the long running processing task that called ProcessQueue, otherwise undefined behavior is to be expected. Use of ProcessQueue may furthermore lead to reentrance problems because in the presence of ProcessQueue for example a button handler may easily be entered again while it is already running, and the handler code will need to be made resilient to that if an application uses ProcessQueue. On top of that, the implementation of proper and well-defined termination behavior of an application is difficult in the presence of ProcessQueue calls.

Generally speaking, it is usually preferable to shift long running processing to asynchronous processing patterns like e.g. threads to

Some GUI toolkits offer functionality similar to that of ProcessQueue. For example the Windows Forms SDK offers the method System.Windows.Forms.Application.DoEvents(). Where available, such native functionality should be preferred over the use of ProcessQueue from the CVCUtilities.dll.

This function is only available on the Windows platform.

Parameters
[in]hWndWindow handle of the window to process messages on.
Sample Code in C++:
void CMainWindow::OnImageSnaped()
{
for(int i = 0; i < 100; ++i)
{
... // - some time-consuming calculations here -
ProcessQueue(m_hWnd);
}
}
void ProcessQueue(HWND hWnd)
Processes pending Window messages.
Definition: CVCUtilities.cpp:822

◆ ShowPropertyFrame()

cvbbool_t ShowPropertyFrame ( HWND  hWndParent,
IUnknown *  pUnknown,
const char *  Title 
)

Opens and displays the property page(s) of an ActiveX Control.

This function opens a modal dialog with the ActiveX Control's property page(s) and uses the hWndParent as the dialogs parent.

This function is only available on the Windows platform.

Attention
Some GUI toolkits provide their own implementation of this functionality (.Net for example adds a member function ShowPropertyPages to each ActiveX control wrapper and Delphi or CBuilder provide the function BrowseProperties) and it is usually preferable to use the functionality provided by the GUI toolkit.
Parameters
[in]hWndParentHandle of the parent window of the dialog (e.g the main window of the application).
[out]pUnknownPointer to the IUnknown interface of the OCX.
[in]TitleTitle of the property page dialog.
Returns
TRUE if successful, FALSE otherwise.
Examples
VC Property Pages Example
Sample Code in C++ (MFC):
ShowPropertyFrame(m_hWnd, m_cvDisp.GetControlUnknown(), "Common Vision Display");
cvbbool_t ShowPropertyFrame(HWND hWndParent, IUnknown *pUnknown, const char *Title)
Opens and displays the property page(s) of an ActiveX Control.
Definition: CVCUtilities.cpp:525

◆ ShowPropertyFrameW()

cvbbool_t ShowPropertyFrameW ( HWND  hWndParent,
IUnknown *  pUnknown,
const wchar_t *  Title 
)

Opens and displays the property page(s) of an ActiveX Control.

This function opens a modal dialog with the ActiveX Control's property page(s) and uses the hWndParent as the dialogs parent.

This function is only available on the Windows platform.

Attention
Some GUI toolkits provide their own implementation of this functionality (.Net for example adds a member function ShowPropertyPages to each ActiveX control wrapper and Delphi or CBuilder provide the function BrowseProperties) and it is usually preferable to use the functionality provided by the GUI toolkit.
Since
Common Vision Blox 13.00.000
Parameters
[in]hWndParentHandle of the parent window of the dialog (e.g the main window of the application).
[out]pUnknownPointer to the IUnknown interface of the OCX.
[in]TitleTitle of the property page dialog.
Returns
TRUE if successful, FALSE otherwise.
Examples
VC Property Pages Example
Sample Code in C++ (MFC):
ShowPropertyFrameW(m_hWnd, m_cvDisp.GetControlUnknown(), L"Common Vision Display");
cvbbool_t ShowPropertyFrameW(HWND hWndParent, IUnknown *pUnknown, const wchar_t *Title)
Opens and displays the property page(s) of an ActiveX Control.
Definition: CVCUtilities.cpp:464