#include "ltwrappr.h"
L_INT LImageViewerCell::FlipAnnotationContainer(nSubCellIndex, uFlags)
L_INT nSubCellIndex; |
index into the image list attached to the cell |
L_UINT uFlags; |
reserved for future |
Flips the annotation container.
Parameter |
Description |
nSubCellIndex |
A zero-based index into the image list attached to the cell. This sub-cell contains the image that contains the annotation container. Pass -2 to refer to the selected sub-cell. |
uFlags |
Reserved for future use. Pass 0. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
This function only flips the annotation container. It doesn't flip the image itself.
Required DLLs and Libraries
LTIVW For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
This example will flip the image along with the annotation container if the user click on the image using the left mouse button, and will reservse on the right mouse button, and will rotate on the middle mouse button.
class LImageViewerChild3 :public LImageViewerCell
{
virtual L_INT MouseCallBack(L_UINT uMessage,
pDISPCONTAINERCELLINFO pCellInfo);
};
L_INT LImageViewerChild3::MouseCallBack(L_UINT uMessage,
pDISPCONTAINERCELLINFO pCellInfo)
{
UNREFERENCED_PARAMETER(pCellInfo);
BITMAPHANDLE Bitmap;
LBitmap BitmapHandle;
pBITMAPHANDLE pBitmap;
switch(uMessage)
{
case WM_LBUTTONUP:
{
GetBitmapHandle(pCellInfo->nSubCellIndex, &Bitmap, 0);
BitmapHandle.SetHandle(&Bitmap);
BitmapHandle.Flip();
pBitmap = BitmapHandle.GetHandle();
SetBitmapHandle(pCellInfo->nSubCellIndex, pBitmap, TRUE, 0);
BitmapHandle.SetHandle(NULL, FALSE);
FlipAnnotationContainer(pCellInfo->nSubCellIndex, 0);
}
break;
case WM_MBUTTONUP:
GetBitmapHandle(pCellInfo->nSubCellIndex, &Bitmap, 0);
BitmapHandle.SetHandle(&Bitmap);
BitmapHandle.Reverse();
pBitmap = BitmapHandle.GetHandle();
SetBitmapHandle(pCellInfo->nSubCellIndex, pBitmap, TRUE, 0);
BitmapHandle.SetHandle(NULL, FALSE);
ReverseAnnotationContainer(pCellInfo->nSubCellIndex, 0);
break;
case WM_RBUTTONUP:
L_INT nAngle;
RotateBitmapPerspective(pCellInfo->nSubCellIndex, 90, 0);
GetRotateBitmapPerspectiveAngle(pCellInfo->nSubCellIndex, &nAngle, 0);
RotateAnnotationContainer(pCellInfo->nSubCellIndex, nAngle, 0);
break;
}
return SUCCESS;
}
L_INT LImageViewer_FlipAnnotationContainerExample(LImageViewerCell& ImageViewerCell)
{
ImageViewerCell.EnableMouseCallBack(TRUE);
return SUCCESS;
}