|
How do you programmatically set transparent color in a gif file? For example I have a gif file "c:\\a.gif", I wish to:
Open c:\\a.gif.
Set the black color, RGB(0,0,0), as the transparent color.
Save the file back to c:\\a.gif.
After that when I open c:\\a.gif using photoshop or whatever, the gif displays black as transparent color.
Can we do that? Thank you.
|
|
|
|
|
Hi
How we can search for a case insensitive string in CMapStringToOb class. Lookup function supports case sensitive search. Is there any way to implement the case insensitive search?
Regards
|
|
|
|
|
The most efficient way I can suggest is the store your key string as all lowercase or all UPPERCASE. Then when you do a search, convert your search string first to lc/UC then to a lookup.
Otherwise the variations on uppercase/lowercase letters in your string would just be too much to think looping through.
I Dream of Absolute Zero
|
|
|
|
|
Hi,
How can I get an open file dialog similar to the one in Office 2003 with Visual C++ 6.0 ?
Thanks
Claude
|
|
|
|
|
ok... when i try and compile this code i keep gettin the error "fatal error C1010: unexpected end of file while looking for precompiled header directive"
anyone know y this is happening and how to help?
[code]//NFL Favorite Team
#include <iostream.h>
int main()
{
int NFL;
std::cout << "Who is the best team in the NFL?\n";
std::cout << " (please only use the first three letters in the teams name *not city*)\n";
std::cin >> NFL >> endl;
if (NFL=Ste)
std::cout << "We Have a Winner!!!! *claps*\n";
else
std::cout << "How wrong could you be? Have you ever heard of a little team called the STEELERS?!\n";
return();
}[/code]
|
|
|
|
|
ah, your missing your header file
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
you're always goign to get this line
Pheonix28 wrote:
std::cout << "We Have a Winner!!!! *claps*\n";
coz
Pheonix28 wrote:
if (NFL=Ste)
if Ste (steelers?) is a constant then you might like to try this
if (Ste == NLF)
..
coz then you'll never stuff up with the opposite by accident as the compiler will catch you assigning to a constant (but wont ncessarily catch the assignment of a const inside the IF statement
cheerypip
Bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
Yes it is because you didn't include "stdafx.h" (like said in your first response).
To solve this, either include "stdafx.h" in the top of your .cpp file or open the file view (in the workspace), right click on the file, 'settings' -> 'C/C++' tab -> 'Precompiled Header' category and choose 'Not using precompiled headers'.
|
|
|
|
|
does any one have a text to speech code that i can play with
also how do you open/close and play cd drive with vc++ 2005 bata ver
|
|
|
|
|
microsoft has a Text to Speech API somewhere ... look for it.
and for question #2, I don't know, but there must be a function ( or many ) call for that...
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
I know that I should be able to call shell_notifyicon like this:
Shell_NotifyIcon(NIM_DELETE, &tnid);
however the uID of the struct NOTIFYICONDATA must have the icon identifier. So my question is how do i get this icon id of an app that is running.
Thanks
Tom Wright
tawright915@yahoo.com
|
|
|
|
|
Here is the section out of my program that I am having problems with.
char first[20];
ifstream
fin;
openfile(fin);
char str[20];
char* trun;
char* trun2;
char *seps = "\0";
while (!fin.eof())
{fin.getline(str, 30, '\n');
fin.ignore(1);
cout<<str<<endl;
trun = strtok (str,seps);
cout<<"---"<<trun<<"---\n";
if (!doRetrieveVertex (graph, trun))
{doInsertVertex (graph, trun);}
strcpy(first, trun);
while (trun2 != NULL)
{ cout<<trun2;
trun2 = strtok (NULL, seps); \\Here
if (!doRetrieveVertex (graph, trun2))
doInsertVertex (graph, trun2);
cout<<"Internal while";
}
cout<<"External while";
}
1 2 50 3 70 4 23
2 1 50 3 34 4 75
3 1 70 2 34 4 80
4 1 23 2 75 3 80
Here is some sample data that we created and also I changed where seps is to " " so that it will break it into pieces. Basically what it is doing is getting the first line and then breaking off th efirst piece and retaining that and then breaking the others off and adding those. We are making a graph if you are wondering.
If I comment out where it says "trun2 = strtok (NULL, seps);" Then it will run but it stays in an infinite loop inside that Internal while loop. But if I do not then I get a core dump. Please help me if you can it is due tomorrow. Thanks
James
|
|
|
|
|
create an int, then read it instead of using readline, as in fin >> myInt;
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
OK I figured out my problem. When I am using the string token on the the the part that I used the getline. Instead of it moving to the next one it is just reverting back to the first so how do I make it remember which ones that it has tokened. Thanks
James
|
|
|
|
|
Another problem might be......
Didn't you declare str to hold 20 characters and the line
fin.getline(str, 30, '\n');
will read up to 30 characters into a 20 character buffer?
Could this be your problem if you read a line more than 19 characters long?
Since you need to leave room for the terminating NUL byte?
|
|
|
|
|
I have an owner draw CListCtrl and I want more space between the rows, but my DrawItem call is called with short row heights.
Is there an equivalent operation for the CListCrl when it is in report view to the SetItemHeight used in a CListBox to control the height of each row?
|
|
|
|
|
See here[^]
Cheers
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
Dear all,
When CListCtrl is beeing resized, it causes lots of flicker. Do you know how to prevent this annoying bug?
|
|
|
|
|
Have you tried setting WS_CLIPCHILDREN in the parent window?
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
Thanks for your response,
Of course, I did try WS_CLIPCHILDREN and it didn't help. I found an article here talking about this problem. Unfortunately, it works in XP and .Net only. That key is the extended style LVS_EX_DOUBLEBUFFER. No solution for other versions (2K, 98...)
And I'm still working and waiting.
Thanks again.
|
|
|
|
|
Hi,
I need to install my driver in the /windows/system32/drivers directory if it doesn't already exist. The user would prefer not to have to run an installer just to have one driver copied. The driver could live in my application directory but I want to share the driver with other applications
What is the correct way to do that is compatible with win 2000, win xp, win xp server, and other supported windows versions?
I found the function GetSystemWindowsDirectory. Should I just append /drivers/ to the path returned to this function and copy my driver to that path?
Thanks!
Hua-Ying
|
|
|
|
|
Hello
How to retrieve the dialog settings when open the dialog again?
Many Thanks
|
|
|
|
|
I think you need to be a little more specific about what your problem is. It's unclear to how to help based on this question.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
Anonymous wrote:
...when open the dialog again?
What dialog?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I think that you want to reopen a dialog box with the previous setting. If so, create the dialog as a pointer.
CDialog * dlg;
dlg->DoModal();
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|