GetMemoryThresholds example for C++ Builder
{ This example doubles the maximum size for a conventional bitmap }
void __fastcall TForm1::Button1Click(TObject *Sender)
{
L_INT nMaxConvSize;
/* Get only the max conventional size value */
LEADImage1->GetMemoryThresholds(NULL, &nMaxConvSize, NULL, NULL, NULL );
/* Double the max conventional size value */
LEADImage1->SetMemoryThresholds(0, nMaxConvSize * 2, 0, 0, 0, MEM_MAXCONVSIZE );
}