Add Items to MSFlexGrid

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...
0
2/17/2005 11:43:05 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
713 Views

Similar Articles

[PageSpeed] 10

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]

0
Scott
2/17/2005 12:44:34 PM
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]
> 
> 
0
2/17/2005 4:13:02 PM
Reply:

Similar Artilces:

How can I add transaction while using the online version of money
Ok... when I first bought Money several years ago and installed it on my home computer, I could then login while at work via the passport and see the information that I had entered on my home computer. If I purchased something during the day I could go online and add the transaction which was great way to know at any given moment what my TRUE balance was in my account. Now when I check my Money account online from work I can see all the information I've entered at home but now there is no way to add a new transaction other then from my home computer where I have Money installed. ...

New items with purchase order integration
I'm running a daily integration to bring purchase orders into GP using Integration Manager. The source is a text file. It works very well. The problem I have is with new items. When there is an item in the source file that does not exist in Great Plains, I would like the integration to fail or skip the line item. Currently, it brings the item into the Purchase Order as a non inventory item. The document will show the item number and the cost but no item description. Where can I change the behavior for this? Unfortunately, with the users that put non-inventory items on POs Wh...

Purge deleted items from shared mailbox
How can I purge the folder "deleted items" from a shared mailbox? The RM menu item is greyed out. Environment: Outlook 2003/Exchange 2003. What permission do you have on the deleted folder? can you delete them if you open the folder and select all, Del? -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook 2007: http://www.slipstick.com/outlook/ol2007/ Outlook Tips by email: dailytips-subscribe-request@lists.outlooktips.net Outlook Tips: http://www.outlook-tips.net/ Outlook &...

eConnect PM Schema distribution item
Whenever I use eConnect PM distribution on my invoices, I see that the two default distrbution account are always present ; namely Pay on the credit side Purchase on the debit side This is despite the fact I'm explicitly entering in the distribution item of the Schema my own debiting and crediting accounts. so the result is I can see my distributing account along with these two. Kindly advice on how I can ensure via eConnect that the Purchases Invoices distribution list I can only see the distribution accounts I specify in the eConnect XML ...

Sales order processing item inquiry windows
Hi, Since I have updated to version 10 (from version 9.0) the document are not showing in any specific order. In version 9 they were sorted by document date. For example if you choose "By item number" then include only invoice and then choose history. You will see that the document are not sorted at all. Any ideas or suggestions? Thanks Andre, Everything scrolling window has a sort order - just maybe not what you expect. But you can always see it by turning on your dexsql.log and seeing the query generated. In this case with your same options marked, i get: SELECT TOP...

