Start with the project you created in Implementing Hit Testing.
Take the following steps to show/hide layers from a vector drawing:
Click the "Class View" tab of the project workspace.
Click to open the MyVectorWindow branch.
Double-click the MsgProcCallBack () member function.
Declare the following variables local to the MsgProcCallBack() function.
Add the following code immediately before case 'b':
// get layer from index
if( wParam == '1' )
nIndex = 0;
nIndex = 1;
GetLayerByIndex (nIndex, &Layer );
// flip the visible state of the layer
InvalidateRect( hWnd, NULL, FALSE );
Compile and run the demo.
The sample image (random.dxf) shipped with LEADTOOLS has 2 layers, you should be able to hide/show those layers by pressing 1 and 2 on your keyboard.
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries