I have an application which has three tabs. Each tab has a CListCtrl and when the application is started, I want to insert some items into those listboxes. The problem I am having is that I get debug assertion errors because if I try to insert an item into a listbox located on a sheet that is not active, the hwnd pointer is NULL.
I can think of two ways of getting around this. One is to set the page as active everytime an item is inserted into the listbox. This is not the way I would like to do this because I do not want the application to switch pages by itself all the time. The second way would be to check of the page is active and if not, store the item to insert into a list. When the page gets activated, the list would be emptied into the list box.
I was wondering if there is any other way I can do this.
Your help is greatly appreciated.