L_CaptureAreaOptionDlg

Summary

Displays a dialog to retrieve the options for the L_CaptureArea function.

Syntax

#include "l_bitmap.h"

L_LTSCR_API L_INT L_CaptureAreaOptionDlg(hParentWnd, uFlags, pCaptureAreaOption, nUseDefault, pfnCallBack, pUserData)

Parameters

L_HWND hParentWnd

Handle to the parent window.

L_UINT uFlags

Flags that determine the options dialog. Possible values are:

Value Meaning
NONE [0x0000] No "?" help button will be shown.
SCRDLG_CAPTUREAREAOPTION_CONTEXTHELP [0x0002] Area options dialog context help. The "?" button will appear in the title bar if the pfnCallBack is not NULL.

pLEADCAPTUREAREAOPTION pCaptureAreaOption

Pointer to a LEADCAPTUREAREAOPTION structure that contains information about capturing an area.

L_INT nUseDefault

If TRUE, the dialog will start with default values. Otherwise the dialog will use the values specified by the pLEADCAPTUREAREAOPTION structure. These values must be a valid values or the dialog will return an error code.

LTSCRHELPCB pfnCallBack

Optional help callback function for displaying help dialog. If you do not provide help callback function, use NULL as the value of this parameter. If you do provide help callback function, use the function pointer as the value of this parameter. The callback function must adhere to the function prototype described in LTSCRHELPCB Function.

L_VOID* pUserData

Void pointer that you can use to pass one or more additional parameters that the help callback function needs. To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this parameter, pass the address of the variable or structure, casting it to L_VOID *. The callback function, which receives the address in its own pUserData parameter, can cast it to a pointer of the appropriate data type to access your variable or structure. If the additional parameters are not needed, you can pass NULL in this parameter.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This function will display the common dialog for setting the options for the L_CaptureArea function. The options selected by the user will be copied to pCaptureAreaOption.

If a help callback function was provided in pfnCallBack, a Help button will appear on the dialog. If NULL was provided, no Help button will appear.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT CaptureAreaOptionDlgExample(L_VOID) 
{ 
   LEADCAPTUREAREAOPTION CaptureAreaOption; 
 
   HWND hWnd; 
   /* To call the L_CaptureAreaOptionDlg */ 
   hWnd = GetForegroundWindow(); 
 
   CaptureAreaOption.uStructSize = sizeof(LEADCAPTUREAREAOPTION); 
 
   /* use the defaults*/ 
   L_INT nRet = L_CaptureAreaOptionDlg(hWnd, 0, &CaptureAreaOption, TRUE, NULL, NULL); 
 
   return nRet; 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Screen Capture C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.