L_DlgHTMLMapper

#include "l_bitmap.h"

L_LTDLG_API L_INT L_DlgHTMLMapper(hWndOwner, pDlgParams)

L_HWND hWndOwner;

/*owner of the dialog*/

LPHTMLMAPPERDLGPARAMS pDlgParams;

/*pointer to a structure*/

Displays the HTML Map Creator dialog, in order to create an HTML map upon an image. Use this dialog to create an HTML map area using the given bitmap.

Parameter

Description

hWndOwner

Handle of the window that owns the dialog.

pDlgParams

Pointer to a HTMLMAPPERDLGPARAMS structure used to initialize the dialog.

Comments

The HTML Map Creator dialog.

This dialog also offers tuning options for the output bitmap through the dialogs displayed using L_DlgJPEGWebTuner, L_DlgGIFWebTuner and L_DlgPNGWebTuner.

Returns

SUCCESS_DLG_CLOSE

The "Close" button was pressed, and the dialog exited successfully.

< 1

An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LTDLGWEB
LTDLGKRN
LTDLGUTL
LTDLGCTRL
LTDLGCOM
LTDIS
LTIMG
LTKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

L_DlgInit, L_DlgJPEGWebTuner, L_DlgGIFWebTuner, L_DlgPNGWebTuner

Topics:

Dialogs: HTML/Web

 

Using Imaging Common Dialog

Example

// Example 1:
 L_INT DlgHTMLMapperFirstExample(HWND hWnd,pBITMAPHANDLE pBitmap)
{
   L_INT nRet;
   JPEGWEBTUNERDLGPARAMS DlgParams ;

   memset ( &DlgParams, 0, sizeof ( JPEGWEBTUNERDLGPARAMS ) ) ;

   DlgParams.uStructSize   = sizeof ( JPEGWEBTUNERDLGPARAMS ) ;
   DlgParams.pBitmap       = pBitmap ;
   DlgParams.uDlgFlags     = DLG_JPEGWEBTUNER_SHOW_EXPORT         |
                             DLG_JPEGWEBTUNER_SHOW_INFORMATION    |
                             DLG_JPEGWEBTUNER_SHOW_PREVIEW        |
                             DLG_JPEGWEBTUNER_SHOW_TOOL_ZOOMLEVEL |
                             DLG_JPEGWEBTUNER_SHOW_SAVETHUMBNAIL  |
                             DLG_JPEGWEBTUNER_SHOW_OPTIONS        |
                             DLG_JPEGWEBTUNER_SHOW_SAVETHUMBNAIL  ;

   nRet = L_DlgInit ( DLG_INIT_COLOR ) ;
   if(nRet != SUCCESS && nRet != ERROR_DLG_ALREADYINITIATED)
      return nRet;
   nRet = L_DlgJPEGWebTuner ( hWnd, &DlgParams ) ;
   if(nRet < 1)
      return nRet;
   nRet = L_DlgFree () ;
   if(nRet != SUCCESS)
      return nRet;
   return SUCCESS;
}

// Example 2:
static L_VOID ExportBitmap(L_TCHAR*                 szFileName,
                           pBITMAPHANDLE            pBitmap,
                           LPJPEGWEBTUNERDLGPARAMS  pParam)
{
   {// SAVE TO DISK

      SAVEFILEOPTION SaveOption ;

      memset ( &SaveOption, 0, sizeof ( SAVEFILEOPTION ) ) ;

      if ( pParam->bProgressive )
      {
         SaveOption.Passes = -1 ;
      }

      if ( pParam->bWithStamp )
      {       
         SaveOption.Flags       |=  ESO_JPEGSTAMP | ESO_SAVEWITHSTAMP ;
         SaveOption.StampWidth  = 32 ;
         SaveOption.StampHeight = 32 ;
         SaveOption.StampBits   = 24 ;
      }

      L_SaveBitmap ( szFileName, 
                     pBitmap, 
                     pParam->nFormat, 
                     24, 
                     pParam->nQuality, 
                     &SaveOption ) ;

   }// SAVE TO DISK
}

 L_INT DlgHTMLMapperSecondExample(HWND hWnd, pBITMAPHANDLE pBitmap )
{
   L_INT                   nRet ;
   JPEGWEBTUNERDLGPARAMS   DlgParams ;

   memset ( &DlgParams, 0, sizeof ( JPEGWEBTUNERDLGPARAMS ) ) ;

   DlgParams.uStructSize   = sizeof ( JPEGWEBTUNERDLGPARAMS ) ;
   DlgParams.pBitmap       = pBitmap ;
   DlgParams.uDlgFlags     = DLG_JPEGWEBTUNER_SHOW_INFORMATION    |
                             DLG_JPEGWEBTUNER_SHOW_PREVIEW        |
                             DLG_JPEGWEBTUNER_SHOW_TOOL_ZOOMLEVEL |
                             DLG_JPEGWEBTUNER_SHOW_SAVETHUMBNAIL  |
                             DLG_JPEGWEBTUNER_SHOW_OPTIONS        ;

   nRet = L_DlgInit ( DLG_INIT_COLOR ) ;
   if(nRet != SUCCESS && nRet != ERROR_DLG_ALREADYINITIATED)
      return nRet;
   nRet = L_DlgJPEGWebTuner (hWnd, &DlgParams) ;

   if ( SUCCESS_DLG_OK == nRet )
   {
      ExportBitmap ( TEXT("tuned.jpg"), pBitmap, &DlgParams ) ;
   }
   else if( nRet <1)
      return nRet;

   nRet = L_DlgFree () ;
   if(nRet != SUCCESS)
      return nRet;
   return SUCCESS;
}