Excel 2003 adds extra quotes to CSV upon resaving
I have a CSV that when viewed in notepad has the following 2 lines "R1","J","3","","N","4",":4","0" "R1","L","2","","N","4",":4","0" but no matter if i open in by double-clicking or importing the data into a blank worksheet, then resaving, when i open the CSV in notepad, it comes out looking like this, with extra quotes, rather than just the quoting following along with the original 2 lines. """R1"","...

Problem in permanent type add-in toolbar
Hi, I have been facing a issue with dealing with my add-in toolbar. I want to make my toolbar permanent so that use can hide and reposition it permanently(even after restarting Outlook). At the same time, I want to support my add-in toolbar for all opened Outlook explorer. I want to make sure that at any point of time there must be one and only one toolbar on any Outlook window. I have tried below methods but none worked: 1. Tried deleting toolbar on shutdown. This doesn't delete the toolbar and each restarting outlook adds new toolbar. Private Sub AddinInstance_OnBegi...

VC++ .NET 2002: How To Use the Class View's Properties window to add a message handler for the WN_KEYDOWN message
Hi all I used "The EX05c Example: Scrolling" of the book "Programming With Microsoft Visual C++ .NET Core Reference" (6th Edition) as my 3rd example of MFC exercises to catch up my VC++ .NET 2002 (VC++ 7.0) programming. I started my 'Eg05c' project in the MFC Application Wizard and followed the 1 thru 7 steps instructed in the book (pages 82-85) I believed I did the steps 1, 2 and 3 correctly: 1 - In MFC Application Wizard -Eg05c, I setthe CEg05cView to "CScrollView" 2 - I added the m_rectEllipse and m_nColor data members in Eg05cView.h by typing in "...

Excel Add-In for SQL Server Analysis Services Error -- Need Help
I have the add-in installed and it was working. However, lately I keep getting an error stating: Excel Add-in for Analysis Services has not been initialized I have uninstalled and reinstalled but no luck. Anyone help out here? Alan ...

Obsolete / inactive items available to sales / inventory processin
Hi all, Does anyone know of a way to disallow obsolete/inactive items from being available for selection on sales orders? Thanks, -- Jim Bourque Two steps: first, in Setup->Sales->Sales Order Processing->Options, uncheck the option to allow sale of discontinued items. Second, mark those items Discontinued in the Item Card. -- Richard L. Whaley Author / Consultant / MVP Documentation for Software Users For help learning and better using Dynamics GP,... check out our books at http://www.AccoladePublications.com "Jim B" wrote: > Hi all, > > Does anyo...

Exchange 2007 Resource Mailboxes
Hi, I have setup Exchange 2007 Resource Mailboxes as I have a number of meeting rooms that all users should be able to book. I have since found that if user a) books a meeting and user b) attempts to delete it - he/she can. I don't seem to be able to prevent them, and would appreciate some help. Regards Nick ...

404 Error in OWA when accessing calendar items in public folders
We are running Exchange 2003 SP2 on Windows 2003 Server SP1. We have a front-end/back-end configuration. OWA works well except when attempting to access calendar items in public folders. In personal folders, this is not a problem. The public folder calendar appears correctly; however, opening a particular calendar item results in a 404 error about 2/3 of the time. Sometimes it opens properly. Refreshing the item window repeatedly will eventually bring up the item. This problem is not restricted to a particular user, browser or public folder. Even with full owner permissions on t...

I need the items to have grades
In any business, there are items of different quality, different origin, different level of concentration etc. For example, Tea powder of 3 qualities: High, Medium, low or Tea made in different countries: India, Malasia, China. In the above cases, the item code has to be same because it is basically the same item, but there should be a way to identify them separately. The best way I have seen, to manage this requirement is to have a 'Grade' Column with the Item code. There should be a Grade Master in the Cards Menu of Inventory Module, where the user can create the Grade Type...

Messages not saved in Sent Items Folder
Outlook 2003. Some messages are not being saved to the Sent Items Folder even though it is checked in the options. Does not matter whether is a reply, forward or a new email. It is seemingly random with most messages being saved correctly to the Sent Items Folder. Any Ideas? Thanks, Hugo I have a similar problem, along the lines of the below: When i type email and attempt to send when not connected (due to temporary connectivity issues and when unable to connect), the mail is saved in Outbox. When next connected, the mail is sent *but* the mail is not saved in sent items folder. Sending wh...

How do I stop "Do you want to add this person to messenger" popups
Several times a week I'm getting popups, asking if I want to "add this person to messenger". This is getting very, very annoying. How do I turn this "feature" off? I know when someone I actually care about is going to add me to messenger, I can turn it on when that time comes. Several times a week? I get it many times a day, and it's driving me crazy! What you are supposed to do is go to Tools -> Options -> Privacy. Here, under Contact Lists you will find a check box saying "Alert me when other people add me to their contact list". Y...

add to Runas command
I tried adding some more functionality to the batch file below with no success. Is there a way that I can add to this batch file? For example, color 1f and loading some macros would be great too. Thanks. runas.exe /user:Administrator cmd.exe Below is an example batch file (incorporating the command you quoted ) I have working on my system to add some helpful stuff to a new "cmd" window.... *NB Make sure the batch-file is named ADMCMD.BAT and is in the system's "path" (i.e.; in a folder included in the PATH variable, usually C:\WINDOWS is one) and...

Home Page Content Item: Important Dates (repost)
I asked this question 3 days ago and have received no replies so I'm repeating it. Perhaps the subject name I used: "Important Dates" was too short or sounded like spam. In any case my experience on this board is that even if no one has a solution, someone usually responds saying that he can't reproduce the problem, or that it doesn't work for him either, or that the poster misunderstands what this function is supposed to do. Not having received any response at all, I beg your indulgence with this repost: ***** Money 2006. No Passport. XP Home SP2. P4 3.0 GHz. 1G...

Verzonden berichten namens wil ik niet in mijn eigen 'Send Items'
Ik heb een persoonlijke en een groepsmailbox in mijn outlook(2000). Als ik nu een bericht verzend namens de groepsmailbox komt dit bericht in mijn persoonlijke "Send Items' terecht. Je raad het al, ik wil graag dat dit in de "Send Items" van de groepsmailbox komt. Heeft iemand enig idee hoe??? W2000 Outlook 2000 Exchange 5.5 Bedankt, Peter Hoi Peter, Er wordt hier voornamelijk Engels gesproken om een zo breed mogelijk publiek aan te spreken. Voor jou probleem is niet direct een oplossing. Je kan wel een Wizard Regel zetten die een kopie in een andere map plaatst bij...

Excel and ADD INS
Using Automation, I'm trying to startup an Add-In to Excel called Crystal Ball. Does anyone know if there is an API or how I can go about doing this within Excel programically ? ...

Can you keep flagged items from being autoarchived?
I would like to be able to let my autoarchive run but for it not to take flagged items to the archive. I keep having to pull them back into the current mail file. Is there something I can set to accomplish this? Hit Alt-Enter while you've got one of these items highlighted then set the option to not AutoArchive the item "dstuart101" <dstuart101@discussions.microsoft.com> wrote in message news:272808E3-27B8-4E34-9A85-4070E91C5FEB@microsoft.com... >I would like to be able to let my autoarchive run but for it not to take > flagged items to the archive. I keep ha...

Suppliers with Top Items List
Can anyone let me know how to show suppliers on Top Item List? I badly need this. I tried my way but not successful. -- Many Thanks Install the RMS Toolkit trial download you requested and check off Custom Reports/Templates during installation. Now run Manager, Reports, Custom, Top Items Report. This report includes Suppliers, Dept, Category, and Sub-Descriptions as columns and filter options. There are over 100 free reports and templates included with our RMS Toolkit trial. Visit: www.digitalretailer.com/trial Greg Digital Retail Solutions www.digitalretailer.com/RMSaddins (v1.x and ...

Menu in Word behaving oddly; items (like the entire contents of the Tools menu) disappearing...
Hey, I'd be oh-so-grateful if anyone has any idea how I could address this problem. I'm quite mystified. I'm running MS Word for X on my Mac (OS 10.4.3), and lately some odd things have begun happening. At first I was just working around them, but I've decided live my computer life too much that way (ignoring problems and hoping they go away), so thought I should look into this before it gets out of control. Items have been disappearing from the Word menu bar. That is, for instance, after I had used the "Symbols" option under the "Insert" menu one day, it di...

Can't open this item. The end date you entered occurs before the start date.
Hi, Everytime I open Outlook 2000 I get a calender pop-up. When I Dismiss it I get a message such as the above and the next time I open Outlook it appears again. I can't see it in the Calender unless I change the view to "By category". I can't delete it or change the date in this view. I just keep getting the above message (see subject line). I tried /cleanreminders and the MS article about Daylight savings but neither work. How do I get rid of this message? I do have a Pocket PC and probably the error occured during a Sync (i have different time zones). ...

Tab sequence on Item Maintenance screen
When creating new items on the Item Maintenance screen and tabbing through the fields. The 3rd tab takes you to the Generic Description field, which users may then enter. The next tab takes you to the Class ID field, if you select a Class ID for the item and update the item with information from the class the Generic Description you entered is over-written. While I agree with this functionality, the suggestion is that the tab sequence on the screen should be changed so that when tabbing through the fields you are prompted to select the Class ID first so the Generic Description (and a...

Linking items GREATER THAN O on another worksheet in the same Work
I have a workbook that has about four worksheets … I want to create a list of items that will automatically be included on worksheet tab 4 from Worksheet tab 1 if the quantity for the item listed on the first worksheet has been changed from 0 to any other number (i.e. 1 or 10 etc). I have a list of equipment with pricing on worksheet tab 1 and the list is long. Many of the items will have quantities of zero and will not increase as they will not be selected for the project being created. We have additional columns for cost, extended cost, labor hours etc. If the quantity changes for a...