AdvColumnGrid and CreateBitButton

Hi

I use this function to add a button into a grid :
list_Espece.CreateBitButton(1, I, 16, 16, '', AdvGrid.HaRight, AdvGrid.VaTop).LoadFromResourceName(HInstance, 'Poubelle');

It works when the number of row is relatively low. However, when the grid becomes huge (few thousands rows : > 8-9000), I receive this error message


GExperts Debugger Exception Notification

Project Arbre.exe raised exception class EOSError with message 'Erreur système. Code : 87.
Paramètre incorrect'.

[&Filter ...] [Ignore &All this Session] [Break] [Additional &Info] [Continue]

ThreadId=54412
ProcessId=11
ThreadName=""
ExceptionMessage="Erreur système. Code : 87.
Paramètre incorrect"
ExceptionName="EOSError"
ExceptionDisplayName="EOSError"
ExceptionAddress=7672A6F2
FileName=
LineNumber=
ExceptionObject=27ECFB28
Classes=[EOSError,Exception,TObject]


How can I avoid that ?

regards
olivier

I suspect it is getting out of resources.
If this bitmap is the same for all buttons, it is a bad idea to create it over & over again. It eats resources.
It is better to create the bitmap once and reuse it for every button.

Thanks Bruno

ok I'll do it
regards
olivier

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.