|
Lao Wang wrote: i want to know the algorithm of converting rgb pixel to palette index based on the optimal palette
The GetNearestPaletteIndex() API does that but I'm not sure what algorithm it uses.
I don't have algorithms to share but a quick Google search gives some ideas like:
3-D Lookup Table Color Matching[^]
quick Color Averaging[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
I Have a property sheet with 8 big owner drawn button (I use GDI+ to draw the button in overrided DrawItem function).
The problem is (sometime) the property sheet become flickering so much (around 3 -4 second) after I rapidly switch between my application and
other application (Visual studio is the most noticable one).
anyone know what cause the problem ?
|
|
|
|
|
I had something like this. In my case, it was due to a line of code in OnDraw that was calling OnDraw another time (a SetVisible (...) into the OnDraw (...)). Take a look and watch out with update screen messages being called when they should and not going into a loop.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Hello guys,
I need to use the: The Pairing-Based Cryptography Library(http://crypto.stanford.edu/pbc/download.html), for one of my projects. And the problem is that I dont know how to integrate
it into my existing project; the web-site doesnt provide any manuals for this either.
I know how to integrate pure classes(.cpp, .h) files into my project, but not libraries. Does
anybody know any good tutorial for this ?
Thanks !
|
|
|
|
|
Project -> Add to project...
Change the extension to be able to find Libs, select it and ok.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
|
Which IDE are you using ? For VC2005, open the project properties -> "Linker" -> "Input" and in the field "Additional Dependencies" put the name of your library (with the full path).
You can also put the path in "Linker" -> "General" -> "Additional Library Directories".
|
|
|
|
|
Thanks Cedric, I am using VS2005, and I will try what you suggested later. Thanks !
|
|
|
|
|
Hello everyone,
I have searched and found the term automatic variable means function local variable, compared with static and global variable. Is that correct?
thanks in advance,
George
|
|
|
|
|
|
Hi gleat,
Sorry that I can not open the page, can you help to post some information here please?
regards,
George
|
|
|
|
|
Sure. Here it is:
<quote>
Automatic variables are variables local to a block. They are automatically allocated on the stack when that block of code is entered. When the block exits, the variables are automatically deallocated. Note that automatic variables are often called local variables.
The C storage class for automatic variables is auto; however auto is assumed unless otherwise specified. The basic syntax used to declare automatic variables in C is as follows
[storage_class] data_type variable_1, variable_2, ... variable_n;
An automatic variable will have an undefined value when declared, so it is good practice to initialize it with a valid value before using it.
</quote>
|
|
|
|
|
Great description, gleat!
regards,
George
|
|
|
|
|
George_George wrote: Sorry that I can not open the page
why that ? it's a link to the MSDN, and you often post on the MSDN forum, don't you ?!
bah, yet another lazy crappy poster
|
|
|
|
|
a variable can be declared auto matic, such as static or register .
auto matic is the implicit type when you declare a variable without specifying this statement.
for information, register will ask the compiler (but not force it to) place the variable into a processor register. this is for a variable that is often modified, to improve performances.
static has several meaning. here, we do not talk about the static on class members.
delcaring a variable static means that its value pertains wether the execution goes out of scope. out of the scope, the variable is not destroyed (thus keeping its last value for the next time the code is reexecuted), but not much accessible from outside.
auto matic simply means what we all know about variables lifetime. A variable is created at its declaration, is is release straight when going out of scope.
register double = 4.;
static char c = 'B';
auto int i1 = 3;
int i2 = -7;
|
|
|
|
|
Cool! I think your post is the most valuable which deserves rate 5.
have a good weekend,
George
|
|
|
|
|
|
It appears so, but he is still keeping his age a secret.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
What are the odds he's not as old as you or as ugly as me?
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
See here.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks DavidCrow,
Good learning resource.
regards,
George
|
|
|
|
|
Hi,
days ago I post a question that has not been answered.
This is the question[^]
If you don't mind... I would like to have an answer, although it says "message too long, bad explained, there is no solution... ", of course I would prefer a tip, or something that help me to resolve it.
-- modified at 4:59 Friday 9th November, 2007
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Hi All,
What enum in VC++ 6.0 is equivalent to LinearGradientMode (VC++.Net)?
|
|
|
|
|
Do you need to GRADIENT_FILL_RECT_V or GRADIENT_FILL_RECT_H for set gradient mode?
|
|
|
|