|
Use NM_CUSTOMDRAW. Sample for this code will be like this
void MyDlg::OnCustomdrawList ( NMHDR* pNMHDR, LRESULT* pResult )
{
NMLVCUSTOMDRAW* pLVCD = reinterpret_cast<NMLVCUSTOMDRAW*>( pNMHDR );
*pResult = 0;
if ( CDDS_PREPAINT == pLVCD->nmcd.dwDrawStage )
{
*pResult = CDRF_NOTIFYITEMDRAW;
}
else if ( CDDS_ITEMPREPAINT == pLVCD->nmcd.dwDrawStage )
{
*pResult = CDRF_NOTIFYSUBITEMDRAW;
}
else if ( (CDDS_ITEMPREPAINT | CDDS_SUBITEM) == pLVCD->nmcd.dwDrawStage )
{
COLORREF crText, crBkgnd;
crText = RGB(0,255,100);
crBkgnd = RGB(255,32,11);
pLVCD->clrText = crText;
pLVCD->clrTextBk = crBkgnd;
*pResult = CDRF_DODEFAULT;
}
}
|
|
|
|
|
Hi,
thanx, i it helps!
regards
break;
|
|
|
|
|
every wav file have it's own format described by the WAVEFORMATEX struct,I want to get a copy of a wav file with changing it's WAVEFORMATEX .So what can I do?
|
|
|
|
|
Pass the data through the audio compression manager to change its format for you.
|
|
|
|
|
I'm using a class derived from CHtmlView as listview in an internal Folder
Browser of my application.
Exist a facility to hide the left blue task pane (if user have activate this
feature in Folder Options)?
Another fine feature will be, to set the "list" as active default view in my
application (may be the user has set "icon" as default). Any idea?
Thx for help
|
|
|
|
|
What is density sampling?
How can it be used in image resizing?
Pls help
|
|
|
|
|
Write a program in c language to print prime number using recursion
rajesh
|
|
|
|
|
//it will print the no which r prime no and greater than 9
void divisiblity(int divident,int divisor);
main()
{
const int divisor=9;//keep it const
int divident=10;
while(1)
{
divisibility(divident,divisor);
divident++;
}
}
void divisibility(int divident,int divisor)
{
if(divisor==1)
{
printf("the no is a prime no\t%d",divident)
return ;
}
int remainder=divident%divisor;
if(remainder==0)
return;
divisibility(divident,divisor-1);
return;
}
hope this may help u
-- modified at 6:43 Wednesday 26th October, 2005
|
|
|
|
|
you suck !!
do your homework by yourself.
assignments are made to make you progress ; asking someone to do it for you will never deserves you.
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Rajesh_K_Sharma wrote: Write a program in c language to print prime number using recursion
Anything else ?
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
a beer please... that's very URGENT !!!!!!!
cheers,
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
BEER are not allowed in public places ;P
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
ThatsAlok wrote: BEER are not allowed in public places
even non alcoholized ones ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
toxcct wrote: even non alcoholized ones ?
Yeap
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
[under_the_table] [/under_the_table]. C'mon toxxct, finish it fast before somebody sees u, particularly Mr.ALok
He is like a one-legged man in a bum kicking competition. -Novjot Sidhu
--[v]--
|
|
|
|
|
VivekuniQ wrote: particularly Mr.ALok
Cut the mr. from Alok....
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
rajesh
I have modified the program .Check it
-- modified at 6:49 Wednesday 26th October, 2005
|
|
|
|
|
whats the best way to read ini files and store the input configuration for a program in a class that will be used throughout the program. I want to have a STL map for each section, and read the name/value pairs in each section into the map. Is this a good way to keep the configuration? What are the other general approaches people follow in keeping the config in memory?
What is the way to enumerate the name/value pairs in a given section?
Does each call to GetPrivateProfile* parse the INI file again? Is this why they take the INI file name as a parameter?
thanks!
|
|
|
|
|
Lambu Jindu wrote: whats the best way to read ini files and store the input configuration for a program in a class that will be used throughout the program. I want to have a STL map for each section, and read the name/value pairs in each section into the map. Is this a good way to keep the configuration? What are the other general approaches people follow in keeping the config in memory?
Yeah thats the good way! till you ini file info doesn't change between execution of program!
Lambu Jindu wrote: Does each call to GetPrivateProfile* parse the INI file again? Is this why they take the INI file name as a paramet
Yeap, you are thinking in right way! it reparse the ini file every time it call it!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Lambu Jindu wrote: whats the best way to read ini files...
With GetPrivateProfileString() and GetPrivateProfileInt() .
Lambu Jindu wrote: Is this a good way to keep the configuration?
How often do you need the values? Do you want the values to be able to be changed while your program is running, or must your program be restarted?
Lambu Jindu wrote: What is the way to enumerate the name/value pairs in a given section?
Using GetPrivateProfileSection() .
Lambu Jindu wrote: Does each call to GetPrivateProfile* parse the INI file again? Is this why they take the INI file name as a parameter?
Yes.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Ahh! I am suprisized you did not mention that those functions are only supplied for 16 bit compatabilty and he should be using the registry. (All thou I hope they stick around as I have found them useful for other purposes in the past)
If I remeber correctly, they designed those functions right. When you make a call to one of them, the information is actualy cached so that the second time you call for the same information it is read from the cache, unless the file has been modified between calls (need to be recached).
In other words, they can use the functions you specified directly without having to store the values internaly, as they have already been stored in a cache some where.
INTP
Every thing is relative...
|
|
|
|
|
How to get the same intensity after stretching an image
eg:
Let intensity of a square of 1 unit = 1 x I1
If I stretch the square to 2 units then the intensity = 2 x I2
Both these intensities should be equal
1xI1 = 2xI2 = k(constant)
It should work ways (ie) the intensity should decrease while stretching and increase while shrinking.
I am using bilinear interpolation for stretching but the intensities aren;t equal.
Is there any algorithm or filter to alter the intensity of an image.
Pls Help
|
|
|
|
|
What do you mean by intensity ? Are you talking about saturation ? How do you calculate it ?
Once you use bilinear interpolation, you're kind of inventing inbetween values, bicubic is more accurate, but still the same, really.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanx for ur reply
Intensity means value of each pixel
eg:
If I stretch a yellow color square of one unit to two units then after stretching it should be light yellow and if I stretch further more it should me even more lighter.
Is there any density filter which can be used instead of bilinear interpolation?
|
|
|
|
|
Arrun wrote: Intensity means value of each pixel
So, just the RGB value ? Then hard red == hard blue == hard green, how is that useful ?
Arrun wrote: If I stretch a yellow color square of one unit to two units then after stretching it should be light yellow and if I stretch further more it should me even more lighter.
OK - almost the entire universe does not want this behaviour, which is why you don't get it as standard. If you write your own bilinear filter ( or use the one in my image processing article ), you could work out the factor you've stretched by, and then scale each pixel value accordingly, so if you increase the size of the image by 50%, you can change the filter to also lower the RGB values by 1/3, to get the desired result.
Christian Graus - Microsoft MVP - C++
|
|
|
|