I'm facing the following strange problem using MFC Grid Control (by Chris Maunder) in my VS2010 MFC application:
I've included the CGridCtrl control in a dialog in order to let the user to edit data. It works fine but sometime when I open the dialog the cells content is not displayed but it's covered by the cell background color.
Unfortunately I can't solve the problem because it only happens randomly. I tried to call Invalidate() to both the CGridCtrl control and the dialog but it doesn't solve.
Normally we would tell you to post this question in the forum at the bottom of the article: MFC Grid control 2.27[^], but I think it is ok for you to post it here as well.
Although Chris is around all the time, he is obviously very busy so there is no guarantee he is able to answer your question.
It is a very old project by now (it is article #8 here on CodeProject!), but I see that Chris did update it not too long ago. In your explanation of the problem, you need to include which version of Windows you are running it on an make sure to mention whether it is 32 or 64 bits.
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
From things you've said, I think you're talking about printing on paper instead of a screen.
There is indeed a process to follow when doing so, it involves telling the print sub-system that you've printed a page and wish to print another in the same print-job.
You can and should enumerate the available printers in your system and allow the user to choose from them. In this example, I've simply used the printer's name, as seen in Control Panel\Hardware and Sound\Devices and Printers in Win7.
"When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down 'happy'. They told me I didn't understand the assignment, and I told them they didn't understand life." - John Lennon
To my knowledge, text files do not meta data, which is where you would store things like company name, author, version, etc. For text files, the file system keeps track of simple things like date, time, and attributes.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
We are storing a list of student info, (id number, First name and Last name) using a link list. The ID is the key field. Your program should implement a linked list using arrays. Your program should process the following operations.
1) Add an item to the linked list ex. 1 254 John Smith
2) Print the linked list in logical order ex. 2
3) Print the physical order of the linked list including list, avail and next. ex. 3
4) Print a count of how many items are in the linked list. ex. 4
Bonus (you must get 1-4 working before attempting 5) 5) Delete an item from the linked list ex. 5 254
I started it off as so