 |
|
 |
I am using VC++ 6.0 to complie it and got this error
colorsDlg.obj : error LNK2001: unresolved external symbol "class CString __cdecl ErrorString(unsigned long)" (?ErrorString@@YA?AVCString@@K@Z)
Debug/colors.exe : fatal error LNK1120: 1 unresolved externals
How to solve it?
|
|
|
|
 |
|
 |
There should be an ErrorString.cpp/.h file which must be added to your project. The fact that it compiled means that ErrorString.h is in the project; you need to add the ErrorString.cpp file in.
|
|
|
|
 |
|
 |
In the interest of precision, note that what you reported was *not* a compiler error, but a link error, a quite different problem.
|
|
|
|
 |
|
 |
Hello,
I just loaded your example source code into MSVC++ .NET, and it references a readme.txt file that does not exist within the package.
Just thought you'd like to know,
Jason Doucette
http://www.jasondoucette.com/
|
|
|
|
 |
|
 |
I rarely include the readme.txt file in the zip files, since it is completely useless. It is generated by VS6, and contains nothing meaningful. Then, for reasons known only to the VS6 designers, it is included in the project. Ignore this; delete it from the project.
|
|
|
|
 |
|
 |
hello,
I want to read "r" value from a bitmap resource directly.
I don't want to read color value ,then read one compose of color.
tell me how to do.
thank you very much.
|
|
|
|
 |
|
 |
Not sure what you mean here. You can't read "directly" from a resource; you have to either use LoadBitmap (which messes up the colors), LoadImage (which does not) or FindResource/LoadResource/LockResource, which is just a hard way of doing LoadImage plus GetBitmapBits. Assuming you have 24-bit color, you have to locate the pixel value in the array of data bits and then you can use GetRValue on that COLORREF value. If you have a paletted bitmap image (8-bit color) it is more complex; you have to read the color map information and convert the 8-bit color value to an RGB value using the color map associated with the image. But there is no known way to read a resource "directly". I think there is a slight language problem here but I can't quite figure out what you meant by "I don't want to read color value ,then read one compose of color". Alas, I can't suggest how to do what this might be, or I could either explain how to do what you want or why what you want can't be done. I won't be available again until 10-Apr, so I won't be able to answer until after that date.
|
|
|
|
 |
|
 |
I am quite shocked by the rating this article has got. 1.8 from 5 votes. This is ridiculous. I mean it is a sad reflection on the rating system's inefficiency.
I believe that this surely deserves 4-plus!
Regards
Nish
p.s. Of course people don't really give a great deal of importance to the ratings, but it will get out of the filtered list of "pick of the day" and so on. And new CP visitors might actually think it's not worth a look. They might miss a decent article as this one is, merely because of the low rating.
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
 |
|
 |
I agree, great article. But I've noticed that sometimes an article gets a low rating because in general people are looking for a tutorial on how something is done. After they read the tutorial and get a feel for the code, they then download the source and check it out. That's when they rate it better. The above article is very good, but the author should have gone step by step in explaining how/why this and that works (aside from the comments in the code which are probably very good)
Anyway, since I'm into controls, I'm rating the article a 4
Regards
Senkwe
Just another wannabe code junky
|
|
|
|
 |
|
 |
Perhaps you are right regarding the way attitude people take towards articles. But what most people do not understand is that Joe Newcomer is the ultimate Guru when it comes to Win 32 API or MFC stuff. In my opinion and a very strong one, he is the NUMBER ONE Guru on Code Project.
People should not expect him to write baby-level articles. His articles are often unorthodox stuff and very often a clear reflection of his own thinking. I was very much influenced by his writings on the use of UpdateData in dialogs.
Regards
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
 |
|
 |
Nish [BusterBoy] wrote:
that Joe Newcomer is the ultimate Guru when it comes to Win 32 API or MFC stuff. In my opinion and a very strong one, he is the NUMBER ONE Guru on Code Project.
I haven't read (or rated) the article, because I'm not that much in UI programming (thank God). However, I don't like the "Guru" attitude. Guru is a religious term, and we are all mortal programmers. I like Mr Newcomer's articles, but if I didn't like some of them, I would have rated them low, guru or no guru.
I vote pro drink
|
|
|
|
 |
|
 |
By Guru I simply meant a total expert, or as close to a total expert as someone is capable of becoming.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
 |
|
 |
Even if someone is a "total expert" it does not mean that he can not make a bad article.
I vote pro drink
|
|
|
|
 |
|
 |
You are right there Nemanja, but I still cannot accept a 1.8 rating for this one, that too after 5 votes. I know it might not deserve a 4 or a 5 [though I'd give it 4] but I am sure it deserves a lot more than 1.8.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
 |
|
 |
Who defines whether a person is a "Guru" or not. Just because somebody posts often doesn't afford them the luxury of best ratings on their articles. I haven't yet rated this, but honestly do not know how to rate it so I will pass for now.
|
|
|
|
 |
|
 |
Bill Leibold wrote:
Just because somebody posts often doesn't afford them the luxury of best ratings on their articles
Who said anything about anyone posting often! For that matter Joe is a very rare poster on CP.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
 |
|
 |
I always considered the sum(ratings) more meaningful than the average. It diversifies the "5.0" articles, gives a reasonable balance beetween "many low" and "a few high" votes, and hate ratings just don't work anymore.
|
|
|
|
 |
|
 |
peterchen wrote:
hate ratings just don't work anymore
Maybe not hate-ratings. But some people enjoy putting some articles down for whatever funny reasons they might have. But I get your point though. A 5-rated article with 3 votes would might not be much. But a 4.7 rated article with 40 votes would be pretty much okay, I guess.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
 |
|
 |
why does this one deserve a 4+ ? it's a full solution to a very specific problem - a problem most of us will never encounter. for that reason alone, i wouldn't give it above a 4 (assuming the code isn't absolutely the most elegant code ever).
-c
Smaller Animals Software, Inc.
|
|
|
|
 |
|
 |
Chris Losinger wrote:
why does this one deserve a 4+ ?
Well it certainly deserves a lot more than 1.8 which was its rating today morning. Now it seems to have gone just over 2 which is still too low for this article.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
 |
|
 |
Are you a rating monitor? Give this article time to sink in.
|
|
|
|
 |
|
 |
Listen Bill,
I think this has gone far enough for me. I was only trying to point out that the ratings are not always indicative of the quality of an article. It just happened to be this article. I don't see why I should keep advocating this cause. It does not seem to be working anyway!
Regards
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
 |
|
 |
Hi Nish,
I agree that this has gone far enough. I believe you have made your point and I did not mean to be harsh in wondering if you were a "Rating Monitor". It was just a comment.
Best Regards,
Bill
|
|
|
|
 |
|
 |
Hi Bill,
Am glad that you feel the way you do
Regards
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
 |
|
 |
Wow! I go away for a couple weeks and find there's a firestorm over an article!
This was an article that came about because there had been at least a dozen questions about owner-draw controls in the preceding couple weeks. The "problem" this essay solves is almost irrelevant; it sets a framework in which I demonstrate how to write an owner-draw listbox, an owner-draw combo box, and an "owner-draw" static control, the intent being to show people how to derive similar controls for their own purposes.
While it is unlikely that anyone else will ever need to create a color table, it seems very likely that people may need to create interesting owner-draw listboxes, combo boxes, and do their own drawing in a static control. That's all this article was trying to show. Nothing deep. I knocked it off in an hour or so, in the hopes it would be useful.
[Nish: thanks for all the support]
joe
|
|
|
|
 |