L_DlgJPEGWebTuner
#include "l_bitmap.h"
L_INT EXT_FUNCTION L_DlgJPEGWebTuner(hWndOwner, pDlgParams)
HWND hWndOwner; |
/* owner of dialog */ |
LPJPEGWEBTUNERDLGPARAMS pDlgParams; |
/* pointer to a structure */ |
Displays the JPEG Web Tuner dialog box, and gets the tuning options used by L_SaveBitmap.
Parameter |
Description |
hWndOwner |
Handle of the window, which owns the dialog. |
pDlgParams |
Pointer to a JPEGWEBTUNERDLGPARAMS structure to be updated with the values entered by the user through the dialog. Set members of this structure, before calling this function, to set the dialog’s initial values. |
Comments
The JPEG Web Tuner dialog can be seen below:
Returns
SUCCESS_DLG_OK |
The "OK" button was pressed, and the dialog exited successfully. |
SUCCESS_DLG_CLOSE |
The "Close" button was pressed, and the dialog exited successfully. |
SUCCESS_DLG_CANCEL |
The "Cancel" 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: |
|
Topics: |
|
|
Example
Example 1:
L_VOID ShowDialog ( HWND hWnd, pBITMAPHANDLE pBitmap )
{
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 ;
L_DlgInit ( 0 ) ;
L_DlgJPEGWebTuner ( hWnd, &DlgParams ) ;
L_DlgFree ( ) ;
}
Example 2:
L_VOID ExportBitmap
(
L_TCHAR L_FAR * 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_VOID ShowDialog ( 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 ;
L_DlgInit ( 0 ) ;
nRet = L_DlgJPEGWebTuner (hWnd, &DlgParams) ;
if ( SUCCESS_DLG_OK == nRet )
{
ExportBitmap ( TEXT("tuned.jpg"), pBitmap, &DlgParams ) ;
}
L_DlgFree ( ) ;
}