April 27, 2024, 12:04:45 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


ListBox changed

Started by ckoehn, November 11, 2010, 04:58:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ckoehn

November 11, 2010, 04:58:52 PM Last Edit: November 12, 2010, 06:33:22 AM by ckoehn
Is there a windows message that is sent when a listbox has had an item added to it?  In other words when the listbox count has changed.

Thanks,
Clint

LarryMc

Not that I can find in the MS docs.

Since items can only be added by your code which you control, why would you need it to tell you?
Not being snide, just trying to understand.

You can SEND it a message to ask how many items are listed.

So if necessary you could have a global variabll to hold the count.
set up a timer to send the message to get the count periodically and see if it is different from the global variable.
if it is updATE THE GLOBAL COUNTER AND THEN DO WHAT EVER IT IS YOU ARE WANTING TO DO WHEN THE COUNT CHANGES.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

ckoehn

November 12, 2010, 06:32:55 AM #2 Last Edit: November 12, 2010, 06:42:52 AM by ckoehn
I am using another program to add to a listbox in the first program.  The first program needs to know when the listbox count has changed.

EDIT:  Thanks for jogging the brain cells Larry.  I just made the second program send a WM_USER+1 to the first to tell it it had made a change.

Thanks,
Clint