[lazarus] Notebook pages LM_SETITEMINDEX

Vincent Snijders vslist at zonnet.nl
Sun Dec 15 17:40:46 EST 2002

Hi all,

I am working on the notebook pages in win32 and I have a question.

In line 662 of CustomNotebook.inc (part of TCustomNotebook.SetPageIndex)
FPageIndex is set to 0 if it is smaller than zero, just before sending the
LM_SETITEMINDEX message to the interface.

The problem is that this message is also send on destroying pages and now it
is difficult to see, if the interface needs to show the a tabpage. Why
isn't -1 not a valid value for a PageIndex? Why can't -1 be sent as a page
index? I seem to have no way of detecting an empty notebook, because
Pages.Count is still 1.

Vincent Snijders.

More information about the Lazarus mailing list