|
From: K.VenkataRamana on 17 Feb 2005 06:43 Hi, I need to add items into the MSFlexGrid control in background. Means I need to add 1 lakh records to my MSFlexGrid Control, but it is taking 10 min. to fill the data. So, I have placed the filling functionality into the worker thread and now I can able to work with MSFlexGrid. But when I scroll or click on the control it is displaying major error and the application shuts down. How can I solve this problem? I am expecting the solution which inserts the data of MSFlexGrid in background while I am using the MSFlexGrid in front end. Please give the solution ASAP...
From: Scott McPhillips [MVP] on 17 Feb 2005 07:44 K.VenkataRamana wrote: > Hi, I need to add items into the MSFlexGrid control in background. Means I > need to add 1 lakh records to my MSFlexGrid Control, but it is taking 10 min. > to fill the data. So, I have placed the filling functionality into the worker > thread and now I can able to work with MSFlexGrid. But when I scroll or click > on the control it is displaying major error and the application shuts down. > How can I solve this problem? I am expecting the solution which inserts the > data of MSFlexGrid in background while I am using the MSFlexGrid in front > end. Please give the solution ASAP... The worker thread should not access the control. The worker thread should use PostMessage to pass new data to the control's parent window. The parent window message handler should put the data into the control. The steps are outlined here: http://www.mvps.org/vcfaq/mfc/12.htm -- Scott McPhillips [VC++ MVP]
From: K.VenkataRamana on 17 Feb 2005 11:13 Hi Scott McPhillips, Thank you for immediate response. And the methos u have given is working for me. Thanks you... Regards, K. Venkata Ramana "Scott McPhillips [MVP]" wrote: > K.VenkataRamana wrote: > > Hi, I need to add items into the MSFlexGrid control in background. Means I > > need to add 1 lakh records to my MSFlexGrid Control, but it is taking 10 min. > > to fill the data. So, I have placed the filling functionality into the worker > > thread and now I can able to work with MSFlexGrid. But when I scroll or click > > on the control it is displaying major error and the application shuts down. > > How can I solve this problem? I am expecting the solution which inserts the > > data of MSFlexGrid in background while I am using the MSFlexGrid in front > > end. Please give the solution ASAP... > > The worker thread should not access the control. The worker thread > should use PostMessage to pass new data to the control's parent window. > The parent window message handler should put the data into the control. > The steps are outlined here: http://www.mvps.org/vcfaq/mfc/12.htm > > -- > Scott McPhillips [VC++ MVP] > >
|
Pages: 1 Prev: MSComm function Next: Problem adding property sheet in a dialog! |