CListCtrl update from external data changes
ted r lowe -- trl@mcs.net Saturday, June 29, 1996 Environment: NT3.51/NT4.0B2/WIN95, VC++4.1 I have a resource editor created CListCtrl on a property page. I'd like to have the list updated dynamically from external events (such as a timer firing else where, or data being received from a socket). However, no matter what I do, i get asserts at ::IsWindow() called by some member function called by the external event. I can update the list manually by clicking on buttons I created on the same property page. Certainly, people are using CListCtrl objects to display dynamically changing external data (similar to the slick new taskmanager in NT4.0). How do I get external events to update a CListCtrl ? I only need to have the CListCtrl update when the property page it is on is visible. TIA!!! ted --- who: ted r lowe \ "Imagination is more \ where: Wheaton, IL, USA, Earth \ important than knowledge" \ e-mail: trl@mcs.net \ \ url: http://www.mcs.net/~trl/ \ Albert Einstein \ phone: voice=708-260-0424 fax=260-0570 \ \
Vincent Mascart -- 100425.1337@compuserve.com Saturday, July 06, 1996 >From: ted r lowe >Sent: jeudi 4 juillet 1996 20:32 >To: INTERNET:MFC-L@NETCOM.COM >Subject: CListCtrl update from external data changes > >Environment: NT3.51/NT4.0B2/WIN95, VC++4.1 > >I have a resource editor created CListCtrl on a property page. >I'd like to have the list updated dynamically from external events >(such as a timer firing else where, or data being received >from a socket). However, no matter what I do, i get >asserts at ::IsWindow() called by some member >function called by the external event. I can update the list >manually by clicking on buttons I created on >the same property page. Certainly, people >are using CListCtrl objects to display dynamically >changing external data (similar to the slick >new taskmanager in NT4.0). How do I get external >events to update a CListCtrl ? I only need to have >the CListCtrl update when the property page it >is on is visible. > >TIA!!! >ted It would we nice to give us the exact file and line where the ASSERT occurs. By the way, I think you problem arise because PropertyPages are not initialized (i.e. OnInitDialog() called() ) until they are displayed to the user. Your should test ::IsWindow() in your function updating your CListCtrl and return if it is null. HTH Vincent Mascart 100425.1337@compuserve.com
| Вернуться в корень Архива |