ImageGear for C and C++ on Windows v20.0 - Updated
ART_GUI_property_sheet_init
API Reference Guide > ARTGUI Component API Reference > ARTGUI Component Functions Reference > ART_GUI_property_sheet_init

This function initializes the values in the property sheet with the values from the ART_MARK_ATTRIBUTES structure and one or more named blocks.

Declaration:

 
Copy Code
BOOL FAR PASCAL ART_GUI_property_sheet_init(
        HARTPROPSHEET hPropertySheet, 
        AT_MODE const fInitFlags, 
        LPART_MARK_ATTRIBUTES lpMarkAttr, 
        const LPART_BLOCK_NAME lpBlockName, 
        const LPVOID lpBlockData, 
        DWORD dwBlockSize
);

Arguments:

Name Type Description
hPropertySheet HARTPROPSHEET ART handle to the Property Sheet.
fInitFlags AT_MODE A bit flag that takes one or more AT_MODE variables. The possible settings are ART_INIT_ATTRIBUTES, ART_INIT_NAMED_BLOCK, or ART_INIT_GLOBAL_BLOCK.
lpMarkAttr LPART_MARK_ATTRIBUTES Set Mark Attributes to initialize the property sheet, or NULL.
lpBlockName const LPART_BLOCK_NAME Set to the name of the Named Block to initialize the property sheet, or NULL.
lpBlockData const LPVOID Set to the Global Block Data to initialize the property sheet, or NULL.
dwBlockSize DWORD Set to the size of the named block or 0L if you are not initializing a named block data.

Return Value:

Returns TRUE if successful, FALSE if there was an error. An error occurs if hPropertySheet is not a valid handle.

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

Annotation

Example:

 
Copy Code
HIGEAR  hIGear; /* HIGEAR handle of image */
HARTPROPSHEET hPropertySheet;/* handle to the property */
/* sheet  */
ART_BLOCK_NAME lpBlockName; /* name of the named block*/
VOID  lpBlockData; /* data from the block */
DWORD  dwBlockSize; /* size of the block */
HWND  hGlobal; /* Window handle to global*/ 
/* mem  */
/* Go to first named block for the mark object and get 
block name */
nErrcount = ART_mark_block_first(hIGear, hMarkIndex, &byBlockName);
while (*byBlockName)
{
/* while there are still named blocks, get their size */
nErrcount = ART_mark_block_query(hIGear, hMarkIndex, 
&byBlockName, NULL, &dwBlockSize);
if (dwBlockSize)
{
hGlobal = GlobalAlloc(GMEM_MOVEABLE,
(UINT)dwBlockSize);
lpBlockData = GlobalLock(hGlobal);
if (lpBlockData)  /* if there is any block */
/* data, read it  */
{
  nErrcount = ART_mark_block_query(hIGear, 
hMarkIndex, &byBlockName, lpBlockData, 
&dwBlockSize);
  /* initialize the property sheet with the */
  /* current named block data  */
  nErrcount = 
    ART_GUI_property_sheet_init(hPropertySheet,    
    ART_GUI_INIT_NAMED_BLOCK, NULL, 
    &byBlockName, lpBlockData, dwBlockSize);
}
GlobalUnlock(hGlobal);
GlobalFree(hGlobal);
}
/* move to next named block */
ART_mark_block_next(hIGear, hMarkIndex,&byBlockName);
}

Remarks:

Set fInitFlags to one or more of the constants shown above to tell ART what you are initializing in the property sheet.

Call this function after ART_GUI_property_sheet_create(), and before ART_GUI_property_sheet_show().

Is this page helpful?
Yes No
Thanks for your feedback.