L_DlgHTMLMapper
#include "l_bitmap.h"
L_INT EXT_FUNCTION L_DlgHTMLMapper(hWndOwner, pDlgParams)
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 can be seen below:
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 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: |
|
|
Example
Example 1:
L_VOID ShowMapperDlg ( HWND hWnd, pBITMAPHANDLE pBitmap )
{
HTMLMAPPERDLGPARAMS DlgParam ;
// init dialog params
memset ( &DlgParam, 0, sizeof ( HTMLMAPPERDLGPARAMS ) ) ;
DlgParam.uStructSize = sizeof ( HTMLMAPPERDLGPARAMS ) ;
DlgParam.pBitmap = pBitmap ;
// show the dialog
L_DlgInit ( DLG_INIT_COLOR ) ;
L_DlgHTMLMapper ( hWnd, &DlgParam ) ;
L_DlgFree ( ) ;
}
Example 2:
L_VOID AllocHistoryEntries
(
LPDLGHISTORYLIST pHistoryEntries
)
{
if ( NULL != pHistoryEntries )
{
pHistoryEntries->ppszEntry = (L_TCHAR**)malloc ( pHistoryEntries->nEntryCount * sizeof (L_TCHAR* ) ) ;
if ( NULL != pHistoryEntries->ppszEntry )
{
int nIndex ;
for ( nIndex = 0; nIndex < pHistoryEntries->nEntryCount; nIndex++ )
{
pHistoryEntries->ppszEntry [ nIndex ] = NULL ;
}
for ( nIndex = 0; nIndex < pHistoryEntries->nEntryCount; nIndex++ )
{
pHistoryEntries->ppszEntry [ nIndex ] = (L_TCHAR*) malloc ( pHistoryEntries->nEntryLength * sizeof (L_TCHAR ) ) ;
if ( NULL != pHistoryEntries->ppszEntry [ nIndex ] )
{
*pHistoryEntries->ppszEntry [ nIndex ] = 0 ;
}
}
}
}
}
L_VOID DeallocHistoryEntries
(
LPDLGHISTORYLIST pHistoryEntries
)
{
// clean up
int nIndex;
if ( NULL != pHistoryEntries->ppszEntry )
{
for (nIndex = 0; nIndex < pHistoryEntries->nEntryCount; nIndex++ )
{
if ( NULL != pHistoryEntries->ppszEntry [ nIndex ] )
{
free ( pHistoryEntries->ppszEntry [ nIndex ] ) ;
}
}
free ( pHistoryEntries->ppszEntry ) ;
}
}
L_VOID ShowMapperDlg ( HWND hWnd, pBITMAPHANDLE pBitmap )
{
DLGHISTORYLIST HistoryList ;
HTMLMAPPERDLGPARAMS DlgParam ;
// init history buffer
HistoryList.uStructSize = sizeof ( DLGHISTORYLIST ) ;
HistoryList.nEntryCount = 5 ;
HistoryList.nValidEntryCount = 0 ;
HistoryList.nEntryLength = 15 ;
AllocHistoryEntries ( &HistoryList ) ;
// init dialog params
memset ( &DlgParam, 0, sizeof ( HTMLMAPPERDLGPARAMS ) ) ;
DlgParam.uStructSize = sizeof ( HTMLMAPPERDLGPARAMS ) ;
DlgParam.pBitmap = pBitmap ;
DlgParam.uDlgFlags = 0 ;
DlgParam.pURLEntries = &HistoryList ;
// show the dialog
L_DlgInit ( DLG_INIT_COLOR ) ;
L_DlgHTMLMapper ( hWnd, &DlgParam ) ;
L_DlgFree ( ) ;
// clean up
DeallocHistoryEntries ( &HistoryList ) ;
}